September 27, 2011 at 7:29 am
i want to find a personid in the customer table in experts Database
then using that personid find his subscriptions by joining to the following tables
customer, accounts, subscriptions, devices, devsublink?
Can some one help me with query?
September 27, 2011 at 7:42 am
Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.
http://www.sqlservercentral.com/articles/Best+Practices/61537/
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
September 27, 2011 at 10:03 am
madhuu1905 (9/27/2011)
i want to find a personid in the customer table in experts Databasethen using that personid find his subscriptions by joining to the following tables
customer, accounts, subscriptions, devices, devsublink?
Can some one help me with query?
select customer.personid
from customer
join accounts on ??
join subscriptions on ??
join devices on ??
join devsublink on ??
As Gail said, without table definitions it is a stab in the dark.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
September 28, 2011 at 9:38 am
Thanks my problem is solved
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply