Hi all,
I am having some grief getting a piece of SQL to work and wonder if anyone out there does anything similar.
What I want to do is pull back records from a table and use just the last five of them in a calculation.
I am calling these through an application in which SQL seems to work ok with just a few minor syntax tweaks.
The code I have is:
select * from(
select sample_number from sample where stage = 'M10'
order by sample_number desc)
where row_number <=5
I keep getting an error re too few parameters: expected 1
any help gratefully received
mike
I am having some grief getting a piece of SQL to work and wonder if anyone out there does anything similar.
What I want to do is pull back records from a table and use just the last five of them in a calculation.
I am calling these through an application in which SQL seems to work ok with just a few minor syntax tweaks.
The code I have is:
select * from(
select sample_number from sample where stage = 'M10'
order by sample_number desc)
where row_number <=5
I keep getting an error re too few parameters: expected 1
any help gratefully received
mike