TSQL _STORE PROCEDURE

  • hi all

    I need to Populate the city_summary table based on the customer and state table.

    customer

    cust_idcust_namecust_dobcust_citystate_idcust_phonecust_emailcreated_dtmodified_dt

    1234Tim D2/2/1988Austin20048595098tim@gmail.com3/2/2011

    1235Bill P5/3/1980New York30046748898bill_p@gmail.com4/2/2011

    1278John Q6/13/1988Cheanni40084930393john@gmail.com5/5/2011

    1279John Black6/13/1984Cheanni40084930356john_b@gmail.com5/6/2011

    state

    statestate_nmcountry

    200TXUSA

    300NYUSA

    400TNINDIA

    city_summary

    city_namestate_namecountry_nameno_of_customers

    Can anyone help on this

  • maheshkrishnas (2/20/2012)


    hi all

    I need to Populate the city_summary table based on the customer and state table.

    customer

    cust_idcust_namecust_dobcust_citystate_idcust_phonecust_emailcreated_dtmodified_dt

    1234Tim D2/2/1988Austin 20048595098tim@gmail.com3/2/2011

    1235Bill P5/3/1980New York 30046748898bill_p@gmail.com4/2/2011

    1278John Q6/13/1988Cheanni40084930393john@gmail.com5/5/2011

    1279John Black6/13/1984Cheanni40084930356john_b@gmail.com5/6/2011

    state

    statestate_nmcountry

    200TXUSA

    300NYUSA

    400TNINDIA

    city_summary

    city_namestate_namecountry_nameno_of_customers

    Can anyone help on this

    Look up joins on http://msdn.microsoft.com/en-us/library/aa213233%28v=sql.80%29.aspx

    The columns would be state_id and state

    Jayanth Kurup[/url]

  • Please don't cross post. It just wastes peoples time and fragments replies.

    No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic1255006-391-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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