Hi all,
I've created a database with 1 table, Articles. In that table, there are 4
colmns: ArticleID(autonumber), Title, XMLFile and Date(date/time).
I want to write an SQL command to get only the newest entries. How can I
solve this?
Thanks,
Vincent
Hi
The following query will return the last 10 rows in the table, ordered by
date, with the newest row first.
SELECT
TOP 10
ArticleID,
Title,
XMLFile,
Date
FROM
dbo.Articles
ORDER BY
Date DESC
Regards
Mike
"JJ" wrote:
> Hi all,
> I've created a database with 1 table, Articles. In that table, there are 4
> colmns: ArticleID(autonumber), Title, XMLFile and Date(date/time).
> I want to write an SQL command to get only the newest entries. How can I
> solve this?
> Thanks,
> Vincent
>
>
Showing posts with label autonumber. Show all posts
Showing posts with label autonumber. Show all posts
Wednesday, March 7, 2012
Only the newest articles
Hi all,
I've created a database with 1 table, Articles. In that table, there are 4
colmns: ArticleID(autonumber), Title, XMLFile and Date(date/time).
I want to write an SQL command to get only the newest entries. How can I
solve this?
Thanks,
VincentHi
The following query will return the last 10 rows in the table, ordered by
date, with the newest row first.
SELECT
TOP 10
ArticleID,
Title,
XMLFile,
Date
FROM
dbo.Articles
ORDER BY
Date DESC
Regards
Mike
"JJ" wrote:
> Hi all,
> I've created a database with 1 table, Articles. In that table, there are 4
> colmns: ArticleID(autonumber), Title, XMLFile and Date(date/time).
> I want to write an SQL command to get only the newest entries. How can I
> solve this?
> Thanks,
> Vincent
>
>
I've created a database with 1 table, Articles. In that table, there are 4
colmns: ArticleID(autonumber), Title, XMLFile and Date(date/time).
I want to write an SQL command to get only the newest entries. How can I
solve this?
Thanks,
VincentHi
The following query will return the last 10 rows in the table, ordered by
date, with the newest row first.
SELECT
TOP 10
ArticleID,
Title,
XMLFile,
Date
FROM
dbo.Articles
ORDER BY
Date DESC
Regards
Mike
"JJ" wrote:
> Hi all,
> I've created a database with 1 table, Articles. In that table, there are 4
> colmns: ArticleID(autonumber), Title, XMLFile and Date(date/time).
> I want to write an SQL command to get only the newest entries. How can I
> solve this?
> Thanks,
> Vincent
>
>
Subscribe to:
Posts (Atom)