SELECT DISTINCTROW year(y) FROM x will not work properly 
Author Message
 SELECT DISTINCTROW year(y) FROM x will not work properly

I have  a table x with some data in field  y like

01.01.1997
02.01.1997
01.01.1998

And would like to get a list of all years

1997
1998

I tried "SELECT DISTINCTROW year(y) FROM x"

and get following:

1997
1997
1998

Obviously the DISTINCTROW will not take effect. What shall I do else?

Thanks for your help

Thomas Spiess
http://www.*-*-*.com/



Thu, 11 May 2000 03:00:00 GMT  
 SELECT DISTINCTROW year(y) FROM x will not work properly

Try

SELECT DISTINCT YEAR(x) FROM x

DISTINCTROW evaluates all the line, if you are not referring to all of
them.

EBR



Quote:
>I have  a table x with some data in field  y like

>01.01.1997
>02.01.1997
>01.01.1998

>And would like to get a list of all years

>1997
>1998

>I tried "SELECT DISTINCTROW year(y) FROM x"

>and get following:

>1997
>1997
>1998

>Obviously the DISTINCTROW will not take effect. What shall I do else?

>Thanks for your help

>Thomas Spiess
>http://www.winet.ch/city/tspiess



Thu, 11 May 2000 03:00:00 GMT  
 SELECT DISTINCTROW year(y) FROM x will not work properly

change distinctrow to distinct.

hth

Ron Regan
Independent Consultant
Boston, MA



Fri, 12 May 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Select Case not working properly

2. Select method doesn't work properly

3. SendObject command not working properly with Outlook Express

4. VB expressions do not work properly in different installations of Access 97

5. Update method in VB6 not working properly

6. Custom Icon in Outlook Not working properly (Dmitri?)

7. Form with Date Field Not Working Properly

8. Windows 2000 and IIS: Not working properly (aspx)

9. vb .net validating event does not work properly

10. Third party ActiveX Controls not working properly.

11. DataReport does not work properly

12. OnClick event not working properly

 

 
Powered by phpBB® Forum Software