October 3, 2006 at 3:37 pm
hi guys
I have a date column in my table.
I need to replace the values in this column to '2099-01-01'(some random value) where the values are null.
I am trying this query but i get an error 'Invalid object value'
UPDATE
Practitioner_Enddate
SET
Practitioner_Enddate = '2099-01-01'
FROM
providerlistforfirstq
where
Practitioner_Enddate is null
Please help guys
Thanks
October 3, 2006 at 3:43 pm
October 3, 2006 at 3:53 pm
Hi sorry that was a typo!
I tried this
UPDATE providerlistforfirstq
SET
Practitioner_Enddate = '2099-01-01'
where Practitioner_Enddate is null
but it says '0 rows affected'
I have got null values in the ' Practitioner_Enddate' column in my table and it is a datetime field.
How to solve it???
thanks
October 3, 2006 at 8:52 pm
I have got null values in the ' Practitioner_Enddate' column in my table and it is a datetime field. |
Are you sure? What do you get if you run the following?
--Jeff Moden
Change is inevitable... Change for the better is not.
October 4, 2006 at 1:24 am
If you have defined the column as Datatime Datatype and if you are seeing NULL values in the column then it should be returning some values for the query posted by Jeff and should also update the values properly as per Roi Assa's post. And even if you are inserting a blank it would be converted implicitly to '1900-01-01 00:00:00.000' , so check you datatype of the column.
Prasad Bhogadi
www.inforaise.com
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply