Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter...Error Message..Help!!!

Status
Not open for further replies.

vbjohn

Programmer
Joined
Aug 23, 2001
Messages
67
Location
US
I am getting this error message: The column prefix 'UPR30300' does not match with the table name or
alias name used in the query.

When I put in [COLOR=text=red](UPR30300.TRXENDDT = ?)[/color] I get the error message...

BUT!
When I put in [COLOR=text=red](UPR30300.TRXENDDT = '7/31/2001')[/color] I do not get the message...

I do need the ? in the query cause it is a parameter that the end user enters in to select a certain
record. The field [COLOR=text=red]TRXENDDT[/color] is a Date Field. BELOW is a sample of the query. Any help would be great.

==========================================================

SELECT DISTINCT
UPR00100.INACTIVE,
UPR00100.SOCSCNUM, UPR00100.EMPLOYID,
UPR00500.DEDUCTON,
ISNULL
((SELECT (UPR30300.UPRTRXAM * .06) AS Share
FROM UPR00100
WHERE UPR00100.EMPLOYID = UPR00500.EMPLOYID AND
UPR00100.EMPLOYID = UPR30300.EMPLOYID AND
UPR00500.DEDUCTON = '20UNCLP'), 0)
AS EmplrShare, UPR30300.CHEKNMBR,
UPR30300.PAYROLCD, UPR30300.PYRLRTYP,
UPR30300.TRXENDDT, UPR30300.UPRTRXAM
FROM UPR00100 INNER JOIN
UPR30300 ON
UPR00100.EMPLOYID = UPR30300.EMPLOYID LEFT OUTER JOIN
UPR00500 ON
UPR00100.EMPLOYID = UPR00500.EMPLOYID
WHERE (UPR00100.INACTIVE = 0) AND
(UPR00500.DEDUCTON = '20UNCLP') AND
(UPR30300.PAYROLCD = '1200') AND
[COLOR=text=red](UPR30300.TRXENDDT = ?)[/color] OR
(UPR00100.INACTIVE = 0) AND
(UPR00500.DEDUCTON = '20LEGP') AND
(UPR30300.PAYROLCD = '1200') AND
[COLOR=text=red](UPR30300.TRXENDDT = ?)[/color]
 
Is this Query part of a Stored Procedure? AL Almeida
NT/DB Admin
"May all those that come behind us, find us faithfull"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top