Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 null value date in field

Author  Topic 

saranram_forum
Starting Member

9 Posts

Posted - 2009-02-18 : 05:24:49
Hi,
I have null value in date field.I need to store the value in a variable in my coding.The variable is datetime type.How to store null value in the variable for datetime variable.

Saravanakumar

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-02-18 : 05:44:01
if you don't assign any value to your variable, it'll be NULL only.
Or, You could use set here,
set @yourdatetimevar=null
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-18 : 09:14:40
quote:
Originally posted by saranram_forum

Hi,
I have null value in date field.I need to store the value in a variable in my coding.The variable is datetime type.How to store null value in the variable for datetime variable.

Saravanakumar


do you mean sql variable or variable used in front end?
Go to Top of Page

saranram_forum
Starting Member

9 Posts

Posted - 2009-02-19 : 00:29:13
quote:
Originally posted by sakets_2000

if you don't assign any value to your variable, it'll be NULL only.
Or, You could use set here,
set @yourdatetimevar=null



Hi,
Actually the null value in date field in my table. I need to assign that value in my front-end variable.

Saravanakumar
Go to Top of Page
   

- Advertisement -