Special Characters in Execute Query Database Activities

Hello there!

I have a problem using the Execute Query activity with special characters such as “ü,ğ”. I have a WHERE statement in my query which contains these characters and when I execute it, the only thing being returned is an empty data table with its headers.

Any solutions for this?

Hi @efegemensen

Could you maybe provide a sample query that you are using?

For extra information, the Database activity source code is available here, in case you want to have a look yourself at what is wrong :slight_smile:

(I’ll also mark it as #pr-welcome in case some other community member wants to contribute)

Sure,

This is the one that works:

SELECT CONCAT (p.pkey, CONCAT (‘-’, i.issuenum)) AS ID,

t.PNAME,

s.pname AS Durum,

r.pname COZUMDURUMU,

i.summary,

u.FIRST_NAME || ’ ’ || u.LAST_NAME Atanacak_Kisi,

v5.STRINGVALUE Mudurluk,

CASE

WHEN t.PNAME = ‘Geliştirme Talebi’ THEN a.APP_CATALOG_CODE

WHEN t.PNAME = ‘Operasyonel Talep’ THEN otl.CODE

END UYGULAMAKODU,

otl.ID,

i.CREATED,

i.RESOLUTIONDATE,

v6.DATEVALUE STDEGERLENDIRMETARIHI

FROM SDLC_JIRA.JIRAISSUE i

LEFT JOIN SDLC_JIRA.PROJECT p ON p.ID = i.PROJECT

LEFT JOIN SDLC_JIRA.ISSUESTATUS s ON s.ID = i.issuestatus

LEFT JOIN SDLC_JIRA.RESOLUTION r ON r.ID = i.resolution

LEFT JOIN SDLC_JIRA.ISSUETYPE t ON t.ID = i.issuetype

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 32965) v

ON i.ID = v.ISSUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 31301) v2

ON i.ID = v2.ISSUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 10094) v3

ON i.ID = v3.ISSUE

LEFT JOIN

(SELECT CONCAT (p.pkey, CONCAT (‘-’, a.issuenum)) AS ID,

c.APP_CATALOG_CODE CODE

FROM SDLC_JIRA.JIRAISSUE a

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 32965) b

ON a.ID = b.ISSUE

LEFT JOIN SDLC_JIRA.PROJECT p ON p.ID = a.PROJECT

LEFT JOIN SDLC_COMMON.IBS_ASSET c ON c.ID = b.STRINGVALUE

WHERE a.ISSUETYPE = 12003) otl

ON CAST (v2.TEXTVALUE AS VARCHAR2 (50)) = otl.ID

LEFT JOIN SDLC_COMMON.IBS_ASSET a ON a.ID = v.STRINGVALUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 17000) v4

ON i.ID = v4.ISSUE

LEFT JOIN (SELECT DISTINCT LOWER_USER_NAME, FIRST_NAME, LAST_NAME

FROM SDLC_JIRA.CWD_USER

WHERE DIRECTORY_ID = 10400) u

ON u.LOWER_USER_NAME = v4.STRINGVALUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 33165) v5

ON i.ID = v5.ISSUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 33177) v6

ON i.ID = v6.ISSUE

WHERE i.issuetype IN (10005)

–AND v5.STRINGVALUE = ‘Uygulama Destek Müdürlüğü – 1’;

And this is the one that does not:

SELECT CONCAT (p.pkey, CONCAT (‘-’, i.issuenum)) AS ID,

t.PNAME,

s.pname AS Durum,

r.pname COZUMDURUMU,

i.summary,

u.FIRST_NAME || ’ ’ || u.LAST_NAME Atanacak_Kisi,

v5.STRINGVALUE Mudurluk,

CASE

WHEN t.PNAME = ‘Geliştirme Talebi’ THEN a.APP_CATALOG_CODE

WHEN t.PNAME = ‘Operasyonel Talep’ THEN otl.CODE

END UYGULAMAKODU,

otl.ID,

i.CREATED,

i.RESOLUTIONDATE,

v6.DATEVALUE STDEGERLENDIRMETARIHI

FROM SDLC_JIRA.JIRAISSUE i

LEFT JOIN SDLC_JIRA.PROJECT p ON p.ID = i.PROJECT

LEFT JOIN SDLC_JIRA.ISSUESTATUS s ON s.ID = i.issuestatus

LEFT JOIN SDLC_JIRA.RESOLUTION r ON r.ID = i.resolution

LEFT JOIN SDLC_JIRA.ISSUETYPE t ON t.ID = i.issuetype

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 32965) v

ON i.ID = v.ISSUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 31301) v2

ON i.ID = v2.ISSUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 10094) v3

ON i.ID = v3.ISSUE

LEFT JOIN

(SELECT CONCAT (p.pkey, CONCAT (‘-’, a.issuenum)) AS ID,

c.APP_CATALOG_CODE CODE

FROM SDLC_JIRA.JIRAISSUE a

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 32965) b

ON a.ID = b.ISSUE

LEFT JOIN SDLC_JIRA.PROJECT p ON p.ID = a.PROJECT

LEFT JOIN SDLC_COMMON.IBS_ASSET c ON c.ID = b.STRINGVALUE

WHERE a.ISSUETYPE = 12003) otl

ON CAST (v2.TEXTVALUE AS VARCHAR2 (50)) = otl.ID

LEFT JOIN SDLC_COMMON.IBS_ASSET a ON a.ID = v.STRINGVALUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 17000) v4

ON i.ID = v4.ISSUE

LEFT JOIN (SELECT DISTINCT LOWER_USER_NAME, FIRST_NAME, LAST_NAME

FROM SDLC_JIRA.CWD_USER

WHERE DIRECTORY_ID = 10400) u

ON u.LOWER_USER_NAME = v4.STRINGVALUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 33165) v5

ON i.ID = v5.ISSUE

LEFT JOIN (SELECT *

FROM SDLC_JIRA.CUSTOMFIELDVALUE

WHERE CUSTOMFIELD = 33177) v6

ON i.ID = v6.ISSUE

WHERE i.issuetype IN (10005)

AND v5.STRINGVALUE = ‘Uygulama Destek Müdürlüğü – 1’;

The only difference is the “–” characters before the AND statement at the end.

Thanks.

Have you ever managed to solve it? Could it be something in the SQL query itself and related to this topic solution?

Hey, I solved it by filtering the table inside UiPath instead of the query itself by excluding the where statement. When I realized I could just get away with it, I didn’t bother to solve the problem.

1 Like