query in sql similar to excel vlookup

  • Attached the worksheet.

    I have two views view 1 and view 2 coming from the sql server. My lookup combines these two view as shown in the workbook. How do i write same thing in sql

    Please help. If i am not clear let me know.

  • maybe something along these lines??

    SELECT

    TableA.city

    , TableA.somefigure + (TableB.somefigure * 2.45)

    FROM TableA INNER JOIN

    TableB ON TableA.city = TableB.city;

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

  • Hi..Thanks for the reply i will try it

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

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