Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a sql view and then linking to tables in Crystal

Status
Not open for further replies.

aud9

Programmer
Nov 5, 2003
7
US
Ok... I tried this. I created this view... which appear to work.

SELECT PCONO, PCSNO, CONVERT(char(1), PCONO) + '-' + CONVERT(char(10), PCSNO) AS cvcust
FROM dbo.PRFITM

Then I added it to this view.... to select the new view ... so that I could then link within the crystal report...

SELECT TOP 100 PERCENT dbo.PRFITM.PCONO, dbo.PRFITM.PCSNO, dbo.PRFITM.PITNO, dbo.ITMST.IMITD1, dbo.PRFITM.PITGL, dbo.PRFITM.PITCL,
dbo.PRFITM.PITSC, dbo.PRFITM.PUNIQ, dbo.PRFITM.PPSEQ, dbo.PRFITM.PACCS, dbo.PRFITM.PMONT, dbo.PRFITM.PPERD, dbo.PRFITM.PLSPI,
dbo.PRFITM.PGRSL, dbo.PRFITM.PTOSR, dbo.PRFITM.PCOGS, dbo.PRFITM.PCOGR, dbo.PRFITM.PTOGP, dbo.PRFITM.PDIIN, dbo.PRFITM.PMNIN,
dbo.PRFITM.PARTM, dbo.PRFITM.PAPTM, dbo.PRFITM.PAJGP, dbo.customer_num_convert.cvcust
FROM dbo.PRFITM INNER JOIN
dbo.ITMST ON dbo.PRFITM.PITNO = dbo.ITMST.IMITNO INNER JOIN
dbo.customer_num_convert ON dbo.PRFITM.PCONO = dbo.customer_num_convert.PCONO AND
dbo.PRFITM.PCSNO = dbo.customer_num_convert.PCSNO
WHERE (dbo.PRFITM.PPERD > 200200)
ORDER BY dbo.PRFITM.PCONO, dbo.PRFITM.PCSNO, dbo.PRFITM.PITNO

(this times out when it runs on screen... but it seems to be OK.... however when I attempt to link within crystal... something is not working correctly.) It links... however... when I attempt to add fields it seems to spin out of control.

HELP!!!!! Please....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top