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
 query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-12-11 : 07:55:28
fereja writes "I like to write a query that. the previous record is the input of the current record.

how can i get(return) the privious recored."

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-11 : 07:57:52
select * from yourtablenamehere where yourcolumnnamehere = (select max(yourcolumnnamehere) - 1 from yourtablenamehere)


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-12 : 05:24:36
quote:
Originally posted by AskSQLTeam

fereja writes "I like to write a query that. the previous record is the input of the current record.

how can i get(return) the privious recored."

Define Previous Record

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -