SQL Server 2008 select top 1 row from multiple tables? -


I have a table that stores articles, for example:

article table:

id # class # text # date # date

So on the page I have different sections and each section has its own ID. For example, the game is 1, news 2 etc.

Now I want the possibility of loading the latest article from the X number of categories.

So now the question is how can I choose the latest inclusive articles from categories in Natura?

I used to get in the table of ID using the Arrest-to-Table of Erand Somerskog ()

Generally I select articles from several categories to Using something like:

  SELECT was published article, title, category ID, stenography, date from article where article = 3 and category IID (selection i.number From iter_intlist_to_tbl (@ categories) as i) Date published by DESC  
< P> But what sort of categories do I choose from only the old article?

  select one. * From iter_intlist_to_tbl (@ categories) I do not have any of this by the external application (select top 1 * article where the range is id = i. And paragraph 3 = 3, then from each category, or  NULL <  

article in a category.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -