sql - Joining tables with and without concatenated columns -
I have a scenario similar to the following question "". But the question is different that I have to choose from the table T1. In the end result, I need to select values from table T1, and there is a flag that has similar non-empty values in Table T2. Even if joining in Expected Result --- John, yes --- (Because â ???? R3â ?? ?? exists) --- Alex, not --- --- Pierce, no --- --- Sarah, yes --- (Because "R1A" exists) Question What is the best way to write this question in Oracle 8i? Try this: Make Table T1 ([1] varchar (2), [2] varchar (5)); The value ('C1', 'Zone', 8), ('C2', 'Alex', 10), ('C3', 'Peer', 'T' 10), ('C4', ' Sarah ', 10); Create Table T2 ([1] varchar (2), [2] varchar (8)); Prices include T2 ([1], [2], [2], '' 3 '' '3' ', 1' ',' '1' ',' 'C5, C1, C4 ', 8);
[Col3] will also have to be considered.
SELECT T1.col2, case when T2 If the .col1 is the tap then 'No' or 'Yes' T1 is the end of the left over T2 ON,' T2.col2 + ',' If you have the possible duplicates and you want to eliminate them (yes but showing a yes is). ) Then use it:
Select DI1, T2.col2, MAX (Case if T2.col1 then 'No' or 'Yes' END) T1 Join the left OUTER T2 On' , '+ T2.col2 +', 'Choice'%, '+ T1.col1 +',% 'and T1.col3 = T2.col3 Group by T1.col2 < / Html>
Comments
Post a Comment