Query does not return data

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.
 
M

Mirco Wilhelm

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
 
C

Cheryl Fischer

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top