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 not 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]

