Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2000 doesn't like default % value

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
I am building a search functionality in Ultradev against a SQL Server 2000 database. I am attempting to search one table with 53000 records, but when I add my WHERE statement the Recordset that is built doesn't contain all 53000 records. The application is only return some of the 53000 records. SQL does not appear to like my % default value that I gave each of the variables. I would greatly appreciate some insight into why SQL doesn't like my default values and what default values SQL Server likes? My SQL Statement is:

SELECT *
FROM dbo.SURVEY
WHERE NAME LIKE 'varName' AND LOT LIKE 'varLot' AND BLOCK LIKE 'varBlock' AND COMPANY LIKE 'varCompany' AND SURVEYOR LIKE 'varSurveyor' AND QUARTER LIKE 'varQuarter' AND SECT LIKE 'varSection' AND TOWNSHIP LIKE 'varTownship' AND RANGE LIKE 'varRange'
ORDER BY NAME ASC
 
Hi

When you use a where clause you invariably get less records back than the total number in the table. Are you expecting to get every one of the 53K records returned from that statement, or is the table a lot larger than 53000 records? Derren
[Mediocre talent - spread really thin]
 
Not too clued up with SQL server, but in this case wouldn't you be better trying to create the SQL query in the Server app first and using that as your selected table connection in the UD recordset query. All the coding that UD generates that isn't terribly compatible with ASP, SQL and MS database-speak would then be academic?

M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top