I wrote a query in SQL that i'd like to turn into a crystal report for Workplace (it also reads data from some GP Tables). However, going off the Stored Procedures that are out there for current reports, they seem incredibly complex for what i'm trying to do. I've never written a stored procedure before, however, so i'm not sure if that is the norm.
Here's my query:
Select D.[POPRCTNM],A.[edfPOnumber],A.[edfitem],A.[edfitemdesc],A.[edfamtextended],C.[actnumst], E.[vendname], F.[DSCRIPTN]
From [CA].[dbo].[rqdetail] A inner join [CA].[dbo].[RQHeader] B
on A.idfrqheaderkey = b.idfrqheaderkey
left outer join [CA].[dbo].[GL00105] C
on A.edfgl=c.actindx
left outer join [ca].[dbo].[gl40200] F
on C.[actnumbr_3] = F.[sgmntid]
left outer join [CA].[dbo].[POP10310] D
on A.[edfPOnumber]=D.[POnumber] and a.[edfpoline]=d.[rcptlnnm]
left outer join [ca].[dbo].[pm00200] E
on A.[edfvendor] = E.[vendorID]
where f.[sgmtnumb] = 3
it's pretty basic, aside from hitting quite a few tables. I hope somebody can help!
Here's my query:
Select D.[POPRCTNM],A.[edfPOnumber],A.[edfitem],A.[edfitemdesc],A.[edfamtextended],C.[actnumst], E.[vendname], F.[DSCRIPTN]
From [CA].[dbo].[rqdetail] A inner join [CA].[dbo].[RQHeader] B
on A.idfrqheaderkey = b.idfrqheaderkey
left outer join [CA].[dbo].[GL00105] C
on A.edfgl=c.actindx
left outer join [ca].[dbo].[gl40200] F
on C.[actnumbr_3] = F.[sgmntid]
left outer join [CA].[dbo].[POP10310] D
on A.[edfPOnumber]=D.[POnumber] and a.[edfpoline]=d.[rcptlnnm]
left outer join [ca].[dbo].[pm00200] E
on A.[edfvendor] = E.[vendorID]
where f.[sgmtnumb] = 3
it's pretty basic, aside from hitting quite a few tables. I hope somebody can help!