Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Using Variable any idea to store Tables
can come again in brief?
set Variable = select * from Employee like wise
let Variable = Variable + select * from Employee like wise
Maybe this?
LOAD *
;
SQL
SELECT EmployeeName
FROM Employee
WHERE EmployeeID = 12345
;
LET Variable = peek('EmployeeName')
;
Hi john,
i want to stroe all columns in one Variable.is it possible...Variable is like a function in sqlserver right..in sqlserver we write three type of function ..Tabled Value Function it returns Tables,Scalar Value Function it Returns Values and Aggregate functions it Return Grouped Value.....but in qlikview we write only Scalar Value Function...Variable Returns Values Only..is Any way to return Tables...
LOAD *
;
SQL
SELECT EmployeeName,EmployeeID,Salary,Department
FROM Employee
;
LET Variable = peek('EmployeeName',' EmployeeID','Salary','Department');
is it Correct?
A variable isn't a function. It's just a place to store a value.
Maybe this?
LET Variable = peek('EmployeeName') & ',' & peek('EmployeeID') & ...;
That just gives you one row, though. All columns, one row. All columns, all rows, comma delimited would look something like this:
LOAD concat(EmployeeName & ',' & EmployeeID & ...,'
') as AllMyData; // is is important that this is on a separate line - it's how you get separate lines in your data
SQL
SELECT EmployeeName,EmployeeID,...
FROM Employee
;
LET Variable = peek('AllMyData');
I don't have any idea why you'd do something like that, but you could.