Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with SQL Server column assign
Message
 
 
To
13/12/2001 16:11:07
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00594041
Message ID:
00594093
Views:
26
>Thanks Larry!
>
> It Works !!!
>
> Another question SQL 7.0.
>
> I Need to scan label serial numbers and Return the next Values
> 1 - label exists and is not scanned (ReceivedDate is Null)
> 2 - label exists but is already scanned (ReceivedDate is not Null)
> 3 - Label does not exists
>
>
>Thanks in advance,
>
>I promise to study a lot
>

Martin,
You can use a CASE statement in your SQL statement and the ISNULL() function. Ex.
select isnull(case when ReceivedDate is null then 1 
   when ReceivedDate is not null then 2 else null end,3) as 'ScanStatus' 
   from MyTable
I don't know how you are determining if a label exists or not. That will be up to you.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform