Thursday, March 29, 2012

Correct syntax

Hello

I have having trouble displaying some simple columns in ascending order.

I know that the database is populated and I can get the more complex code to work if I display like this:

SELECT FName, LName, Town, '<a href="http://links.10026.com/?link=' + url + '">' + Site + '</a>' as Link
FROM Names_DB
WHERE FName = 'Tom'
And url like 'http:%'
ORDER BY LName ASC

But I need a simpler view but I can't get it to work

I have tried this:

SELECT FName, LName

FROM Names_DB

ORDER BY LName ASC

And this

SELECT FName, LName

FROM Names_DB

ORDER BY LName ASC;

And This:

SELECT FName, LName
FROM Names_DB

ORDER BY LName 'ASC'

What is wrong with this syntax?

Thanks

Lynn

Change 'ASC' to ASC,it works well.|||

Hi Jason

Thanks for the reply and the info.

I have been trying various combinations to get it to work. At last I have eventually found a syntax that works also, about the same time I got your reply.

I just put : after the ORDER BY

ORDER BY: LName ASC

How frustrating searching for the single character to make everything happen.

Lynn

No comments:

Post a Comment