Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Garbage error after statement

Good Morning to all,

When I run the script, it shows a error of Garbage errir after statment. I have verified the script checking of open close of paranthesis everything is perfect.

Can any one suggest me how to resolve this.

Thanks

Joe

5 Replies
Miguel_Angel_Baeyens

Hello Joe,

When I've come accross this issue, it was usually because some worong spelling of SQL statements, not quoting variables where needed and so. Sometimes even using GROUP BY in an optimized LOAD or something. Could you please post some sample code so when cahn check it further?

Regards.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Dear Miguel Angel Baeyens,

Thanks for your help.

I have just attached the script in my first request, can you gothrough and advise me..

Regards,

Joe

ToniKautto
Employee
Employee

Please load each part separately to identify in which part your issue occurs. Then attempt using LOAD * instead of specified fields, so that you can detemine if the issue is caused by FROM statement or the LOAD definitions.

In general it is also advisable to not use WHERE filtering when loading from QVD files, as this will make the load unoptimized and thereby slower and less efficient. Especially you will see a difference if the QVD contain a lot of data.

Miguel_Angel_Baeyens

Hello Joe,

The main issue here I can see at a first glance is that you are loading from QVD files with the same syntax you where doing in a SQL statement, and this is not correct.

The following line is what I'm guessing is throwing the error (you can check that in a debug load)

FROM

[QVD\QVFACT.qvd](qvd) fact, [[QVD\QVCSCM.qvd](qvd) cscm

Everything after the "(QVD)" that is not a LOAD sentence (WHERE mainly, but there are other you can check in the Reference Manual) is not understood by QlikView.

You don't need to specify where to join in QlikView. Well, you do, but QlikView uses named-alike fields to create a relation between both tables.

Assuming your code, my guess is that you should do something like the following much simplified example (joining tables using where and loading only some of the records):

Table1: // First table

LOAD * INLINE [

Code, Name

1, AAA

2, BBB

3, CCC

];

Table2: // Second table, the key field "C" should be renamed so the fields can be associated by QlikView

LOAD C AS Code, Data INLINE [

C, Data

1, 10000

2, 20000

3, 30000

4, 40000

]

WHERE EXISTS(Code, C); // Ok, but only those records for what this tables's "C" field values

                          // already exist in the previously loaded table "Code" field

Although I'm using INLINE loading instead of using QVDs, the syntax is valid anyway. The result of the code above are two tables associated by field "Code", so any selection you do in the first will affect the second table. That's how the associative logic (the magic behind QlikView) works. If you don't want two tables you can JOIN them and put into memory only one table. That will work too adding the "JOIN" keyword before the second LOAD statement.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

neetu_singh
Partner - Creator III
Partner - Creator III

Hi,

Please check your where condition as i go through with your code, in where codition you have used [Payment Flag]<>'P'

 

In your code Payment Flag field is not in use and not mention from which table you are taking this as fact or cscm . So, may be this is the reason due to which it gives garbage error.

Regards

Neetu Singh