We have copied a stored procedure created by another company to use for a report in crystal reports, which then runs from a software. All we need to do is add a column. We added
ACO varchar(10) NULL
within
create table #WorksheetAmounts
Then we added the following:
insert into #WorksheetAmounts
(JCCo, Contract, Item, ChangeOrderAmt, ChangeOrderUnits, BillGroup, ACO)
Select
JCOI.JCCo, JCOI.Contract, JCOI.Item, JCOI.ContractAmt,
JCOI.ContractUnits, JCOI.BillGroup, JCOI.ACO
From
JCOH
Join
JCOI on JCOH.JCCo = JCOI.JCCo AND JCOH.Job = JCOI.Job AND JCOH.ACO = JCOI.ACO
where
JCOI.JCCo = @JCCo
and JCOI.Contract >= @BeginContract
and JCOI.Contract <= @EndContract
and JCOI.ACO = JCOH.ACO
--and JCOH.ApprovalDate <= @COThroughDate
Group by
JCOI.JCCo, JCOI.Contract, JCOI.Item, JCOI.ContractAmt,
JCOI.ContractUnits, JCOI.ContUnitPrice, JCOI.BillGroup, JCOI.ACO
When we use the stored procedure in Crystal Reports (through the database expert) the new ACO
field is not there. We are clearly missing something, but I am unsure what.
I am new to SQL Server, so this is probably something super simple. Any help is appreciated!