hiiiii

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alurisarath
    New Member
    • Oct 2007
    • 2

    hiiiii

    i need to insert data in dob field of one table into the dob field of another table .
    in the first table the dob is in nvarchar(50) and in the other it is in datetime.
    I have around 15000 entries in the do field.so i ned to select all the entries to copy.
    can any one help me in converting it into datetime..

    i used convert(datetim e,getdate(),2)

    but getting the present days date. i need to select all the entries in dob....
  • iburyak
    Recognized Expert Top Contributor
    • Nov 2006
    • 1016

    #2
    Try this:

    Code:
    Update table2 set
    dob = convert(datetime, table1.dob)
    from table1 
    join table2 on table1.ID = table2.ID
    Good Luck.

    Comment

    • alurisarath
      New Member
      • Oct 2007
      • 2

      #3
      hiii
      I got these errors

      Msg 4104, Level 16, State 1, Line 1
      The multi-part identifier "dbo.Venkat a" could not be bound.
      Msg 4104, Level 16, State 1, Line 1
      The multi-part identifier "dbo.SIS_Da ta" could not be bound.

      Comment

      Working...