You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hi,
I want to convert the following request using MSSqlIntput, tMap and tMSSqlOutput :
UPDATE CRM_COORD
SET CRM_COORD.ID_CRM = Z_CRM_DEDUP_XXX.ID_CRM
FROM CRM_COORD,Z_CRM_DEDUP_XXX
WHERE CRM_COORD.ID_CRM = -1 AND CRM_COORD.CD_SOURCE = 'DOL'
AND CRM_COORD.ID_SOURCE = Z_CRM_DEDUP_XXX.ID_SOURCE
I have succeeded using a tMSSqlRow (see screenshots) but I'd prefer to use a tMSSqlOutput
Here are the create statement of table CRM_COORD and Z_CRM_DEDUP_XXX
CREATE TABLE [dbo].[Z_CRM_DEDUP_XXX](
[ID] [int] NULL,
[ID_CRM] [int] NOT NULL,
[CD_SOURCE] [char](3) NOT NULL,
[ID_SOURCE] [int] NULL,
[email][varchar](128) NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[CRM_COORD](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ID_CRM] [int] NOT NULL,
[CD_SOURCE] [char](3) NOT NULL,
[ID_SOURCE] [int] NOT NULL,
[CD_MARQUE] [char](3) NULL,
[ADR1] [varchar](50) NULL,
[ADR2] [varchar](50) NULL,
[ADR3] [varchar](50) NULL,
[ADR4] [varchar](50) NULL,
[CP] [varchar](10) NULL,
[VILLE] [varchar](50) NULL,
[PAYS] [varchar](50) NULL,
[TEL] [varchar](20) NULL,
[MOB] [varchar](20) NULL,
[FAX] [varchar](20) NULL,
[email][varchar](128) NULL,
[IS_DELETED] [bit] NULL,
[ID_DOMAINE] [smallint] NULL,
[IS_DOMAINE_PERSONNEL] [char](1) NULL,
CONSTRAINT [PK_CRM_COORD] PRIMARY KEY CLUSTERED
(
[ID_CRM] ASC,
[CD_SOURCE] ASC,
[ID_SOURCE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [IX_CRM_COORD] UNIQUE NONCLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
thanks for your help,
Didier
Last edited by dchambon (2012-05-04 11:06:49)
Offline

Hi
I think what you configure in tMap is correct.
Judging from your update sql statement, the query of tMSSQLInput seems to be wrong.
There should be no 'where ID_CRM <>-1'.
Regards,
Pedro
Offline
Thanks Pedro, I've made the correction
I've replaced the tMSSqlRow with a tMSSqlOutput (see screenshots)
In the designer the number of rows are correct but none are commited
How can I see the details of the error from tMSSqlOutput
-------------------
| x Error! |
-------------------
| |
| |
|"CRM_COORD"|
-------------------
Offline

Hi
Is there any errors occurred on console?
Do you select the option 'Using an existing connection?
Is there a tMSSQLCommit component in your job?
Regards,
Pedro
Offline
pedro wrote:
Hi
Is there any errors occurred on console?
There was no error on console
Do you select the option 'Using an existing connection?
forgot to do it ... but with the option select same result
now I have the following error on console :
incorrect syntaxe near ')'.
Is there a tMSSQLCommit component in your job?
no, I use a tMSSqlConnection with "Auto Commit" on
Regards,
Didier
Offline

Hi Didier
According to this error on console, please click on 'Code' tag and show us the rows with red underline.
There must be some wrong settings in this job.
Regards,
Pedro
Offline
Pedro,
I've found the problem :
I was focusing on the "Advanced settings" of the tMSSqlOutput while on "Basic settings", "Action on data" was set to "Insert" instead of "Update" ...
Best regards,
Didier
Offline
Pages: 1