Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have the following script:
test:
First 2
LOAD id ,
name,
class ,
num
FROM
Concatenate(test)
LOAD id ,
name,
class,
num
FROM
In above script, function named 'First n' ('n' being any integer value depending on the records available in the table,here 'n' is 2) works fine but if I use the same function after concatenate ,it will not work.
Please help me whether it is possible to use 'First n' after Concatenate or not.
Thanks
Hi,
How many rows your do you have in you table 2.
Can you post your qvd too.
Regards
ASHFAQ
Hi Ashfaq,
Thanks for the concern.
Please find the attachments of qvd.
Regards
Geeta
Hi,
just try this code.
data_tbl:
LOAD month,
val,
1 as Flag
FROM
(qvd);
concatenate(data_tbl)
first 3
LOAD month,
val,
data,
2 as Flag
FROM
(qvd);
Regards
ASHFAQ
Hi Ashfaq,
It works fine .
Thanks a lot
Could you please tell me the use of Flag here?
Regards,
Geeta
Hi geeta,
By using flags you can differentiate two table I flagged table 1 with 1 and table2 with flag 2.
Now if you select 1 in flag which means this data is coming from table1 and if you select 2 in flag this means data is coming from table2.
If it answered your question, then close the thread by selecting appropriate answer.
Regards
ASHFAQ
Hi Geeta,
I understood your issue.
Seems like a bug when loading in QVD and concatenate it behaves weird.
It loads N+1 records on this combination. If you want to load 3 rows then use 2.
data_tbl:
LOAD month,
val
FROM
[data_tbl.qvd]
(qvd);
Concatenate(data_tbl)
first 2
LOAD month,
val,
data
FROM
[d2.qvd]
(qvd);
or try in this way
data_tbl:
LOAD month,
val
FROM
[data_tbl.qvd]
(qvd);
temp_data_tbl:
first 2
LOAD month,
val,
data
FROM
[d2.qvd]
(qvd);
Concatenate(data_tbl)
LOAD
*
Resident temp_data_tbl;
DROP Table temp_data_tbl;
Hi Celambarasan,
Thanks for the information.
Regards,
Geeta