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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Karuetl
Creator II
Creator II

tJava Logic select

0683p000009MEq8.png
I need to write dynamic query if the number of columns in the table is 30 then it has to create below syntax using java ,if it is 10 then only 10 select columns to be created .. Kindly guide me
 
'select 
NVL(a.$1,'''')|| ''^''||
NVL(a.$2,'''')|| ''^''||
NVL(a.$3,'''')|| ''^''||
NVL(a.$4,'''')|| ''^''||
NVL(a.$5,'''')|| ''^''||
NVL(a.$6,'''')|| ''^''||
NVL(a.$7,'''')|| ''^''||
NVL(a.$8,'''')|| ''^''||
NVL(a.$9,'''')|| ''^''||
NVL(a.$10,'''')|| ''^''||
NVL(a.$11,'''')|| ''^''||
NVL(a.$12,'''')|| ''^''||
NVL(a.$13,'''')|| ''^''||
NVL(a.$14,'''')|| ''^''||
NVL(a.$15,'''')|| ''^''||
NVL(a.$16,'''')|| ''^''||
NVL(a.$17,'''')|| ''^''||
NVL(a.$18,'''')|| ''^''||
NVL(a.$19,'''')|| ''^''||
NVL(a.$20,'''')|| ''^''||
NVL(a.$21,'''')|| ''^''||
NVL(a.$22,'''')|| ''^''||
NVL(a.$23,'''')|| ''^''||
NVL(a.$24,'''')|| ''^''||
NVL(a.$25,'''')|| ''^''||
NVL(a.$26,'''')|| ''^''||
NVL(a.$27,'''')|| ''^''||
NVL(a.$28,'''')|| ''^''||
NVL(a.$29,'''')|| ''^''||
NVL(a.$30,'''')
from'
Labels (3)
1 Reply
David_Beaty
Specialist
Specialist

Hi

 

This link on loops in Java might be what you need.