

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how can i create an empty table?
LOAD * INLINE [
];
give me a script error:
Error: File .\extdata.cpp, Line 2788
LOAD * INLINE [
]
i want to create the table first, because i'm looping though a set of data and i want to use CONCATENATE even if the table doesn't exsist;


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You have to specify the fieldnames
Try this
Load * Inline
[Field1,Field2,Field3];
Or
you can go with
LOAD
'' as Field1,'' as Field2 AutoGenerate 0;
Celambarasan

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try this
TableName:
Load * Inline
[Field1,Field2,Field3];
Hope it helps you.
Regards,
Jagan.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This can't be done without any columns?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Its not possible to do without any columns.Can you brief about your issue why you are trying to create empty table without any column?
Celambarasan


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
as mentioned in the openings post .. i have the CONCATENATE load in a SUB. This SUB is called a few times.
The problem is that the first time, the table doesn't exists and concatenate will not work.
i created a check that does a countrowno on the table. If that number is 0 then i create an INLINE.
i could create an inline with 1 column that will exist in the table that is going to be concatenated. but i was wondering if it's possible to create an inline without any columns or rows.

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Without a single column it is not possible to create a table. Not in Qlikview, even it is not possible in any database.
So, you can try this script
TableName:
Load * Inline
[Field1];
Now you have a table (TableName) with Field1. Now in SUB you can concatenate your data,
CONCATENATE(TableName)
LOAD
*
FROM DataSource;
Finally, remove the column Field1 in the table TableName by using
Data:
LOAD
//List all columns except Field1
RESIDENT TableName;
Hope this helps you.
Regards,
Jagan.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jagan is correct but an easier way to eliminate Field1 is to use:
DROP FIELD Field1 FROM TableName;
Doing this eliminates the need to reload the data that last time.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
If the field names are the same each time you call the Sub, then you can use QVs automatic concatenation. Just make sure you give the LOAD a table name lable (that also must not change) and call the sub as many times as you need.
If you do this right, then QV will concatenate the data from all the calls into the table named in your lable.
Regards
Jonathan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jonathan's suggestion will work fine unless that first LOAD into the table in the LOOP fails to create the table because of some scripting or data error. I have found that creating the target table with a dummy field prior to entering the LOOP is a better practice to always know you have a table into which you can CONCATENATE and you can explicitly tell Qlikview to CONCATENATE(mytablename) in the LOOP. Then after the LOOP terminates do a DROP FIELD FROM as I noted in an earlier post.
