Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
There has got to be a way.
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00535196
Message ID:
00535267
Views:
13
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform