Quantcast
Channel: Join using column data column - Dropping entire row with where column value is null
Browsing latest articles
Browse All 6 View Live

Re: Join using column data column - Dropping entire row with where column...

Check out the following test:http://sqlfiddle.com/#!3/4c61a/1Hope this help

View Article



Re: Join using column data column - Dropping entire row with where column...

Thanks gimimex.Have already tried that. Still inserts the null values

View Article

Re: Join using column data column - Dropping entire row with where column...

Try alsoINSERT INTO Table_2 (Num, Sno) SELECT Table_1.Custo_Num, Table_1.SerialNo FROM Table_1 LEFT OUTER JOIN Table_2 AS Table_2_1 ON Table_1.Custo_Num <> Table_2_1.Num OR Table_1.SerialNo...

View Article

Re: Join using column data column - Dropping entire row with where column...

Try thisINSERT INTO Table_2 (Num, Sno) SELECT Table_1.Custo_Num, Table_1.SerialNo FROM Table_1 LEFT OUTER JOIN Table_2 AS Table_2_1 ON Table_1.Custo_Num = Table_2_1.Num AND Table_1.SerialNo =...

View Article

Re: Join using column data column - Dropping entire row with where column...

Try:Where table1.serialno is not null and not exists (select * from table2 where table1.custo_num = table2.num and table1.serialno = table2.sno)Hope this help

View Article


Join using column data column - Dropping entire row with where column value...

Table 1Custo_Num                SerialNo123                               1234567123               null123                               null123                              null234...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images