Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi Everyone,
I am getting error at the last line( Where Condition Load_Date>=$(VbuiMstr)),
Any suggestions would be greatly appreciated.
D_GIS_BUILDING_MSTR:
 LOAD COMPANY_CODE, 
 OFFICE_CODE, 
 CITY_CODE, 
 OFFICE_NAME, 
 Date(Load_Date) as Load_Date , 
 Load_DateTime
 FROM
 [..\Data Sources\Master\D_GIS_BUILDING_MSTR.qvd]
 (qvd);
 
 LET VbuiMstr=Peek('Load_Date',0,'D_GIS_BUILDING_MSTR');
 //Let Vtodayt=Today()-1;
 
 Incr_D_GIS_BUILDING_MSTR:
 NoConcatenate
 SQL SELECT *
 FROM HRAnt.dbo."BUILDING_MSTR" where COMPANY_CODE='C002' and Load_Date>=$(VbuiMstr); 
Thanks in Advance
Regards,
P.Divya
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You should format the date field to match what your database expects in a date. And enclose in single quotes. Something like
LET VbuiMstr = Date(Peek('Load_Date',0,'D_GIS_BUILDING_MSTR'), 'DD-MM-YYYY');
(adjust the format string to your requirements)
Your screenshot is too small to be able to read the error message.
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try with single quotes around dollar expansion like:
Load_Date>='$(VbuiMstr)' ;
 
					
				
		
Hi tresesco,
Thanks for quick response,I tried with single quotes ,but still it is giving error
 
					
				
		
Hi ,
Please find below screenshot for your reference

 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You should format the date field to match what your database expects in a date. And enclose in single quotes. Something like
LET VbuiMstr = Date(Peek('Load_Date',0,'D_GIS_BUILDING_MSTR'), 'DD-MM-YYYY');
(adjust the format string to your requirements)
Your screenshot is too small to be able to read the error message.
 
					
				
		
Hi ,
PFA

 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		ODBC fail. Have you tried without this where clause, is that working?
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		That looks like a login/permissions issue.
I suggest that you test the ODBC connection again. In the script editor, just create a new ODBC connection and click the test option (delete the newly created connection when done)
 prashantbaste
		
			prashantbaste
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Please check with below code -
//-------------------------------------------------------------------------
D_GIS_BUILDING_MSTR:
 LOAD COMPANY_CODE, 
 OFFICE_CODE, 
 CITY_CODE, 
 OFFICE_NAME, 
 Load_Date as Load_Date , 
 Load_DateTime
 FROM
 [..\Data Sources\Master\D_GIS_BUILDING_MSTR.qvd]
 (qvd);
 
 LET VbuiMstr=Peek('Load_Date',0,'D_GIS_BUILDING_MSTR');
 //Let Vtodayt=Today()-1;
 
 Incr_D_GIS_BUILDING_MSTR:
 NoConcatenate
 SQL SELECT *
 FROM HRAnt.dbo."BUILDING_MSTR" where COMPANY_CODE='C002' and Load_Date>=$(VbuiMstr); 
//-------------------------------------------------------------------------
There is possibility of datatype mismatch in database field & value stored in variable. Better not to format field.
Please check & confirm if it resolves your query.
--
Regards,
Prashant  P Baste
 
					
				
		
Hi tresesco,
Your information is also very helpful.Thanks for your Valuable information.
Regards,
P.Divya
