Ask Experts Questions for FREE Help !
Ask
    psychlopes's Avatar
    psychlopes Posts: 3, Reputation: 1
    New Member
     
    #1

    Jan 8, 2009, 12:25 AM
    Join on first match?
    Hello all,

    Can someone tell me How I can join a table (A) on a table (B) on a sorted column using a join condition so that only the first match is selected as the joined record?

    For instance, I have:

    Table A

    Phone numbers
    983357654

    Table B
    Prefixes

    9833
    983
    98
    9

    I want to joib table A and B using the condition that the phone number is "LIKE" the prefix% . But I want only the first match , i.e. in this example 9833

    Any ideas?
    arun1028's Avatar
    arun1028 Posts: 3, Reputation: 1
    New Member
     
    #2

    Jun 10, 2009, 01:37 AM

    u can use as
    CREATE view anname
    as
    select firstcolomname,secondcolomname,
    from firsttablename JOIN secondtablename
    on firsttablename.UserID=secondtablename.UserID

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Bank name doesn't match. [ 3 Answers ]

I received a letter from a collection agency. The Original Creditor reads First Bank. The correct name is "First Card". The account number is correct. How does this name difference affect this account? Thanks in advance.

The match up [ 8 Answers ]

Do you guys know anywhere in lowell like a speeding date or something similar where you can meet friends, I'm new in town I have friends but wouldn't hurt to meet new ones around my area I'm a pretty 18 year old female interested in ages 19-25 Mature PLEASE!

I want to match this [ 2 Answers ]

I'm trying to find where I can watch or download the show Super Force. Can anybody help me?

Is it like trying to light a wet match? [ 5 Answers ]

I know this girl who broke up with her boyfriend because she wasn't happy with him. He never touched her, there was no passion, and he didn't treat her like she was his girlfriend. Not that he was bad to her, but he just wasn't very warm. She broke up with him and he immediately began trying to...

Does it match [ 3 Answers ]

Hi I'm New here... I'm going to my boyfriend's Collage Graduation at 10AM. I'm not sure what to wear. So I took the picture of my to option. I think the black shirt is too series, but a lot of my friends say the pink doesn't match. Can someone help me?...


View more questions Search