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 |
Kannan_JrDBA
Starting Member
4 Posts |
Posted - 2013-03-19 : 21:51:37
|
Hi,I need to write query to get records with below combinationPONUM LINETYPEP-001 ITEMP-001 SERVICEP-002 SERVICEP-002 MATERIALP-002 ITEMP-003 ITEMp-003 MATERIALp-004 ITEMp-005 MATERIALp-006 SERVICE....I have to get the PONUM for combination of (SERVICE, ITEM, MATERIEL) or (SERVICE and ITEM) or (SERVICE and MATERIAL). Expected output:P-001 ITEMP-001 SERVICEP-002 SERVICEP-002 MATERIALP-002 ITEMCould some one please help me to write the SQL.ThanksKannan.Thank youKannan |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2013-03-19 : 22:56:50
|
Please show us the table definitions. |
|
|
|
|
|