SQLTableAndField ( )

Function stats

Average user rating
375
375
9999
Support
FileMaker 10.0 +
Date posted
08 February 2015
Version
1
Recursive function
No

Author Info
 Daniel Smith

8 functions

Average Rating 5.0

author_avatar



 

Function overview

Prototype

SQLTableAndField  ( fieldForTableNameOrTableName )


Parameters

fieldForTableNameOrTableName  field or fully-qualified field name to extract names from.


Description

Tags:  Sql  

Quote a table and field name for use in a FileMaker SQL statement. Prevent hard-coding it's value.

Examples

Sample input

SQLTableAndField ( Customer::id )


Sample output

"Customer"."id"

 

Function code

/* SQLTableAndField ( fieldForTableNameOrTableName )

PURPOSE:
Quote a table and field name for use in a FileMaker SQL statement. Prevent hard-coding it's value.

PARAMETERS:
fieldOrFieldName (field, txt) field or fully-qualified field name to extract names from.

DEPENDENCIES:
FileMaker Pro 10+
SQLTable custom function
SQLField custom function

REVISIONS:
2012-DEC-13    - Created by Dan Smith dansmith65@gmail.com
####################################################################################################*/

SQLTable ( fieldOrFieldName ) & "." & SQLField ( fieldOrFieldName )

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/375

    Prototype: SQLTableAndField( fieldForTableNameOrTableName )
    Function Author: Daniel Smith (http://www.fmfunctions.com/mid/375)
    Last updated: 08 February 2015
    Version: 1

*/
// ===================================