Query does not return data

  • Thread starter Thread starter Rose
  • Start date Start date
R

Rose

Can someone help me figure out why my query does not
return any data. The first time I ran it there was data
with all the fields, so I went into my SQL and removed an
* at the end of the SELECT statement and now it does not
return any names.
 
Can someone help me figure out why my query does not
return any data. The first time I ran it there was data
with all the fields, so I went into my SQL and removed an
* at the end of the SELECT statement and now it does not
return any names.

it would help a tiny-little-bit if you posted the query or an example of it
here

like: SELECT * FROM x,y WHERE x.field1 = y.field2

if you removed a * at the end of your select it might have looked like this:

SELECT * FROM x WHERE x.field1 LIKE "*miller*"

this will return every record containing the characters "miller" (e.g. "john
miller", "marie miller-hayes") in field1 of table x. If you remove the last
* you have "*miller". This will only return entries ending with "miller"
(e.g. "john miller")
___
mirco
 
Rose,

If you want your query to return data, you will need either to:

Put the * back in (it means that the query should return all data fields
which meet your selection criteria); i.e.,

Select * from MyTable where LastName = "Smith"

or

Individually name the fields you want returned; i.e.,

Select LastName, FirstName, PhoneNum from MyTable where LastName =
"Smith"


hth,
 
Back
Top