February 20, 2012 at 11:22 pm
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
February 20, 2012 at 11:36 pm
maheshkrishnas (2/20/2012)
hi allI 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
February 21, 2012 at 1:50 am
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
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply