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
 General SQL Server Forums
 New to SQL Server Programming
 How to Return Next number

Author  Topic 

yaman
Posting Yak Master

213 Posts

Posted - 2010-04-13 : 14:28:02
Sir ,

From Front End Side , when user click on forward button the user get next number and user click on backward button then user get previous number .

I have a problem my number is nvarchar , how can i return next and previous number .

Please help me sir .

Yaman

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-04-13 : 14:36:40
If the varchar "number" looks like an integer, you can CAST as INT and add/substract 1 to/from the value.
If the varchar "number" has another format, please let us know.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-13 : 23:49:06
or do you mean sequences like this
http://www.sqlteam.com/article/custom-auto-generated-sequences-with-sql-server

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -