Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 need to create view from two different tables

Author  Topic 

Ronesh
Starting Member

33 Posts

Posted - 2009-08-20 : 06:01:36
i need to create a view from tables
Table1 and Table2.

Table1
T1Id Name
1 a
1 b
1 c
2 a
2 b
3 a


Table2
T2Id T1Id Address
1 1 address1,address2,address3
2 2 address1,address2
3 3 address3


now i need to create view from these tables as under

View1
VId Name Address
1 a,b,c address1,address2,address3
2 a,b address1,address2,address3
3 a address1


can anyone please help me to get this.

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2009-08-20 : 07:00:04
This would be a snap if your tables were NORMALIZED.


http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page
   

- Advertisement -