AnsweredAssumed Answered

Problem with Robust Field and Table Names in SQL

Question asked by camberol on Aug 16, 2015
Latest reply on Aug 16, 2015 by camberol

I am trying to use the Custom Functions SQLFieldName and SQLTableName.

 

The following query works fine until I use the Let variables.

 

Let ( [

    ~shipper = Invoices::Shipper ;

    ~f1 = SQLFieldName ( Invoices::ShipMethod ) ;

    ~f2 = SQLFieldName ( Invoices::Shipper ) ;

    ~t1 = SQLTableName ( Invoices::Shipper ) ;

    ~query = "

        SELECT DISTINCT ShipMethod

        FROM Invoices

        WHERE Shipper = ?

        ORDER BY ShipMethod

    " ] ;

    ExecuteSQL ( ~query ; "" ; "" ; ~shipper )

)

 

Any suggestions on the easiest way to do this or some other method for robust naming of fields and tables?

 

Thank you,

Camberol

Outcomes