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

SQL and Find Requests


D_Settles
 Share

Recommended Posts

I want to construct a SQL Statement based on data entered in a FM Find Request. The end goal is to create a Script containing the Query and transmit the Query via ODBC to access a remote DB and then import the data into my FM DB.

 

I cannot seem to find any documentation regarding using a FM Find Request and SQL. Is this possible? Does anyone have any info regarding an approach to this problem?

Link to comment
Share on other sites

Mr. Settles,

 

Can you rephrase your question? I'm not sure if you're are trying to query a Filemaker database with SQL or query a non-FileMaker database (such as MS Access) from a Filemaker script.

Link to comment
Share on other sites

Restated Message -

In a FM Database, I want write a FM Script that constructs a SQL Query and transmits the Query via ODBC to access a remote SQL Server DB and then import the data from the SQL Server DB into my FM DB.

 

I want to derive the variables in the SQL Statement from data entered in a FM Find Request. For Example: The data derived from the FM Find Request might include a ClientID + all Invoices created on a specified Date.

Link to comment
Share on other sites

Okay, I have the general idea now. A bit more clarification is needed: Do you want to base the SQL query on the RESULTS of a Filemaker find request or on the the value that you are looking for? I know it sounds like a distinction without a difference but it matters.

 

Also, what version of FM and Mac or windows?

Link to comment
Share on other sites

I am not sure I understand the distinction between "value" and "results". However, I can describe how I want the interface to function.

 

1. In FM DB, Click on an icon that triggers a script that includes a find request. Pause.

2. Enter a "start date" "end date" either in 2 different fieds or using the "..." date range function. Click continue.

3. Script inserts the "Date Range" in a SQL statement. FM transmits the SQL statement via ODBC to a SQL Server DB on a remote Server.

4. FM Imports the results of the SQL query and populates a set of new records.

 

At this time, I am accomplishing steps 1-3 described above by using Excel. Excel creates a .csv document using the imported data. Then, I am importing the data into FM. It works, but is not an elegant solution.

Link to comment
Share on other sites

I am attaching a clone of a file I made back in 2004. I think it does what you are describing, but does not use any find requests. It queries an external database using a date range entered by the user.

 

Hope this helps,

 

Steve

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.

 Share



×
×
  • Create New...

Important Information

Terms of Use