[thelist] RE: writing a productive search query
Brian Cummiskey
Brian at hondaswap.com
Fri Mar 4 15:16:37 CST 2005
I just spoke to the client, so its time for an update on this.
for those who missed the earlier discussions (relevent threads):
http://lists.evolt.org/archive/Week-of-Mon-20050228/169956.html
http://lists.evolt.org/archive/Week-of-Mon-20050228/169983.html
http://lists.evolt.org/archive/Week-of-Mon-20050228/169994.html
After much talk about how they want the results, we came up with this
solution:
Search based on last name and state
-If results, display reults, let agent choose correct one or add a new one
-If no results, search based on phone number
-If results, display reults, let agent choose correct one or add a new one
Now, my question is this- for the sake of time, I would like to
automate the process. (The name/state/phone number are all entered
before any query is fired off.)
If there's no results for name/state, fire off the phone query.
I know this can be done several ways, but i'm just not sure which would
be the most productive.
Environment i'm working in is classic ASP/MS SQL 7.
Options I came up with:
A-
Inline SQL on the asp page,
fire off query a
if rst.eof then fire off queryb
display results.
B-
call stored procedure which fires off query A
if it returns nothing (test for @@identity or something?) continue to
query B else return
C -
call stored procedure which fires off query A
if it returns nothing, call SP2 which holds query2
D- pull both querys at once, and only display name/state matches first
I'm sure there's probably several other ways too.
What would you do? would you make the process seemeles to your phone
agent, or would you want them to fire-off manually a 2nd search/lookup
if there are no last names from such a state in the table?
Thanks in advance
-Brian
More information about the thelist
mailing list