I have a following query

SELECT MAX(S_Number) as currentNo
FROM Table

Which is doing what I want.

But the S_Number has a logic behind.
Let say today is December 13.
The First S_Number should be "200412130001"
where 2004 is the year and 12 is the month and 13 is the date and then
0001 is the first number (it need to be increament to "200412130002"
for the next number).

The query I have above how do I modify in order to get the same
sequence (which jumps to the 14 on tomorrow rather than 13

Can some one advise please.

--
Regards,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187430
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to