Results 1 to 5 of 5

check this sql syntax?

Threaded View

  1. #1
    Registered User
    Join Date
    08-10-2008
    Location
    China
    Posts
    24

    check this sql syntax?

    Hi everyone,

    Recently, I'm merge some excel table into one table by using ADO.NET, But was blocked by some sql sytax, Could you please help me table a look at following sql? Your help will be very appreciated!

    I want to join Two tables (A, and B), the condition should be the number of A. columnA1 equal B.ColumnB1.

    The data sample should be like below.

    A.ColumnA1: "3052835 a is apple,"
    B.ColumnB1: "3052835"

    My intial thought should use Instr(A.ColumnA1, B.ColumnB1) >0. But seems that the condition should pass when B.ColumnB1 is 5 which is a part number of the A.ColumnA1(please refer to the sample above), I hope I can split the column of A.ColumnA1 with the space, and then I can compare A.ColumnA1 and B.ColumnB1. Who can tell me how to do it? Thanks a lot^-^

    BTW, If the A.ColumnA1 include the string like "167/3052835 a is apple,", how to get the string of "3052835", I mean, How to get the string which between the "/" and space?

    Thanks
    Winnie
    Last edited by winniewang11; 08-16-2008 at 05:27 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1