Jump to content

How can I create a SQL query that grabs all field names in all tables?


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

Recommended Posts

How can I create a SQL query that grabs all field names in all tables (without being required to put the fields on a layout)?

 

 

I would like each row to have the following information:

table name | field name | field type | field comments

I found this custom function but it only returns the field names from a single table:

ExecuteSQL ( "SELECT FieldName FROM FileMaker_Fields WHERE TableName='" & TableOccurrenceName & "' ORDER BY FieldName" ; "" ; ""  )
Link to comment
Share on other sites

Try

ExecuteSQL ( " 
  SELECT TableName, FieldName, FieldType
  FROM FileMaker_Fields 
  WHERE TableName IN ( SELECT DISTINCT BaseTableName FROM FileMaker_Tables ) 
  ORDER BY FieldName
  " ; " | " ; ""  
)

There doesn't seem to be a SQL attribute for field comment, though; you'd have to take the list and pass each row's appropriate values to FieldComment(), either using a CF or a script.

Link to comment
Share on other sites

  • 1 month later...

And there are DESIGN functions in FileMaker that give you so much information: http://www.filemaker.com/help/13/fmp/en/html/func_ref1.31.34.html#1037264

Tho, possibly not what you wanted, I just am reminding people of such things.

Also, I *have* run DDR and extracted information like this with XML and XSLT.

beverly

Link to comment
Share on other sites

This topic is 2832 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
 Share

×
×
  • Create New...

Important Information

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