This topic is locked

Query Assistance - Any suggestions appreciated

3/2/2006 9:03:27 PM
ASPRunnerPro General questions
A
ashumak author

WHERE (((Results.MgrClosed)=#1/1/2001#) AND ((Results.LeadType)<>'Outbound -Telerep') AND ((Results.MonexNumber)=0))
Not getting the results I wish...any help with th right way to show the two things I want (MgrClosed and MonexNumber, and everything BUT Outbound - Telerep Leadtype?
thanks,
Alan

A
ashumak author 3/2/2006

Actually, making room for some additional stuff,
Access shoews this as a query:
WHERE (((Results.LeadType) Like "Inbound - Display" Or (Results.LeadType)="Paymentech" Or (Results.LeadType)="Inbound - Rental" Or (Results.LeadType)="Inbound Sale") AND ((Results.MonexNumber)=0) AND ((Results.MgrClosed)=#1/1/2001#));
But I get an error of:

Too few parameters. Expected 4.
form asprunner...
Any suggestions?
Alan

B
berkeleyjw 3/2/2006

Alan,
It would help if you showed the result set the way it comes out, and what the desired result set SHOULD look like.
If one of the subsets you want is "everything except Outbound - Telerep Leadtype", regardless of any other conditions, you would UNION this as a separate query to the other subset where you are looking for both the Results.MgrClosed and Results.MonexNumber conditions.
This is assuming you are trying to combine two subsets:
A. "everything except Outbound - Telerep Leadtype",

B. "Results.MgrClosed=0 AND and Results.MonexNumber=0
If subset B does not need BOTH conditions to be true, then use OR instead of AND (you probably know that already...)

Sergey Kornilov admin 3/2/2006

Alan,
turn debug info on (vDebug=true in include/commonfunctions.asp) and post the whole SQL query here.

A
ashumak author 3/3/2006

Alan,

turn debug info on (vDebug=true in include/commonfunctions.asp) and post the whole SQL query here.


It's not the asp pages with the problem...Leadrunner won't accept the query as is...
Alan

Sergey Kornilov admin 3/6/2006

Alan,
if you want to help me with the query post the whole SQL string, not only WHERE clause. Also post structure of all tables, which are included in this query.