AnsweredAssumed Answered

Execute SQL Number vs Text format

Question asked by user28671 on Dec 27, 2018
Latest reply on Dec 27, 2018 by philmodjunk

I have a solution that uses Execute SQL statements.  All works fine when my table (I have about 10) primary keys were set to serial number increments, number format.  I am looking for future expansion of the solution and have changed my Primary Keys to text format and Auto Enter Calculate Get(uuid).  Portions if the SQL statement work, but when I reference variables or  Filemaker tables directly, it breaks.  Below is my statement.  Again, it has worked fine in the past.

 

 

 

ExecuteSQL (

 

 

"SELECT

tblActivity.PostIt_Color_Start_M, tblActivity.Activity, tblActivity.Duration, tblActivity.PostIt_Color_End

 

FROM

tblActivity

 

JOIN tblArea

ON tblArea.Area_pk = tblActivity.Area_fk

 

WHERE

tblArea.Area_pk=" & tblArea::Area_pk &"

AND

tblActivity.WWP_fk = " & $$CurrentWWPpk & "

AND

tblActivity.M>0"

 

; " " ; ""  )

 

 

If I delete everything except for

 

tblArea.Area_pk=" & tblArea::Area_pk &"

AND

tblActivity.WWP_fk = " & $$CurrentWWPpk & "

 

everything works fine, so these two items are giving me issue and I assume it is a data type compatibility issue now they are "text".

Outcomes