0

Time for problem #2!

I would like to display only those records in the database with a certain field beginning with a specific letter.

The connection string I normally use to display records is:

strSQL = "SELECT TOP 5 * FROM Reviews ORDER BY Artist DESC"

How do I change this to only display records where the Artist field in the db starts with (for example) the letter A?

Can it be done?

Thanks once again,

Ian

4

1 回答 1

0

首先,这不是一个经典的 ASP 问题,而是一个 SQL 问题。其次,这不是连接字符串......

无论如何,解决方案将取决于您的数据库,因为不同系统实现 SQL 的方式可能会略有不同。

SELECT TOP 5 * FROM Reviews WHERE Artist LIKE 'A%' ORDER BY Artist DESC
于 2013-04-26T19:01:40.073 回答