List:General Discussion« Previous MessageNext Message »
From:leegold Date:August 16 2004 3:29pm
Subject:SQL question, SELECT DISTINCT
View as plain text  
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 MYSQLleegold13 Aug
  • Re: Can connect with PHP to MYSQLsuomi13 Aug
  • Re: Can connect with PHP to MYSQLWesley Furgiuele13 Aug
    • Re: Can connect with PHP to MYSQLleegold13 Aug
      • Re: Can connect with PHP to MYSQLAndreas Ahlenstorf13 Aug
        • SQL question, SELECT DISTINCTleegold16 Aug
          • Re: SQL question, SELECT DISTINCTSGreen16 Aug
            • Re: SQL question, SELECT DISTINCTleegold16 Aug
              • T-SQL SUM() Overflow?David Mohorn16 Aug
              • Re: SQL question, SELECT DISTINCTSGreen16 Aug
                • Re: SQL question, SELECT DISTINCTleegold16 Aug
                  • Re: SQL question, SELECT DISTINCTMichael Stassen16 Aug
RE: T-SQL SUM() Overflow?Martin Gainty16 Aug
Re: SQL question, SELECT DISTINCTleegold16 Aug
  • Re: SQL question, SELECT DISTINCTMichael Stassen16 Aug
    • Re: SQL question, SELECT DISTINCTleegold16 Aug
Re: SQL question, SELECT DISTINCTleegold16 Aug
Re: SQL question, SELECT DISTINCTStephen E. Bacher17 Aug
  • Re: SQL question, SELECT DISTINCTMichael Stassen17 Aug