Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: SELECT SQL!


Message #1 by "Vibha Prajapati" <vprajapati@i...> on Thu, 14 Sep 2000 20:18:22 +0100
Dear Vibha,
   Define a work area(e.g strYear), read the first record on the table and
move the year from Year_fld to your work area(strYear).   The next time you
read the next record, check if the year from Year_fld = strYear.   If they
are equal process the record.   If they are not equal, do the control break
process.   Move the new year from Year_fld to strYear.   Read the next
record until EOF (At EOF you should have a control break process).    
   Good luck!
                        -Regina 

-----Original Message-----
From: Vibha Prajapati [mailto:vprajapati@i...]
Sent: Thursday, September 14, 2000 3:18 PM
To: professional vb
Subject: [pro_vb] SELECT SQL!


Hi:

I have a table in Sybase with a field Year.

Year_fld contains value, and order by DESC
2000
2000
2000
1999
1999
1998.... and so on 

From here i only need to pull the current year.
For example at present it is 2000.

The moment it reach 1999 there should be a break.
I can't hard code the year as it keep changing.  
I can't think of a good logic to do this.  Need Help.........!

Thank You,

Vibha

  Return to Index