The following query will select only the 1st contact for each projID:
Select i.projID, c.contact
from ProjectInfo i left join ProjectContacts c
On i.projID = c.projID
Where c.Contact In (Select Top 1 contact From ProjectContacts where projID = i.projID)
With ActiveX, I run a qry to get a list of CustomerIDs. Then run a loop -- each time, pass one id into a sp and assign the return to a temp table. Then insert the data into an excel file (may split the data into more than one worksheets). If just one ID has been passed, it's ok. If multi IDs...
I did some similar works before. I set two steps for the job:
1. export data from the db table to the text file. The text file is located in a network drive.
2. use an FTP task to copy the file to an iis directory. Open the FTP task. Select Location tab. Select Directory as Source.
Type in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.