Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
matfurrier
Contributor III
Contributor III

Syntax error, missing/misplaced FROM

Friends, do not know what happens in this case. I tried several ways and always presents the same error. What can this be?

Syntax error, missing/misplaced FROM:

LIMITECLIENTE:

LOAD

ACCOUNTNUM AS[Código do Cliente],

CREDITMAX AS [Limite Total],

ATUAL AS [Limite Atual]

LIMITECLIENTE:

LOAD

ACCOUNTNUM AS[Código do Cliente],

CREDITMAX AS [Limite Total],

ATUAL AS [Limite Atual]

Below is the code that I created.

LIMITECLIENTE:

LOAD

ACCOUNTNUM AS[Código do Cliente],

CREDITMAX AS [Limite Total],

ATUAL AS [Limite Atual];

SELECT

CUSTTABLE.ACCOUNTNUM,

CUSTTABLE.CREDITMAX,

(CUSTTABLE.CREDITMAX - ISNULL((SELECT SUM (TMPCRE.VALOR) FROM AX501_SRL_PROD2.dbo.TMPCRE  WHERE TMPCRE.ACCOUNT = CUSTTABLE.ACCOUNTNUM AND TMPCRE.STATUS = 'ABERTO'),0))ATUAL

FROM AX501_SRL_PROD2.dbo.CUSTTABLE;

STORE LIMITECLIENTE INTO ;

DROP TABLE LIMITECLIENTE

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You need a space between AS and [Código do Cliente]

HIC

View solution in original post

3 Replies
Siva_Sankar
Master II
Master II

use sql before the select keyword. LIMITECLIENTE: LOAD ACCOUNTNUM AS[Código do Cliente], CREDITMAX AS [Limite Total], ATUAL AS [Limite Atual]; sql SELECT CUSTTABLE.ACCOUNTNUM, CUSTTABLE.CREDITMAX, (CUSTTABLE.CREDITMAX - ISNULL((SELECT SUM (TMPCRE.VALOR) FROM AX501_SRL_PROD2.dbo.TMPCRE  WHERE TMPCRE.ACCOUNT = CUSTTABLE.ACCOUNTNUM AND TMPCRE.STATUS = 'ABERTO'),0))ATUAL FROM AX501_SRL_PROD2.dbo.CUSTTABLE; STORE LIMITECLIENTE INTO ; DROP TABLE LIMITECLIENTE regards. siva

hic
Former Employee
Former Employee

You need a space between AS and [Código do Cliente]

HIC

matfurrier
Contributor III
Contributor III
Author

Friends, you are great!

Both answers helped me!

Thank you.

Hugs!