Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 need Query

Author  Topic 

dhanu_ec012
Starting Member

6 Posts

Posted - 2009-05-19 : 01:25:16
get new autogenerated number for every finacial year based on date,



Thanks & Regards
Dhanaraj

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-05-19 : 01:26:39
how do you want the number to looks like ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

dhanu_ec012
Starting Member

6 Posts

Posted - 2009-05-19 : 01:30:14
quote:
Originally posted by khtan

how do you want the number to looks like ?


KH
[spoiler]Time is always against us[/spoiler]



the number should begin with new number for every year and format is like PR09/10:0001
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-05-19 : 01:33:15
read this http://www.sqlteam.com/article/custom-auto-generated-sequences-with-sql-server


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

dhanu_ec012
Starting Member

6 Posts

Posted - 2009-05-19 : 01:52:52
quote:
Originally posted by khtan

read this http://www.sqlteam.com/article/custom-auto-generated-sequences-with-sql-server


KH
[spoiler]Time is always against us[/spoiler]



but the number starts with new number based on every financial year,something like PR 09/10:0001, PR 10/11:0001,
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-05-19 : 02:01:31
do you have a table that stores the financial period ? Add a column to store the number and when you create record into the table, format the number then.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -