Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I need to convert existing BO reports into Qlikview
There are some simple conditions mentioned in where clause of SQL like ( SELECT col1,col2 from table where table.col1='A' )ould
Should I implement these conditions at script level or it should be at UI level
It is always a good practice to move most of the filter and calculation conditions to Script to make the performance better
try like that
Load
col1,
col2
FROM
[pathofsource]
where col1='A';
You better implement these conditions at script level.
Perhaps even better would be to SET a variable that would be used by no of SQL queries. So that if you want to change it in the future, you will have to change it once.
Logic one,
1) Did you connect to BO Database?
2) If your answer is "YES" then check whether the field is there or not?
3) Then You can use Set operations, Can you please provide more information on this for third point?
try this
in script:
Load
col1,
col2
from......
where col1='A'
in front end:
sum({<col1={'A'}>}value)
this based on your requirement
You can use set analysis for the same
Select sum(Sales) where year=2015
Sum( {$ <Year = {2015} >} Sales )
or
Sum ({$<Year ={$(=YearName(max(Date)))},>} Sales)
Hope this helps you
Vikas
based on your requirement if that filtration is only for few reports you can give in UI part in set expression.
like this =sum({<Col1={'A'}>}Sales)
If you restrict that col1='A' for all reports then it's better to give in script part like
Load col1,
col2,
col3,
sales
where col1='A';
select * from
tablename;
Hi,
Please see below sample query
SELECT
Table1.Col1,Table2.Col2
FROM
Table1,Table2,Table3
WHERE
Table1.Col1=Table2.Col2
AND Table2.Col3=Table3.Col4
AND
(
Table1.col1 In ('111')
AND
Table1.col2 <> '31-12-1899 00:00:00'
AND
Table1.col4 BETWEEN 'DATE RANGE'
AND
Table2.col5 In ( 'Text' )
AND
(
Table1.col3 Like 'A%'
OR
Table2.col4 Like 'A%'
OR
Table3.col6 Like 'A%'
)
)
Hi,
You can use in QV script the same sintax
Connect to ......
SQL Select col1,col2 from Table where col1 ='A' ;
If You don't need records having col1 <> 'A', then I suggest Level Script.
In script Load is used with File (xls,csv,txt,QVD,etc.) or with Resident Table (already loaded)
Regards,
Antonio