myquery s.Table

E

Erik

Hi,

i have an sql that starts like thi

sSelect = "s.*

how can i define that only spesific records are to be chosen?

Erik
 
J

John Vinson

Hi,

i have an sql that starts like this

sSelect = "s.*"

how can i define that only spesific records are to be chosen?

Erik

By adding a WHERE clause:

"select s.* FROM tablename AS S WHERE s.ThisField = 3 and s.ThatField
= 'Desired Text' and s.Datefield = #3/1/2004#"

You may want to create the query in the Query Design grid selecting
the desired fields and records (the s.* syntax is not always a good
idea, specific fields will be more efficient) and view the SQL of the
query as a model for building your string.
 

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