help in SQL server urgent....!

  • I am supposed to create a join condition between two tables.

    1) This one with nvarchar data type and has real number like ...9944156

    2) This one is varchar and has the same field with zeros added up in from so it becomes 10 char..

    for instance the same field shown in (1) becomes 0009944156.

    How can I compare these two to make it a.order_no=b.order_no

    There is no other field to really use in the join condition. Please help

    thanks

    Su

  • Convert(int, a.order_no) = Convert(int, b.order_no)

    This may not perform very well but it will work. Should reassess the data types in these tables.

  • -- oops double clicked --

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply