SQL select until full sort of problem -
I am trying to write some SQL which pulls from several tables using unions, where the rows date one hour Less than.
But if the total rows from the SQL query do not add up to about 20, then it should be changed until the date of less than two lines and until it reaches 20 rows.
Is it possible to do this only in SQL? I have a way of implementing it using PHP, but it has been done in SQL.
SQL Server
SELECT Top 20 ..
Other DB
SELECT .. LIMIT 0, 20
Comments
Post a Comment