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

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -