Home All Groups Group Topic Archive Search About
Author
23 Jun 2006 8:15 AM
amjad
Hi i have date field. when used paratemized query from asp.net . in which
date field is null , it null the whole dynamix sql , then i decide to use
isnull function to convert null to '', i
like set @mydate=isnull(@mydate,'')
but this create another problem which it update date field with date
1/1/1900, but i want that field should be null instead of 1/1/1900 any one
has any idea how to do that

Author
23 Jun 2006 8:25 AM
Omnibuzz
Use this option.
SET CONCAT_NULL_YIELDS_NULL OFF

Hope this helps.
--
-Omnibuzz (The SQL GC)

http://omnibuzz-sql.blogspot.com/



Show quote
"amjad" wrote:

> Hi i have date field. when used paratemized query from asp.net . in which
> date field is null , it null the whole dynamix sql , then i decide to use
> isnull function to convert null to '', i
> like set @mydate=isnull(@mydate,'')
> but this create another problem which it update date field with date
> 1/1/1900, but i want that field should be null instead of 1/1/1900 any one
> has any idea how to do that
Author
23 Jun 2006 8:31 AM
Omnibuzz
or if its not in the dbend
then use DBNull.value

--
-Omnibuzz (The SQL GC)

http://omnibuzz-sql.blogspot.com/



Show quote
"Omnibuzz" wrote:

> Use this option.
> SET CONCAT_NULL_YIELDS_NULL OFF
>
> Hope this helps.
> --
> -Omnibuzz (The SQL GC)
>
> http://omnibuzz-sql.blogspot.com/
>
>
>
> "amjad" wrote:
>
> > Hi i have date field. when used paratemized query from asp.net . in which
> > date field is null , it null the whole dynamix sql , then i decide to use
> > isnull function to convert null to '', i
> > like set @mydate=isnull(@mydate,'')
> > but this create another problem which it update date field with date
> > 1/1/1900, but i want that field should be null instead of 1/1/1900 any one
> > has any idea how to do that
Author
23 Jun 2006 1:51 PM
Tracy McKibben
amjad wrote:
> Hi i have date field. when used paratemized query from asp.net . in which
> date field is null , it null the whole dynamix sql , then i decide to use
> isnull function to convert null to '', i
> like set @mydate=isnull(@mydate,'')
> but this create another problem which it update date field with date
> 1/1/1900, but i want that field should be null instead of 1/1/1900 any one
> has any idea how to do that

Your dynamic SQL needs to set the date field equal to NULL instead of
''.  Post the code that builds your dynamic query.

AddThis Social Bookmark Button