Thank you!!
>Hi,
>
>
>TEXT TO cSqlSelect TEXTMERGE NOSHOW PRETEXT 15
> select <<IIF(SQL, " CAST(0 AS BIT)", ".F.")>> AS SEL_REC, myfield1 from mytable
>ENDTEXT
>
>
>MartinaJ
>
>>Hi,
>>
>>I build a SQL select using TEXTMERGE as follows (simplied)
>>
>>TEXT TO cSqlSelect TEXTMERGE NOSHOW PRETEXT 15
>> select CAST(0 AS BIT) AS SEL_REC, myfield1 from mytable
>>ENDTEXT
>>
>>
>>The above works for SQL Server. But for VFP I need to change the CAST(0 AS BIT) AS SEL_REC to be .F. AS SEL_REC. There is a variable (global) that shows if the app is using SQL Server DB or VFP (variable plSqlServer .T. or .F.)
>>Of course I can create two TEXTMERGE statements, one for VFP and one for SQL Server. But, how would I change the actual expression above that would, based on a variable plSqlServer?
>>
>>TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham