No it isn't - I thought you might have misunderstood. I just found that the to_date bit wasn't needed. It still sets 3097 date fields to null where it should be updating only three to values in the other table
I think I need another where clause outside the brackets, like where exists a.serialnumber = b.serialnumber or something? Is that where I'm going wrong?
This is my latest script:
update totable...
User Profile
Collapse
-
Ah that's OK then ;-) OK - I appreciate your efforts, really I do, but I still have the problem, in that it should only update 3 rows and is setting the date in all 3097 rows to null. What am I doing wrong?...Leave a comment:
-
Ahem! ;-) You were up at 20 to 6 on a Sunday morning doing this and you call me sad!! I did say I'd only been in the job 2 weeks! ;-pLeave a comment:
-
Sadly replying to my own post!
Forget the to_date gubbins - it converts it from char automatically with:
update totable a
set (datecolumn) =
(SELECT datecolumn
FROM fromtable B
WHERE A.serialnumber = B.serialnumber) ;Leave a comment:
-
Hi
revoke <1st priv>, <2nd priv> on <objectname> from <username>;
Hope this helpsLeave a comment:
-
Update statement ignoring 'where' clause
Hi
I am a DBA - just been in the job two weeks and I would be grateful for some help.
I am trying to update a table with values from another table.
I have spent two days on this and I think I may have blown a fuse in my brain!
The 'from' table has 3 rows in it and the 'to' table has 3094.
I had problems importing the data in date format from a CSV file, so had to create the...
No activity results to display
Show More
Leave a comment: