|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
help me with dateHi 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 Use this option.
SET CONCAT_NULL_YIELDS_NULL OFF Hope this helps. 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 or if its not in the dbend
then use DBNull.value 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 amjad wrote:
> Hi i have date field. when used paratemized query from asp.net . in which Your dynamic SQL needs to set the date field equal to NULL instead of > 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 ''. Post the code that builds your dynamic query. |
|||||||||||||||||||||||