var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Select "next"
Hi. is there any option to use a SELECT to get always the NEXT record without using CURSOR.
Imagine the following Situation.
a table with
Custome Code , Invoice, Control Number, etc
for each Customer there are a lot of records
The user want to see one by one in the Forms
he type Customer 49
there are two Buttons Forward and BACK
If I use this
select Code, Invoice, etc from table
where code > 49
i will get 50 not customer 49 invoce 0001
If i put Customer = 49 or >=
i will always get the same.
If use Cursor >= 49 , if the user Click BACK
i dont get customer 48 because Cursor is limited to > 49
You need to pass to the SP the customer ID and last invoice number displayed
select top 1 ...
from table t1
where customer = @customer
and invoiceNo >@invoiceno
order by invoiceNo