DataFanatic
MIS
I am trying to use a field in a table to provide the variable for this query. I get an error: "The column prefix 'tblvdte' does not match with a table name or alias name used in the query."
I have searched the error and found little to aid me.
Here is the query:
declare @rundte as int
set @rundte = tblvdte.rundte
SELECT cast(SUM(RDSIZE * RDNPPB)+.05 as int) AS SCHED,
cast(SUM(RDSIZE * RDNEPB)+.05 as int) AS Prod
FROM RMODELT1 join tblvdte on
rmodelt1.rdpmnm <> tblvdte.rundte
WHERE (RDRSDT = @rundte) AND (RDPMNM < '01999')
Can someone give some direction as to how to accomplish this.
I have searched the error and found little to aid me.
Here is the query:
declare @rundte as int
set @rundte = tblvdte.rundte
SELECT cast(SUM(RDSIZE * RDNPPB)+.05 as int) AS SCHED,
cast(SUM(RDSIZE * RDNEPB)+.05 as int) AS Prod
FROM RMODELT1 join tblvdte on
rmodelt1.rdpmnm <> tblvdte.rundte
WHERE (RDRSDT = @rundte) AND (RDPMNM < '01999')
Can someone give some direction as to how to accomplish this.