didja try

select * from claimview where claimview.ParticipantID =
'#cookie.theviewuser#'

for your sql query?

....tony

r e v o l u t i o n w e b d e s i g n
[EMAIL PROTECTED]
www.revolutionwebdesign.com

its only looks good to those who can see bad as well
-anonymous

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 9:27 PM
To: CF-Talk
Subject: query a sql view

ok, I have a view created and I want to access it via my cfm page. Right
now the view just selects everything. I want to add a where statement so
it only selects certain records. Here is my query:

<cfquery name="getview" datasource="">
select * from claimview where ClaimsHeader.ParticipantID =
'#cookie.theviewuser#' </cfquery>

My error:
The column prefix 'ClaimsHeader' does ot match with a table name or
alias name used in the query.

And, here is my view (claimview) that I created:

SELECT TOP 100 PERCENT [view].ClaimsHeader.claimid AS claimsheaderid,
[view].ClaimsHeader.InvoiceNum, [view].ClaimsHeader.PromotionID,
[view].ClaimDetails.ModelID, [view].Transactions.ClaimDetailID,
[view].Transactions.DollarValue, [view].Transactions.Bonus,
[view].Transactions.CheckID, [view].ClaimDetails.ClaimDetailID AS
claimdetailsid, [view].ClaimDetails.ClaimID,
[view].ClaimsHeader.ParticipantID FROM [view].Transactions INNER JOIN
[view].ClaimDetails INNER JOIN [view].ClaimsHeader ON
[view].ClaimDetails.ClaimID = [view].ClaimsHeader.claimid ON
[view].Transactions.ClaimDetailID = [view].ClaimDetails.ClaimDetailID

I actually have two questions...1) why am I getting the error when
claimsheader is in the query and 2) I need to select all records in
claimsheader that meet my criteria, not just the ones where
claimdetails.claimdetailid = transactions.claimdetailid. So even if
there isn't a match between those 2, I still need the record from
claimdetails. Does this make any sense?

Thanks!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to