Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us at Qlik Connect 2026 in Orlando, April 13–15: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
rbecher
Partner - Master III
Partner - Master III

Direct Query Native quoting

Hi,

how can we quote the native string? This doesn't work (double single quotes):

DIRECT QUERY

DIMENSION

NATIVE('to_date(ERDAT,''YYYYMMDD'')') as ERDAT

...

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Labels (1)
7 Replies
rajeshvaswani77
Specialist III
Specialist III

Hi Ralf,

Finally did the quote work.

Please let know.

I am facing the same issue.

Thanks,

Rajesh Vaswani

florentina_doga
Partner - Creator III
Partner - Creator III

try this exemple

DIRECT QUERY

dimension

   product

measure

  value

FROM dbo."table";

rbecher
Partner - Master III
Partner - Master III
Author

How your answer is related to my question?

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
petter
Partner - Champion III
Partner - Champion III

Tried this NATIVE function with DIRECT QUERY on an Oracle database and it worked well for me. Which version and service release did you get a problem with? How is it "not working" for you? Error message or null values or what?

rbecher
Partner - Master III
Partner - Master III
Author

And how do you qoute inside of NATIVE?

My last try was a year ago against SAP HANA..

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
petter
Partner - Champion III
Partner - Champion III

Exactly like you did with two consequtive single quotes. But I assumed it was Oracle since you didn't mention which database you used. I tested this with QlikView 11.20 SR12.

framacdev
Contributor III
Contributor III

I know the post is a little bit old but I also ran into the same issue a few days ago.

I needed a string url within my Direct Query to extract pictures from a website.

I resolved the issue adding two variables to the Qlik Sense script.

I am working with Qlik Sense April 2019 Patch 1 and ElevateDB database.

Here is the script sample:

LET vWebsiteURL = chr(39) & 'https://mywebsite.com/img/' & chr(39);
LET vWebsitePIC = chr(39) & '.png' & chr(39);

LIB CONNECT TO 'ODBC Connection (new_user)';

invoice:
DIRECT QUERY
DIMENSION

SalesRep,
NATIVE('$(vWebsiteURL) + SalesRep + $(vWebsitePIC)') As Picture
MEASURE
SubTotal
FROM "Database".orders
;