• No replies
1 Post

Pinned topic SQL -ID variable problem

‏2013-07-05T14:54:07Z |

I have a working RUN command that uses a single variable

=VALID(RUN("Sorrento_History_RefTA.mmc","-ID1 '-VAR Var1="+ DataIn +"' -OE1"),FAIL("Fail - " + LASTERRORMSG()))

but i need to send 2 variables and i cannot seem to get the right combination of single and double quotes. My attemt is as follows

=VALID(RUN("Sorrento_History_Retreive.mmc"," -ID1 ' -VAR VAR2="+ Type + "'" + " -ID2 ' -VAR VAR3="+ SPGUUID +"' -OE1"),FAIL("Fail - " + LASTERRORMSG()))

This does not seem to resolve the second variable when i look at the trace.dbl which looks like

SELECT * from tbl_97_Sorrento_HistoryB WHERE Message_Type LIKE 'MessageA' and SPG_UUID LIKE '#VAR3#'

Does anyone know how to resolve this?