Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    New York
    Posts
    45

    Unanswered: string comparasion

    I have a problem that i have been trying to solve
    and although i have come up with some solution,
    i still need a proper correction.

    Please can you help me with most efficient one?

    There is a table with 80+ rows from customers

    I need to insert to a new table
    Client_ ID , Title from Customer table
    and ID from our table
    where customer Client_ ID like our Client_ ID .


    customers_data table
    Client_ ID Title
    '234578900' 'Its been a time'
    '34789032' 'There were us'
    '011234258900' 'South and Norht'
    and so on


    our_data table
    ID Client_ ID Title
    1 '0234578900' 'Its been a time'
    2 '0347890322' 'There were us'
    3 '011234258900' 'South and Norht'


    select *
    from our_data a, customers_data aa
    where instr(substr(a.Client_ ID,1,12),substr(aa.Client_ ID,1,12)) >0

    It return only matching string ,
    How to match if a lid digits or last one is missing

    '234578900' 'Its been a time'
    '34789032' 'There were us'
    1 '0234578900' 'Its been a time'
    2 '0347890322' 'There were us'

    Thank you

  2. #2
    Join Date
    Oct 2003
    Location
    ny
    Posts
    23

    Re: string comparasion

    Originally posted by alexis200487
    I have a problem that i have been trying to solve
    and although i have come up with some solution,
    i still need a proper correction.

    Please can you help me with most efficient one?

    There is a table with 80+ rows from customers

    I need to insert to a new table
    Client_ ID , Title from Customer table
    and ID from our table
    where customer Client_ ID like our Client_ ID .


    customers_data table
    Client_ ID Title
    '234578900' 'Its been a time'
    '34789032' 'There were us'
    '011234258900' 'South and Norht'
    and so on


    our_data table
    ID Client_ ID Title
    1 '0234578900' 'Its been a time'
    2 '0347890322' 'There were us'
    3 '011234258900' 'South and Norht'


    select *
    from our_data a, customers_data aa
    where instr(substr(a.Client_ ID,1,12),substr(aa.Client_ ID,1,12)) >0

    It return only matching string ,
    How to match if a lid digits or last one is missing

    '234578900' 'Its been a time'
    '34789032' 'There were us'
    1 '0234578900' 'Its been a time'
    2 '0347890322' 'There were us'

    Thank you


    I had a similar prob.

  3. #3
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    oranewbee,

    just curious. are you playing 3 roles?

  4. #4
    Join Date
    Jul 2003
    Posts
    38
    Hi,

    Better try with UPPER(LTRIM(RTRIM('XXX'))) also.

    regards,
    avr.

Posting Permissions

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