Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rbarbosa
Contributor III
Contributor III

Nome de campo do SQL para o script

Olá pessoal, tudo bem?

Tenho um sql com um count(*) que pega e um campo apelidado para ele, parece que meu Qlik não está reconhecendo esse apelido.

Acredito ser alguma falha minha, algum detalhe:

Segue print

campo.png

E o Script que estou usando:

DENOMINDADOR_30D:

LOAD

COD_NUM, totalDen;

SQL

select extract(year from(a.dt_atendimento)) || lpad(extract(month from(a.dt_atendimento)),2,0) COD_NUM, count(*) totalDen

Rodolfo Barbosa
Labels (4)
1 Solution

Accepted Solutions
maxgro
MVP
MVP

try in uppercase totalden

  1. DENOMINDADOR_30D: 
  2. LOAD 
  3. COD_NUM, TOTALDEN
  4. SQL 
  5. select extract(year from(a.dt_atendimento)) || lpad(extract(month from(a.dt_atendimento)),2,0) COD_NUM, count(*) totalDen

if doesn't work try

load *;

SQL select extract(year from(a.dt_atendimento)) || lpad(extract(month from(a.dt_atendimento)),2,0) COD_NUM, count(*) totalDen;

reload and open the table viewer to see the fields name, then change the load according to field names

View solution in original post

2 Replies
maxgro
MVP
MVP

try in uppercase totalden

  1. DENOMINDADOR_30D: 
  2. LOAD 
  3. COD_NUM, TOTALDEN
  4. SQL 
  5. select extract(year from(a.dt_atendimento)) || lpad(extract(month from(a.dt_atendimento)),2,0) COD_NUM, count(*) totalDen

if doesn't work try

load *;

SQL select extract(year from(a.dt_atendimento)) || lpad(extract(month from(a.dt_atendimento)),2,0) COD_NUM, count(*) totalDen;

reload and open the table viewer to see the fields name, then change the load according to field names

rbarbosa
Contributor III
Contributor III
Author

Resolvido! Thank you!

Rodolfo Barbosa