![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have a problem with a Query in my Package. It works fine with a stored procedure but it quits SQL Enterprise when I use it into a DataPumpTask. It seems it's the Count function. It bugs when I use the ? as parameter with memory read error, but if I set a fixed value, it works. Thanks for your help Stan SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, NB=(SELECT COUNT(*) FROM A_LOGCLIENTS INNER JOIN A_CLIENTS ON A_CLIENTS.IDCLIENT=A_LOGCLIENTS.IDCLIENT WHERE A_LOGCLIENTS.idclient = TT.idclient) FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? |
#3
| |||
| |||
|
|
The design time interface is a little fragile. I would use a query with the same metadata to build my datapump so SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, 'NB' as NB FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? You can then do you parameter mapping and transformation mapping. Now go to Disconnected Edit and replace the SourceSQLStatement property of the DataPump task with the correct one. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message news:e4ca0sA4DHA.1592 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Hi, I have a problem with a Query in my Package. It works fine with a stored procedure but it quits SQL Enterprise when I use it into a DataPumpTask. It seems it's the Count function. It bugs when I use the ? as parameter with memory read error, but if I set a fixed value, it works. Thanks for your help Stan SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, NB=(SELECT COUNT(*) FROM A_LOGCLIENTS INNER JOIN A_CLIENTS ON A_CLIENTS.IDCLIENT=A_LOGCLIENTS.IDCLIENT WHERE A_LOGCLIENTS.idclient = TT.idclient) FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? |
#4
| |||
| |||
|
|
Thanks Allan But when I do it I get an Exception Access Violation when I run the package. Stan "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> a écrit dans le message de news:ehjFrzA4DHA.2132 (AT) TK2MSFTNGP10 (DOT) phx.gbl... The design time interface is a little fragile. I would use a query with the same metadata to build my datapump so SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, 'NB' as NB FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? You can then do you parameter mapping and transformation mapping. Now go to Disconnected Edit and replace the SourceSQLStatement property of the DataPump task with the correct one. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message news:e4ca0sA4DHA.1592 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Hi, I have a problem with a Query in my Package. It works fine with a stored procedure but it quits SQL Enterprise when I use it into a DataPumpTask. It seems it's the Count function. It bugs when I use the ? as parameter with memory read error, but if I set a fixed value, it works. Thanks for your help Stan SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, NB=(SELECT COUNT(*) FROM A_LOGCLIENTS INNER JOIN A_CLIENTS ON A_CLIENTS.IDCLIENT=A_LOGCLIENTS.IDCLIENT WHERE A_LOGCLIENTS.idclient = TT.idclient) FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? |
#5
| |||
| |||
|
|
What SP level are you at (select @@version) -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message news:eoESlKB4DHA.488 (AT) TK2MSFTNGP12 (DOT) phx.gbl... Thanks Allan But when I do it I get an Exception Access Violation when I run the package. Stan "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> a écrit dans le message de news:ehjFrzA4DHA.2132 (AT) TK2MSFTNGP10 (DOT) phx.gbl... The design time interface is a little fragile. I would use a query with the same metadata to build my datapump so SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, 'NB' as NB FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? You can then do you parameter mapping and transformation mapping. Now go to Disconnected Edit and replace the SourceSQLStatement property of the DataPump task with the correct one. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message news:e4ca0sA4DHA.1592 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Hi, I have a problem with a Query in my Package. It works fine with a stored procedure but it quits SQL Enterprise when I use it into a DataPumpTask. It seems it's the Count function. It bugs when I use the ? as parameter with memory read error, but if I set a fixed value, it works. Thanks for your help Stan SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, NB=(SELECT COUNT(*) FROM A_LOGCLIENTS INNER JOIN A_CLIENTS ON A_CLIENTS.IDCLIENT=A_LOGCLIENTS.IDCLIENT WHERE A_LOGCLIENTS.idclient = TT.idclient) FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? |
#6
| |||
| |||
|
|
8.00.760 (Intel X86) 12/17/2002 Stan "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> a écrit dans le message de news:OyDPnNB4DHA.2348 (AT) TK2MSFTNGP10 (DOT) phx.gbl... What SP level are you at (select @@version) -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message news:eoESlKB4DHA.488 (AT) TK2MSFTNGP12 (DOT) phx.gbl... Thanks Allan But when I do it I get an Exception Access Violation when I run the package. Stan "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> a écrit dans le message de news:ehjFrzA4DHA.2132 (AT) TK2MSFTNGP10 (DOT) phx.gbl... The design time interface is a little fragile. I would use a query with the same metadata to build my datapump so SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, 'NB' as NB FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? You can then do you parameter mapping and transformation mapping. Now go to Disconnected Edit and replace the SourceSQLStatement property of the DataPump task with the correct one. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message news:e4ca0sA4DHA.1592 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Hi, I have a problem with a Query in my Package. It works fine with a stored procedure but it quits SQL Enterprise when I use it into a DataPumpTask. It seems it's the Count function. It bugs when I use the ? as parameter with memory read error, but if I set a fixed value, it works. Thanks for your help Stan SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, NB=(SELECT COUNT(*) FROM A_LOGCLIENTS INNER JOIN A_CLIENTS ON A_CLIENTS.IDCLIENT=A_LOGCLIENTS.IDCLIENT WHERE A_LOGCLIENTS.idclient = TT.idclient) FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? |
#7
| |||
| |||
|
|
There are some hotfixes out on the MS site to take you to Microsoft SQL Server 2000 - 8.00.818 (Intel X86) May 31 2003 16:08:15 Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4) That shouldn't make this difference here. So even after entering the SourceSQLStatement how I said it does this? This is at runtime right or design time? -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message news:OLWzUVB4DHA.1592 (AT) TK2MSFTNGP10 (DOT) phx.gbl... 8.00.760 (Intel X86) 12/17/2002 Stan "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> a écrit dans le message de news:OyDPnNB4DHA.2348 (AT) TK2MSFTNGP10 (DOT) phx.gbl... What SP level are you at (select @@version) -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message news:eoESlKB4DHA.488 (AT) TK2MSFTNGP12 (DOT) phx.gbl... Thanks Allan But when I do it I get an Exception Access Violation when I run the package. Stan "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> a écrit dans le message de news:ehjFrzA4DHA.2132 (AT) TK2MSFTNGP10 (DOT) phx.gbl... The design time interface is a little fragile. I would use a query with the same metadata to build my datapump so SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, 'NB' as NB FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? You can then do you parameter mapping and transformation mapping. Now go to Disconnected Edit and replace the SourceSQLStatement property of the DataPump task with the correct one. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message news:e4ca0sA4DHA.1592 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Hi, I have a problem with a Query in my Package. It works fine with a stored procedure but it quits SQL Enterprise when I use it into a DataPumpTask. It seems it's the Count function. It bugs when I use the ? as parameter with memory read error, but if I set a fixed value, it works. Thanks for your help Stan SELECT DISTINCT A_CLIENTS.idclient, CAST(A_CLIENTS.CLICODE AS VARCHAR) AS CLICODE, ISNULL(A_CLIENTS.CLIEMAIL, '') AS CLIEMAIL, A_CLIENTS.CLIMDP, TT.LOGDATE, NB=(SELECT COUNT(*) FROM A_LOGCLIENTS INNER JOIN A_CLIENTS ON A_CLIENTS.IDCLIENT=A_LOGCLIENTS.IDCLIENT WHERE A_LOGCLIENTS.idclient = TT.idclient) FROM A_CLIENTS LEFT OUTER JOIN A_LOGCLIENTS TT ON A_CLIENTS.IDCLIENT = TT.IDCLIENT WHERE A_CLIENTS.IDSOCIETE = ? |
![]() |
| Thread Tools | |
| Display Modes | |
| |