Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unexplained value in SQL field
Message
From
09/10/2006 12:19:45
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
09/10/2006 12:12:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01160578
Message ID:
01160593
Views:
8
>>Would you try this:
>>IIF(ISNULL(Member.NoSchool),0,Member.NoSchool) AS NoSchool
>>replaced with:
>>nvl(Member.NoSchool,0) AS NoSchool
>
>Yes, that would resolve the issue. The same would go with:
>
>
>IIF(ISNULL(Member.NoSchool),000000,Member.NoSchool) AS NoSchool
>
>
>But, I am looking to understand why removing a where clause causes the data to be different. This simply doesn't make any sense to me.
>
>As for the updated SQL, such as how I did it or considering your approach, I am looking for the best approach that would allow me less changes when the data would be migrated to SQL Server. Do you know if anyone of those approaches are compliant with SQL Server:
>
>
>IIF(ISNULL(Member.NoSchool),000000,Member.NoSchool) AS NoSchool
>NVL(Member.NoSchool,0) AS NoSchool
>
AFAIK both are incompatible. SQL server one:

ISNULL( Member.NoSchool , 0 ) as NoSchool

I think having first version if first value is null it's specifying the width of the field.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform