Can I use DISTINCTROW in SQL Server 7?
Author |
Message |
Jay #1 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
Hi, I am in the middle of converting some Access SQL to run on SQL Server 7. What I would like to know is - is there a SQL Server equivalent of DISTINCTROW? Thanks if anybody can help me with this. Jay
|
Fri, 11 Jul 2003 20:37:42 GMT |
|
 |
Mary Chipma #2 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
No, distinctrow is just junky old Access SQL syntax that isn't even used in newer versions of Access any more. A plain old "SELECT col1, ... FROM tablename" is what you should be using with SQL Server data. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ On Mon, 22 Jan 2001 04:37:42 -0800, "Jay" Quote:
>Hi, >I am in the middle of converting some Access SQL to run on SQL Server 7. What I >would like to know is - is there a SQL Server equivalent of DISTINCTROW? >Thanks if anybody can help me with this. >Jay
|
Fri, 11 Jul 2003 23:38:28 GMT |
|
 |
#3 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
|
Fri, 19 Jun 1992 00:00:00 GMT |
|
 |
Jay #4 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
Actually I thought DISTINCTROW was quite useful - that way you could select, say, 3 columns from a table with 30 columns and omit any rows where every field was identical. Oh well ... Cheers, Jay Quote: -----Original Message----- No, distinctrow is just junky old Access SQL syntax that isn't even used in newer versions of Access any more. A plain old "SELECT col1, .... FROM tablename" is what you should be using with SQL Server data. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ On Mon, 22 Jan 2001 04:37:42 -0800, "Jay"
>Hi, >I am in the middle of converting some Access SQL to run on SQL Server 7. What I >would like to know is - is there a SQL Server equivalent of DISTINCTROW? >Thanks if anybody can help me with this. >Jay .
|
Sat, 12 Jul 2003 01:31:02 GMT |
|
 |
Sheldon Rosenfel #5 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
You can accomplish what you want with a GROUP BY... Sheldon
Actually I thought DISTINCTROW was quite useful - that way you could select, say, 3 columns from a table with 30 columns and omit any rows where every field was identical. Oh well ... Cheers, Jay Quote: -----Original Message----- No, distinctrow is just junky old Access SQL syntax that isn't even used in newer versions of Access any more. A plain old "SELECT col1, .... FROM tablename" is what you should be using with SQL Server data. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ On Mon, 22 Jan 2001 04:37:42 -0800, "Jay"
>Hi, >I am in the middle of converting some Access SQL to run on SQL Server 7. What I >would like to know is - is there a SQL Server equivalent of DISTINCTROW? >Thanks if anybody can help me with this. >Jay .
|
Sat, 12 Jul 2003 02:39:51 GMT |
|
 |
Jay #6 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
How can I omit duplicate rows with a Group BY? Thanks, Jay Quote: -----Original Message----- You can accomplish what you want with a GROUP BY... Sheldon
Actually I thought DISTINCTROW was quite useful - that way you could select, say, 3 columns from a table with 30 columns and omit any rows where every field was identical. Oh well ... Cheers, Jay -----Original Message----- No, distinctrow is just junky old Access SQL syntax that isn't even used in newer versions of Access any more. A plain old "SELECT col1, ..... FROM tablename" is what you should be using with SQL Server data. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ On Mon, 22 Jan 2001 04:37:42 -0800, "Jay"
>Hi, >I am in the middle of converting some Access SQL to run on SQL Server 7. What I >would like to know is - is there a SQL Server equivalent of DISTINCTROW? >Thanks if anybody can help me with this. >Jay .. .
|
Sat, 12 Jul 2003 19:56:32 GMT |
|
 |
Dennis Redfiel #7 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
The CORRECT syntax would be select DISTINCT * from tablex (group by COULD be used but would be a HIGHLY inefficient way to get distinct rows).
Actually I thought DISTINCTROW was quite useful - that way you could select, say, 3 columns from a table with 30 columns and omit any rows where every field was identical. Oh well ... Cheers, Jay Quote: -----Original Message----- No, distinctrow is just junky old Access SQL syntax that isn't even used in newer versions of Access any more. A plain old "SELECT col1, .... FROM tablename" is what you should be using with SQL Server data. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ On Mon, 22 Jan 2001 04:37:42 -0800, "Jay"
>Hi, >I am in the middle of converting some Access SQL to run on SQL Server 7. What I >would like to know is - is there a SQL Server equivalent of DISTINCTROW? >Thanks if anybody can help me with this. >Jay .
|
Sat, 12 Jul 2003 20:22:00 GMT |
|
 |
Jay #8 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
Thanks but what if I want to only return, say, 2 columns? If I use SELECT DISTINCT a, b from TABLEX it will omit all rows where columns a and b match. There may be other rows where those columns match but all the other fields don't - how can I only check for entire rows matching while selecting only two columns? Jay Quote: -----Original Message----- The CORRECT syntax would be select DISTINCT * from tablex (group by COULD be used but would be a HIGHLY inefficient way to get distinct rows).
Actually I thought DISTINCTROW was quite useful - that way you could select, say, 3 columns from a table with 30 columns and omit any rows where every field was identical. Oh well ... Cheers, Jay -----Original Message----- No, distinctrow is just junky old Access SQL syntax that isn't even used in newer versions of Access any more. A plain old "SELECT col1, ..... FROM tablename" is what you should be using with SQL Server data. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ On Mon, 22 Jan 2001 04:37:42 -0800, "Jay"
>Hi, >I am in the middle of converting some Access SQL to run on SQL Server 7. What I >would like to know is - is there a SQL Server equivalent of DISTINCTROW? >Thanks if anybody can help me with this. >Jay .. .
|
Sat, 12 Jul 2003 21:55:31 GMT |
|
 |
Sheldon Rosenfel #9 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
I guess that brings you back to GROUP BY: SELECT a, b FROM tablex GROUP BY a, b Sheldon
Thanks but what if I want to only return, say, 2 columns? If I use SELECT DISTINCT a, b from TABLEX it will omit all rows where columns a and b match. There may be other rows where those columns match but all the other fields don't - how can I only check for entire rows matching while selecting only two columns? Jay Quote: -----Original Message----- The CORRECT syntax would be select DISTINCT * from tablex (group by COULD be used but would be a HIGHLY inefficient way to get distinct rows).
Actually I thought DISTINCTROW was quite useful - that way you could select, say, 3 columns from a table with 30 columns and omit any rows where every field was identical. Oh well ... Cheers, Jay -----Original Message----- No, distinctrow is just junky old Access SQL syntax that isn't even used in newer versions of Access any more. A plain old "SELECT col1, ..... FROM tablename" is what you should be using with SQL Server data. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ On Mon, 22 Jan 2001 04:37:42 -0800, "Jay"
>Hi, >I am in the middle of converting some Access SQL to run on SQL Server 7. What I >would like to know is - is there a SQL Server equivalent of DISTINCTROW? >Thanks if anybody can help me with this. >Jay .. .
|
Sat, 12 Jul 2003 23:13:56 GMT |
|
 |
#10 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
|
Fri, 19 Jun 1992 00:00:00 GMT |
|
 |
Jay #11 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
Thanks - that seems to work :) Regards, Jay Quote: -----Original Message----- I guess that brings you back to GROUP BY: SELECT a, b FROM tablex GROUP BY a, b Sheldon
Thanks but what if I want to only return, say, 2 columns? If I use SELECT DISTINCT a, b from TABLEX it will omit all rows where columns a and b match. There may be other rows where those columns match but all the other fields don't - how can I only check for entire rows matching while selecting only two columns? Jay -----Original Message----- The CORRECT syntax would be select DISTINCT * from tablex (group by COULD be used but would be a HIGHLY inefficient way to get distinct rows).
Actually I thought DISTINCTROW was quite useful - that way you could select, say, 3 columns from a table with 30 columns and omit any rows where every field was identical. Oh well ... Cheers, Jay -----Original Message----- No, distinctrow is just junky old Access SQL syntax that isn't even used in newer versions of Access any more. A plain old "SELECT col1, ...... FROM tablename" is what you should be using with SQL Server data. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ On Mon, 22 Jan 2001 04:37:42 -0800, "Jay"
>Hi, >I am in the middle of converting some Access SQL to run on SQL Server 7. What I >would like to know is - is there a SQL Server equivalent of DISTINCTROW? >Thanks if anybody can help me with this. >Jay ... .. .
|
Sat, 12 Jul 2003 23:48:51 GMT |
|
 |
#12 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
|
Fri, 19 Jun 1992 00:00:00 GMT |
|
 |
Mary Chipma #13 / 13
|
 Can I use DISTINCTROW in SQL Server 7?
DISTINCTROW never did anything above and beyond what a regular old SELECT did. It has always been totally redundant and superfluous syntax in all versions of Access. the distinctness of each row selected is guaranteed by the primary key, not the junk DISTINCTROW syntax. a SELECT DISTINCTROW and a plain SELECT query will always return identical results. DISTINCTROW has nothing to do with the DISTINCT keyword, which looks at non-key columns for uniqueness. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ On Mon, 22 Jan 2001 09:31:02 -0800, "Jay" Quote:
>Actually I thought DISTINCTROW was quite useful - that way you could select, say, >3 columns from a table with 30 columns and omit any rows where every field was >identical. Oh well ... >Cheers, >Jay >-----Original Message----- >No, distinctrow is just junky old Access SQL syntax that isn't even >used in newer versions of Access any more. A plain old "SELECT col1, >.... FROM tablename" is what you should be using with SQL Server data. >-- Mary >Microsoft Access Developer's Guide to SQL Server >http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/ >On Mon, 22 Jan 2001 04:37:42 -0800, "Jay"
>>Hi, >>I am in the middle of converting some Access SQL to run on SQL Server 7. What I >>would like to know is - is there a SQL Server equivalent of DISTINCTROW? >>Thanks if anybody can help me with this. >>Jay >.
|
Sun, 13 Jul 2003 01:34:50 GMT |
|
|
|