Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with SQL Server column assign
Message
 
 
À
13/12/2001 16:11:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00594041
Message ID:
00594093
Vues:
33
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform