Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ISNULL and SQL Server
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01386986
Message ID:
01387006
Views:
48
>>What I meant is that the above syntax is applicable to SQL Server only. Therefore, for each of my SQL Select command I have to have two expressions, one for VFP data and another for SQL Server data.
>
>
>Ahhh.. I misunderstood... you could create/modify your class/prg to do known conversions on your SQL statement and convert NVL() to COALESCE() with a simple STRTRAN()
>
>I don't know about you but I use IIF() all the time in my Foxpro SQL Select statements, all of which have to be swapped out to CASE WHENs which is not just a simple STRTRAN()
>
>
>I definitely agree with you that the Nirvana of writing an app once and being able to just "swap out" the database is all but fictitious unless you severely limit what functions you use. No matter the approach to get past these hurdles, of which I'm sure some gurus have derived, there are 'gotchas' everywhere and pros/cons of all the diferent approaches.

I also use IIF() and then have to use CASE WHEN for the SQL Server compatible statement. I am not really complaining that it takes some extra work on my part to maintain two SQL Select statements. As long as my VFP application will work with new versions of Windows (Windows 7) I will be ok.
"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
Previous
Reply
Map
View

Click here to load this message in the networking platform