Jump to content
Salesforce and other SMB Solutions are coming soon. ×

FileMaker fields in SQL


maholt

Recommended Posts

I have a small FileMake Database that I want to send to an ODBC datasource.

 

On the FileMaker side I have an id (number) and name (text with maximum length of 255) in a

database called 'ttt'. On the other side I have id (int) name (varchar(255)) in a database

called' test'.

 

How can push the data I have up to the server? I am trying to use "Execute SQL" to do it. The

problem is I do not know how to pull the data of the current record into the query.

 

I want to do something like:

Execute SQL [No dialog, "DSN:MyTest","INSERT INTO test (id,name) VALUES(ttt.id,ttt.name"]

 

However, the STRING ttt.id (and name) get sent not the values from the current record.

 

Thanks

Link to comment
Share on other sites

One way to do this is create a calculation field in your database which compiles the SQL statement and Values for each record ----

 

c_SQL_statement = "Insert into TEST ( id, name) VALUES ( " & (id field name) & "," & (name field name) & " )"

 

[ You may want (need) to put single quotes around your field data -- i.e & "'" & (id field name) & "'" & ]

 

Then create a script to loop through the records you wish to upload ----

 

Go to Record/Request/Page [first]

Loop

Execute SQL [No dialog, "DSN:MyTest", "c_SQL_statement"]

Go to Record/Request/Page [Exit after last, Next]

End Loop

 

Of course you will probably want to put in some error checking and what-not in your script to prevent endless loops , etc...

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use