Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
how to implement the sql decimal() and round() in to the qlikview
example 1:
round()
select round(field1,0) as field1 from table1
exapmle 2:
decimal()
select convert(decimal(3,0),field1) as field1 from table1
how to do this qlikview script?
For Round you can simply put
Load
Round (Amount) as Amount
From ....;
and for Decimal
Num(sum(sales),'##.00')
ok thnaks
how to achive this
select * round(isnull(field1,0),0) as field1 from table?
Try like this
IF(ISNULL(field1 )=0, Round(field1 ), 0 ) AS field1 ;
how to do this
(CASE WHEN ((field1 IS NOT NULL) OR (field2 IS NOT NULL)) THEN ISNULL(field1 ,'') + ', ' +
ISNULL(field2,'') ELSE field3 END) AS xxxx,
Try like this
if( ISNULL(Salary) = 0 or (ISNULL(Salary) <> 0 ) , ISNULL(Salary) &','& ISNULL(Salary,'') , (Salary) ) as XXXX
Or
if(wildmatch([Account Name],'*Hong Kong*', 'HK',
if(wildmatch([Account Name],'*USA*', 'NY',
if(wildmatch([Account Name],'*UK*','LDN',
'OTHER')))
Please share some sample app
for SQL Case statement we generally use "wildmatch" statement