[thelist] ASP & SQL
Chris W. Parker
cparker at swatgear.com
Thu Sep 12 13:20:01 CDT 2002
> -----Original Message-----
> From: Erik Bennett [mailto:ebennett at ecasd.k12.wi.us]
> Sent: Thursday, September 12, 2002 11:07 AM
>
> location X's. Is it possible to get all of the records that
> match just John
> Doe at Location X?
i say build your query based on the information you DO have. for
example...
if you have all three variables, do something like this...
SELECT fname, lname, location
FROM employees
WHERE fname = <varFName> AND
lname = <varLName> AND
location = <varLocation>
alternatively, if you've only got First Name and Location to work
with...
SELECT fname, lname, location
FROM employees
WHERE fname = <varFName> AND
location = <varLocation>
and one more example (First Name, Last Name)...
SELECT fname, lname, location
FROM employees
WHERE fname = <varFName> AND
lname = <varLName>
this requires a little more scripting and maybe some If statements, but
i don't know enough about SQL to write a complete query that would do
the same thing.
hopefully i haven't led you astray.
chris.
More information about the thelist
mailing list