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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Xolink1389
Creator
Creator

how load a table with empty fields

Hi community,

i wanna know how can i make to load only the field with zero date in it, im using this expression to load but it still load content, i just want to load the name of the fied with no data

Xolink1389_0-1712712269063.png

Xolink1389_1-1712712301766.png

you might wonder why im try to load empty field, well i just wanna see how many field contain the table, or if i can put a default value of 1 to each field in order to the table load faster

 

 

Labels (3)
1 Solution

Accepted Solutions
Xolink1389
Creator
Creator
Author

only this works :D, but finally works, thank a lot

FMIT:
LOAD *
WHERE 1=2;
SQL SELECT *
FROM FMIT;

View solution in original post

9 Replies
Anil_Babu_Samineni

@Xolink1389 Perhaps like below

1) Select * ... Where 1=2;

I have tried this, and it seems to be OK.

Load * Inline [
Name
a
b
c
] Where 1=2;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Vegar
MVP
MVP

You could try 

FMIT:

LOAD *;

SQL SELECT *

FROM FMIT

LIMIT 0;

 

This query will be selecting all the columns (*) from the FMIT table, and using the LIMIT 0 means it will not return any rows (only the column names)

Xolink1389
Creator
Creator
Author

Xolink1389_0-1712760416263.png

Xolink1389_1-1712760429824.png

i get this error 

 

Xolink1389
Creator
Creator
Author

Xolink1389_2-1712760485480.png

Xolink1389_3-1712760496119.png

i get this error

 

Anil_Babu_Samineni

It should be with Load statement not select statement. 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Xolink1389
Creator
Creator
Author

Xolink1389_0-1712777403204.png

Still not working ☹️

Xolink1389_1-1712777423255.png

 

BrunPierre
Partner - Master II
Partner - Master II

Here are the respective syntaxes for a standard SQL SELECT statement and a Preceding Load:

FMIT:
SQL SELECT *
FROM FMIT
WHERE 1=2;

or

FMIT:
LOAD *
WHERE 1=2;
SQL SELECT *
FROM FMIT;

Xolink1389
Creator
Creator
Author

only this works :D, but finally works, thank a lot

FMIT:
LOAD *
WHERE 1=2;
SQL SELECT *
FROM FMIT;

Vegar
MVP
MVP

I see that you already have found a solution to your issue, that's great.

The suggestion I sent you was in mysql syntax and your database is probably not mysql.

 

In MSSQL you can try this

SELECT TOP 0 *
FROM FMIT;

 

In Oracle you can try this

SELECT *
FROM FMIT
FETCH FIRST 0 ROWS ONLY;