Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Pull an Empty DateTime?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01094019
Message ID:
01094038
Views:
15
Perfect! Thanks!


>>I'm trying to create a datetime column on the fly with SQL. Having it
>>NULL is fine, I'm just not sure of the syntax.
>>
>>
>>
>>>You cannot. Sql Server doesn't support empty datetime. Consider using NULL instead.
>>>
>>>>How do you get an empty datetime column returned from SQL, as in:
>>>>
>>>>
>>>>SELECT {} AS MyDate;
>>>>  FROM MyTable...
>>>>
>>>>
>
>
>SELECT Cast(NULL AS DateTime) AS MyDate FROM MyTable...
>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform