Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
manoranjan_d
Specialist
Specialist

Count all

Hi in SQL we ll simply use select count(*)  as xxx from tablename to get overall count

but in QLikview load script  how to use the same query,pleas help me

example

in my load script wht i m doing

load

name,

rollno, dept;

sql select name, rollno, dept, count(*) as RecordsPerroll

from Collage

group by name, rollno, dept

order by rollno

STORE collage into (qvd);

i m getting error in that RecordsPerroll feild nit found

4 Replies
sinanozdemir
Specialist III
Specialist III

Hi,

I think you can use:

NoOfRows() and RowNo() functions to count(*). Because Count(*) is essentially the number of rows.

Hope this helps.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

1. The field RecordsPerroll is not listed in your preceding load - I'd suggest to add it there.

2. There should be a semicolon between the end of the SQL statement and the beginning of the STORE statement.

3. I'd recommend to name your table explicitly without relying to the automated naming:

collage:

load

     name,

     rollno,

     dept,

     RecordsPerroll

;

sql select name, rollno, dept, count(*) as RecordsPerroll

from Collage

group by name, rollno, dept

order by rollno

;

STORE collage into (qvd);

cheers,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense

Not applicable

Hi, assign NoOfRows function  in a variable, displays this in text object.

Tabla:

load

name,

rollno, dept;

sql select name, rollno, dept as RecordsPerroll

from Collage

group by name, rollno, dept

order by rollno

STORE collage into (qvd);

LET vCantidadRegistros = NoOfRows('Tabla') ;



Regards.

maxgro
MVP
MVP



Table:

load *;

sql select name, rollno, dept, count(*) as RecordsPerroll

from Collage

group by name, rollno, dept

order by rollno

STORE collage into (qvd);