User Profile

Collapse

Profile Sidebar

Collapse
frenzic
frenzic
Last Activity: Jul 30 '07, 03:15 PM
Joined: Jul 27 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • frenzic
    replied to Update statement ignoring 'where' clause
    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...
    See more | Go to post

    Leave a comment:


  • frenzic
    replied to Update statement ignoring 'where' clause
    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?...
    See more | Go to post

    Leave a comment:


  • frenzic
    replied to Update statement ignoring 'where' clause
    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! ;-p
    See more | Go to post

    Leave a comment:


  • frenzic
    replied to Update statement ignoring 'where' clause
    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) ;
    See more | Go to post

    Leave a comment:


  • frenzic
    replied to about system privileges
    Hi

    revoke <1st priv>, <2nd priv> on <objectname> from <username>;

    Hope this helps
    See more | Go to post

    Leave a comment:


  • frenzic
    started a topic Update statement ignoring 'where' clause

    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...
    See more | Go to post
No activity results to display
Show More
Working...