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

Script help

LET vDate=today();
LET vDateNow=Now();
set vtesttable= Q:\d771\F88776\SHARED\CompanyRead\Network Informatics\Special Projects\John Mingus\Qlikview\Monthly Reports\test;

ODBC CONNECT32 TO PIMS (XUserId is MYIcPVBPNLMKDbMGLC, XPassword is dRAXPaBNSLaMXSNEQZHB);


Test:
sql
SELECT TOP 10 [prdtKey]
  
      ,[enrollTypeCd]
      ,[termDt]
     FROM [ProvInfoRpt].[dbo].[dcPrdt];

 
store Test into $(vtesttable).qvd;
 
drop table Test;


export:
load
,[enrollTypeCd]
,[termDt]


 
from  $(vtesttable).qvd

Can someone help be with the scrip above,? Assuming there are multiple errors in the script but I cannot get the script to load corerctly. Any help would help.

1 Solution

Accepted Solutions
Not applicable
Author

Hi MrJohn23,

this can work, there were some errors in your script

LET vDate=today();
LET vDateNow=Now();
set vtesttable= 'Q:\d771\F88776\SHARED\CompanyRead\Network Informatics\Special Projects\John Mingus\Qlikview\Monthly Reports\test';

ODBC CONNECT32 TO PIMS (XUserId is MYIcPVBPNLMKDbMGLC, XPassword is dRAXPaBNSLaMXSNEQZHB);

Test:
sql
SELECT TOP 10 [prdtKey]  
      ,[enrollTypeCd]
      ,[termDt]
     FROM [ProvInfoRpt].[dbo].[dcPrdt];

 
store Test into $(vtesttable).qvd (QVD);
 
drop table Test;

export:
load
[enrollTypeCd] ,
[termDt]
 
from  $(vtesttable).qvd (QVD);

Regards

View solution in original post

7 Replies
sunny_talwar

Is there a reason that you are first storing your table into a qvd and then recalling the same qvd after dropping the first table?

Best,

Sunny

rajkumarb
Creator II
Creator II

Hi John

Try Like this

LET vDate=today();
LET vDateNow=Now();
set vtesttable= Q:\d771\F88776\SHARED\CompanyRead\Network Informatics\Special Projects\John Mingus\Qlikview\Monthly Reports\test;

ODBC CONNECT32 TO PIMS (XUserId is MYIcPVBPNLMKDbMGLC, XPassword is dRAXPaBNSLaMXSNEQZHB);


Test:

load
,[enrollTypeCd]
,[termDt]

sql
SELECT TOP 10 [prdtKey]
  
      ,[enrollTypeCd]
      ,[termDt]
     FROM [ProvInfoRpt].[dbo].[dcPrdt];

 
store Test into $(vtesttable).qvd;
 
drop table Test;


export:
load
,[enrollTypeCd]
,[termDt]


 
from  $(vtesttable).qvd

Not applicable
Author

Hi MrJohn23,

this can work, there were some errors in your script

LET vDate=today();
LET vDateNow=Now();
set vtesttable= 'Q:\d771\F88776\SHARED\CompanyRead\Network Informatics\Special Projects\John Mingus\Qlikview\Monthly Reports\test';

ODBC CONNECT32 TO PIMS (XUserId is MYIcPVBPNLMKDbMGLC, XPassword is dRAXPaBNSLaMXSNEQZHB);

Test:
sql
SELECT TOP 10 [prdtKey]  
      ,[enrollTypeCd]
      ,[termDt]
     FROM [ProvInfoRpt].[dbo].[dcPrdt];

 
store Test into $(vtesttable).qvd (QVD);
 
drop table Test;

export:
load
[enrollTypeCd] ,
[termDt]
 
from  $(vtesttable).qvd (QVD);

Regards

Not applicable
Author

1. Add single quote (' ') for   vtesttable variable (ex: set vA='Name'; )      

2. Please remove comma (, ) in export table after Load statement.  Reload the script after modification.

Anonymous
Not applicable
Author

This is a subset of a bigger app and I'm trying to create the script is the most sufficient way. I originally used"Resident" to refer to the original table but was told that storing and refering to QVDs is more effective.

sunny_talwar

Oh really? I would really like to get more details on this topic. Thanks for responding back

Best,

Sunny

Anonymous
Not applicable
Author


Just trying to learn best possible soultions as I know very little about Qlikview, that's why I come to you guys to set me straight.