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 |
|
SQLBEGINNERFRENCH
Starting Member
2 Posts |
Posted - 2010-08-04 : 05:56:19
|
Sorry for my english. I'm from France I discover your forum and try to find a solutionI don't succeed to create my query : select of all table1 and adding all items which have same group in table2TABLE1ITEMT1 QTYT1 GROUPT1item1 - 2 - Aitem2 - 1 - Nullitem3 - 3 - BTABLE2ITEMT2 - GROUPT2item1 - AitemT2N4 - AitemT2N5 - Aitem3 - BitemT2N6 - BitemT2N7 - CI want to obtain this : My table 1 contain item with group A and B, So I want to add items of Table2 which have group A and Bitem1 - 2 - Aitem2 - 1 - Nullitem3 - 3 - BitemT2N4 - - AitemT2N5 - - AitemT2N6 - - BIf you help me, it will be great pleasure.Thanks |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-08-04 : 06:06:04
|
| Select T1.*,T2.* from TABLE1 T1Left Join TABLE1 T2 on T1.GROUPT1=T2.GROUPT2Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
|
SQLBEGINNERFRENCH
Starting Member
2 Posts |
Posted - 2010-08-04 : 06:46:04
|
| Thank You IDERA,I'm very beginner in SQL Query !! The test seems to be good. I'll try to adapt and control with more datas'Et voilà !'Merci |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-08-04 : 07:07:45
|
quote: Originally posted by SQLBEGINNERFRENCH Thank You IDERA,I'm very beginner in SQL Query !! The test seems to be good. I'll try to adapt and control with more datas'Et voilà !'Merci
You are welcome.Just stick around this site & I am sure you wont be a beginner for to long. Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
|
|
|
|