I’m trying to build a workflow to sync datas from a SQL database to a MySQL database. We actually are using dbsync with XMLs files, it works but we would like to change to n8n.
I’m running a first query which give me about 18000 results on SQL Management Studio. When I’m using n8n with the same query, it returns : 1 item [ ]
What could be the reason ?
Thanks a lot for your help !
n8n version:1.21.1
Running n8n via (Docker, npm, n8n cloud, desktop app):npm
SELECT
CST.[No_],
[Name],
CASE
WHEN cst.[profil] = 0 AND cst.[Client Prime] = 0 AND cst.[Gen_ Bus_ Posting Group] <> 'DOMTOM' AND cst.safety = 0 THEN 3
WHEN cst.[profil] = 0 AND cst.[Client Prime] = 1 AND cst.[Gen_ Bus_ Posting Group] <> 'DOMTOM' AND cst.safety = 0 THEN 18
WHEN cst.[profil] = 1 THEN 4
WHEN cst.[profil] = 2 AND cst.safety = 0 THEN 5
WHEN CST.[Profil] = 3 AND cst.safety = 0 AND (cst.[Criteria 1] = 'DISTRIBUTEUR' OR CST.[Profil] = 3 AND cst.[Criteria 1] = 'CHAINE') THEN 8
WHEN CST.[Profil] = 3 AND cst.safety = 0 AND cst.[Criteria 1] = 'OPTICIEN' AND cst.[Client Prime] = 0 THEN 3
WHEN CST.[Profil] = 3 AND cst.[Criteria 1] = 'OPTICIEN' AND cst.[Client Prime] = 1 AND cst.safety = 0 THEN 18
WHEN CST.[Profil] = 3 AND cst.[Criteria 1] = 'AGENT' AND cst.[Client Prime] = 0 AND cst.safety = 0 THEN 3
WHEN CST.[Profil] = 3 AND cst.[Criteria 1] = 'AGENT' AND cst.[Client Prime] = 1 AND cst.safety = 0 THEN 18
WHEN cst.[profil] = 4 AND cst.[Client Prime] = 0 AND cst.[Gen_ Bus_ Posting Group] <> 'DOMTOM' AND cst.safety = 0 THEN 6
WHEN cst.[profil] = 5 THEN 7
WHEN cst.[profil] = 4 AND cst.[Client Prime] = 1 AND cst.[Gen_ Bus_ Posting Group] <> 'DOMTOM' AND cst.safety = 0 THEN 16
WHEN cst.[profil] = 16 AND cst.[Client Prime] = 1 AND cst.safety = 0 THEN 18
WHEN cst.[profil] = 17 AND cst.safety = 0 THEN 17
WHEN cst.[profil] = 4 AND cst.[Gen_ Bus_ Posting Group] = 'DOMTOM' AND cst.safety = 0 THEN 17
WHEN cst.[profil] = 0 AND cst.[Gen_ Bus_ Posting Group] = 'DOMTOM' AND cst.safety = 0 THEN 5
WHEN cst.[profil] = 6 AND cst.safety = 0 THEN 9
WHEN cst.[profil] = 7 AND cst.safety = 0 THEN 10
WHEN cst.[profil] = 0 AND cst.safety = 1 THEN 19
WHEN CST.[Profil] = 8 THEN 20
WHEN CST.[Profil] = 9 THEN 21
END AS [Profil],
CST.[Bill-to Customer No_],
CASE WHEN CST.[Language Code] IN ('', 'FRA', 'ES') THEN 1 ELSE 6 END AS [id_lang],
CST.[Trade Register],
CST.[APE Code],
RTRIM(LTRIM(CST.[E-mail])) AS [E-mail],
'' AS [Home Page],
CST.[Password],
CST.[Customer Price Group],
CST.[Criteria 6],
CAST(COALESCE(CPG.zone, 0) AS INT) AS discount_fieldno,
CST.[own_customer],
CASE WHEN CST.[Currency Code] = 'USD' THEN CST.[Currency Code] ELSE '' END AS currency_code
INTO [##Customern8n]
FROM [dbo].[Opal$Customer] CST
LEFT OUTER JOIN [Opal$Customer Price Group] CPG ON CST.[Customer Price Group] = CPG.Code
WHERE [E-mail] <> '' AND [Password] <> '' AND [Published] = 1
AND [E-Mail] LIKE '%@%'
Weird enough, I do have the same issue with this query on N8N, and when I paste it here I do have a 403 error as well. But, if I paste a bunch of lines, then some more, and then what’s left, I don’t have a 403