changing mobile numbers

  • table1

    Id Name mobileno

    1 abc 9123456789

    2 xyz 9876543210

    3 qwe 5432169872

    - --- -------------

    upto 2000 rows are there above table1

    Actual output :

    Id Name mobileno

    1 abc johnsmith

    2 xyz johnsmith

    3 qwe srinu

    4 grd srinu

    upto 2000 rows are there above table

    please give any idea---

  • What do you want to do exactly?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • I given what i need exactly above post

  • venkatagari85 (4/28/2015)


    table1

    Id Name mobileno

    1 abc 9123456789

    2 xyz 9876543210

    3 qwe 5432169872

    - --- -------------

    upto 2000 rows are there above table1

    Actual output :

    Id Name mobileno

    1 abc johnsmith

    2 xyz johnsmith

    3 qwe srinu

    4 grd srinu

    upto 2000 rows are there above table

    please give any idea---

    I can only assume that in another table somewhere you have names like johnsmith and srinu that can be used in your output

    can you please provide the details of such a table and explain the relationship to your "table1"

    thanks

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • venkatagari85 (4/30/2015)


    I given what i need exactly above post

    Yes, but you didn't specify where the names come from.

    Reading minds is not my specialty.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • This way may be

    select a.Id, a.Name, b.*

    from table1 as a

    outer apply SearchInfoAround(a.Name, a.mobile) as b

    If the question is how to master SearchInfoAround() i don't know really.

Viewing 6 posts - 1 through 5 (of 5 total)

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