say I'm selecting distinct (non-duplicate) rows for insertion,
insert into original_table select distinct * from new_table
these tables have 3 fields/row. Per the above code all 3 fields are
evaluated by "distict *" .
But my question is: I want to ignore field1, therefore I only want to
test if any rows have field2 *and* field3 as dups - that would be my
distinct test and then do the insert based on that. Test f2 and f3, not
f1.
What the sql? Help is greatly appreciated.
| Thread |
|---|
| • Can connect with PHP to MYSQL | leegold | 13 Aug |
| • Re: Can connect with PHP to MYSQL | suomi | 13 Aug |
| • Re: Can connect with PHP to MYSQL | Wesley Furgiuele | 13 Aug |
| • Re: Can connect with PHP to MYSQL | leegold | 13 Aug |
| • Re: Can connect with PHP to MYSQL | Andreas Ahlenstorf | 13 Aug |
| • SQL question, SELECT DISTINCT | leegold | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | SGreen | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | leegold | 16 Aug |
| • T-SQL SUM() Overflow? | David Mohorn | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | SGreen | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | leegold | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | Michael Stassen | 16 Aug |
| • RE: T-SQL SUM() Overflow? | Martin Gainty | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | leegold | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | Michael Stassen | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | leegold | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | leegold | 16 Aug |
| • Re: SQL question, SELECT DISTINCT | Stephen E. Bacher | 17 Aug |
| • Re: SQL question, SELECT DISTINCT | Michael Stassen | 17 Aug |