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

Script Error

Help

That's my script and my error window

error.jpg

Let ThisExecTime = ReloadTime();

QV_Table:

LOAD BusinessEntityID,

    ModifiedDate,

    PasswordHash,

    PasswordSalt,

    rowguid;

SQL SELECT BusinessEntityID,

    ModifiedDate,

    PasswordHash,

    PasswordSalt,

    rowguid

FROM AdventureWorks2008.Person.Password

WHERE ModifiedDate >= #$(LastExecTime)#;

 

Concatenate LOAD BusinessEntityID,

    ModifiedDate,

    PasswordHash,

    PasswordSalt,

    rowguid FROM File.qvd (qvd);

 

          STORE QV_Table INTO QV_Table.qvd (qvd);

          Let LastExecTime = ThisExecTime;

5 Replies
Not applicable

Have you tested the connection to the Database? And if so, try to find the table "AdventureWorks2008.Person.Password" through the select button under the Data tab.

farolito20
Contributor III
Contributor III
Author

OLEDB CONNECT32 TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorks2008;Data Source=COMGAD;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=COMGAD;Use Encryption for Data=False;Tag with column collation when possible=False];

Let ThisExecTime = Date(ReloadTime());

QV_Table:

LOAD BusinessEntityID,

    ModifiedDate,

    PasswordHash,

    PasswordSalt,

    rowguid;

SQL SELECT BusinessEntityID,

    ModifiedDate,

    PasswordHash,

    PasswordSalt,

    rowguid

FROM AdventureWorks2008.Person.Password

WHERE ModifiedDate >= #$(LastExecTime)#;

//       AND ModifiedDate < #$(ThisExecTime)#;

Concatenate LOAD BusinessEntityID,

    ModifiedDate,

    PasswordHash,

    PasswordSalt,

    rowguid FROM QV_Table.qvd (qvd);

//WHERE NOT EXISTS(PrimaryKey);

//

//Inner Join SQL SELECT PrimaryKey FROM DB_TABLE;

If ScriptErrorCount = 0 then

          STORE QV_Table INTO QV_Table.qvd (qvd);

          Let LastExecTime = ThisExecTime;

End If

Not applicable

Try to use the variable differently:

Let ThisExecTime = 'Where [ModifiedDate] >=' & Date(ReloadTime());

and then:

SQL SELECT BusinessEntityID,

    ModifiedDate,

    PasswordHash,

    PasswordSalt,

    rowguid

FROM AdventureWorks2008.Person.Password

$(ThisExecTime);

(You can of course use 2 different variables, one for the date(reloadtime) and the second for the string..)


Not applicable

You should also make sure that the Date(ReloadTime()) returns the same kind of date as ModifiedDate.

(YYYY-MM-DD or MM/DD/YYYY ect.)

SunilChauhan
Champion
Champion

have u tried this

FROM AdventureWorks2008.Person.Password

WHERE ModifiedDate >='$(LastExecTime)';

hope this helps

Sunil Chauhan