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.
| Author |
Topic |
|
Thetrax
Starting Member
2 Posts |
Posted - 2010-10-30 : 13:07:26
|
Hello everybody,I'm new to sql ... and my english is a bit weak,but I'll try to describe my problem as good as I can:I have 2 Tables (one is a View):Table 1: T045 containing contact data:con_Name1, con_Name2, con_email, ... cus_IDwhere cus_ID stands for the customer-numberin this table cus_ID is not unique (more than onecontact per customer)Table 2: V999 containing customer data:cus_Name, cus_adress, ... cus_IDIn this table/view cus_ID is unique.What I want is a view which contains all the data from T045 but instead of cus_ID I want there cus_Namefrom V999.I've tried it with following subquery - but this doesn't workSELECT v999.cus_Name1 FROM v999 INNER JOIN t045 ON (v999.cus_ID = t045.cus_ID) WHERE T045.cus_ID = v999.cus_ID GROUP BY v999.cus_Name1) AS cus_name thx in advance |
|
|
Thetrax
Starting Member
2 Posts |
Posted - 2010-10-30 : 13:20:05
|
| i'm stupid ...... I've solved it |
 |
|
|
|
|
|