Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
There has got to be a way.
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00535196
Message ID:
00535267
Vues:
11
>SQL V 6.5
>field a = datetime-----Time portion is incorrect.
>field b = char(5)------Has correct time for field a
>multible records per
>some a and/or b may be null
>
>select Min(CVDate(IIf(([a] & " " & [b])="",Null,[a] & " " & [b]))) AS ARRIVAL

My first guess: (It's actually one whole line)

select min(convert(datetime, convert(varchar(8), isnull(@a, '19000101'), 112) + isnull(@b, ' 00:00:00'))) as arrival

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform