Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
$(QVDatabaseTable_1):
LOAD * ;
SQL SELECT count(*) as NoOf_Rows
FROM $(DatabaseName).$(DatabaseUser).$(DatabaseTable_1)
$(INCREMENTAL_EXP);
Store $(QVDatabaseTable_1) into $(vQVDFileName_1)(qvd);
Drop Table $(QVDatabaseTable_1);
This just will not run... do anybody have an idea?
i have also tried just
SQL SELECT count(*)
also.
please let me know if I am doing anything wrong.
Thank you!!
With aggregation, you need to use Group by the statement.
Something like:
SELECT somecolumn,someothercolumn, COUNT(*)
FROM my_table
GROUP BY somecolumn,someothercolumn
www.qliksteps.com
Hi,
Check whether your variables are populating with expected values.
Regards,
Jagan.
^^ I agree, Variables are most probably the issue. the rest look fine imo.
You can add some TRACE before the LOAD statement, something like
TRACE QVDatabaseTable_1=$(QVDatabaseTable_1);
TRACE DatabaseName=$(DatabaseName);
.....
to check you vars
Also you can post the error you get
Are your problem with sql query? (SELECT count(*) as NoOf_Rows ... )
Please, post error,which you get, when document is reloading.
OUTER JOIN worked perfectly for me!! I have a followup question.
is it possible to make another column by adding or subtracting other two columns?
for example, let's say by Outer Joining I got three columns col1, col2, col3
Can I make col4 by col1 - col2?
Yes, you can do that in the preceeding load
Table1:
Load
*,
col1 - col2 as col4;
sql....;
if you have a table (Table) with a logical primary key (Id) with a join
left join (Table)
load
Id,
col1 - col2 as col4
resident Table;
or you can always do a resident load
NewTable:
Noconcatenate
Load
*,
col1 - col2 as col4
resident Table;
drop table Table;