Re: Question about query
Posted in 2006
Topics: General Discussion
luissol ha escrito: > Hi, I'm using informix but I need to get only new values of a table > > and what I need is a query that is something like this > > > SELECT top (number1 - number2 ) * FROM table; > > where my variables are: > number1 --> a variable that I know > number2 --> select count(*) FROM table > > Thanks > Luis Saavedra Is number2 a count(*) of the same table? any way i think you can still use this : SELECT (number1 - (SELECT count(*) from table)) from table or like this if need the other columns SELECT (number1 - (SELECT count(*) from table)),* from table
Yes, number2 is the count of the same table berso wrote: > luissol ha escrito: > > > Hi, I'm using informix but I need to get only new values of a table > > > > and what I need is a query that is something like this > > > > > > SELECT top (number1 - number2 ) * FROM table; > > > > where my variables are: > > number1 --> a variable that I know > > number2 --> select count(*) FROM table > > > > Thanks > > Luis Saavedra > > Is number2 a count(*) of the same table? > > any way i think you can still use this : > > SELECT (number1 - (SELECT count(*) from table)) from table > or like this if need the other columns > SELECT (number1 - (SELECT count(*) from table)),* from table