Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What should we use?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01355472
Message ID:
01355486
Views:
26
>>>Hi,
>>>
>>>If we want compatibility with SQL Server, how should we write this statement?
>>>
>>>
>>>TEXT TO lcSQL NOSHOW TEXTMERGE 	
>>>	SELECT Trans.cStatus_codes_fk ,;
>>>  	Trans.yReferral_balance_amount, ;
>>>  	IIF(INLIST(cResolution_Codes_fk, <<lcRecalledStr>>),'1','0') as cIsRecalled,
>>>...
>>>
>>>where lcRecalledStr is a comma-delimited list of codes.
>>>
>>>Thanks.
>>
>>Not sure I've got the exact syntax right but how about something like
>>	SELECT Trans.cStatus_codes_fk ,;
>>  	Trans.yReferral_balance_amount, ;
>>  	CASE WHEN cResolution_codes_fk IN( << lcRecalledStr >> ) THEN '1' ELSE '0' END as cIsRecalled,
>>
>>
>
>Right, but I want to have something which I can use without changes in both SQL and VFP. Also I just found I can not use INLIST, I have more than 24 codes.

I don't think you'll be able to write something that will work on both databases. At least not something reasonably simple and maintainable.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform