Re: [SQL] NULLIF problem

2007-11-29 Thread Michael Glaesemann
On Nov 28, 2007, at 14:00 , Erik Jones wrote: Why not just: UPDATE table SET mytime=NULL WHERE mytime=''; If mytime is a timestamp field, it won't have any values ''. I believe the OP is updating mytime to a client-supplied value which is passing '' when it probably means NULL. Michael

Re: [SQL] NULLIF problem

2007-11-29 Thread Gera Mel Handumon
Thanks! On Nov 28, 2007 10:47 AM, Michael Glaesemann <[EMAIL PROTECTED]> wrote: > > On Nov 27, 2007, at 21:04 , Gera Mel Handumon wrote: > > > I encounter an error if i use NULLIF with timestamp with time zone. > > eq. dbtime=nullif(mytime,'') > > > > i want to null the value of field DBTIME if t

Re: [SQL] NULLIF problem

2007-11-28 Thread Erik Jones
On Nov 27, 2007, at 8:47 PM, Michael Glaesemann wrote: On Nov 27, 2007, at 21:04 , Gera Mel Handumon wrote: I encounter an error if i use NULLIF with timestamp with time zone. eq. dbtime=nullif(mytime,'') i want to null the value of field DBTIME if the variable mytime=" " DBTIME ="timestam

Re: [SQL] NULLIF problem

2007-11-27 Thread Michael Glaesemann
On Nov 27, 2007, at 21:04 , Gera Mel Handumon wrote: I encounter an error if i use NULLIF with timestamp with time zone. eq. dbtime=nullif(mytime,'') i want to null the value of field DBTIME if the variable mytime=" " DBTIME ="timestamp with time zone" datatype error: column DBTIME is of typ

[SQL] NULLIF problem

2007-11-27 Thread Gera Mel Handumon
HELLO, I encounter an error if i use NULLIF with timestamp with time zone. eq. dbtime=nullif(mytime,'') i want to null the value of field DBTIME if the variable mytime=" " DBTIME ="timestamp with time zone" datatype error: column DBTIME is of type timestamp with time zone but expression is of t