Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6445 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have asked my IT staff to create an ODBC frontend to mysql. Our mysql database has about 150 tables. I am wanting to construct a report that will run every day. It will use about 20 tables. They are telling me that filemaker can't programatically select a table. In essence, they are saying they have to select each table manually rather than in a script. Is this correct?

Posted

If i'm understanding your question correctly... they probably just don't like FileMaker.

FileMaker has a script step called "Import Data"

You can dynamically generate the actual statement and loop through any given list of tables or whatever you wanted... e.g.


SetVariable[ $tables ; "customers|orders|people" ]

SetVariable[ $tables ; Substitute($tables ; "|" ; ¶ ]

SetVariable[ $i ; ValueCount($tables) ]

Loop

Exit Loop If[ $i ; 0 ]

Import Records[DNS: "mySQLDatabase" ; Calculated SQL Text: "Select * From " & GetValue($tables ; $i)]

Set Variable[ $i ; $i + 1]

End Loop

The above will generate and execute the following SQL statements and import the data form the result of those statements:

Select * FROM customers

Select * FROM orders

Select * FROM people

You can ofcourse make it more complicated add actual search criteria into there using WHERE and practically dyamically generate any sql statement you need.

Posted

Ahhhhhh. My suspiscion confirmed.

I have done a lot in filemaker... just not with sql yet. So, when the youngsters say it can't be done, I ask you guys.

Thanks a lot.

This topic is 6445 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.