![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Sorry for reposting a similar message but I really need help. I have a query that looks like that : SELECT DISTINCT A_CLIENTS.idclient, A_CLIENTS.CLICODE, A_CLIENTS.CLIEMAIL, FROM A_CLIENTS WHERE A_CLIENTS.IDSOCIETE=@idsociete AND TT.LOGDATE<@ddate I would like to generate a xls file from a DTS with the result of this query. But I don't know how to pass the parameters @idsociete and @ddate Also this dts must be called from a stored procedure. Thanks for your help Stan |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Thanks Allan for your post. I ve tried what you ve said but I still have a problem.. In fact my sproc was not completed and it blocks when I change the @variables with ? The completed sproc is : SELECT DISTINCT A_CLIENTS.idclient, A_CLIENTS.CLICODE, A_CLIENTS.CLIEMAIL, nb=(SELECT COUNT(*) FROM A_LOGCLIENTS WHERE A_LOGCLIENTS.IDCLIENT=A_CLIENTS.clientid) FROM A_LOGCLIENTS INNER JOIN A_CLIENTS ON A_CLIENTS.idclient=A_LOGCLIENTS.idclient WHERE A_CLIENTS.IDSOCIETE=@societe AND A_LOGCLIENTS.logdate<@ddate I get an error message on the Count statement when I change the @societe and @ddate by ? * By the way, the SQL Query must saved in a Sproc right or just to be used when I create the query for the DTS ? * How can I called this DTS from an another Sproc and pass the different parameters ? * And last question, when I param the Query for the DTS, I want to export the result as a excel file. I don't have problems for that, but, I would like to add dynamically a path for the result file. How can I do that ? Thanks again for your help Stan |
![]() |
| Thread Tools | |
| Display Modes | |
| |