Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi All,
I had written script and null value is coming for variable. But that variable is having some value.
Inserts:
LOAD *FROM
$(Vqvdpath)fact_site_visit.QVD (qvd);
MaxDates:
LOAD Max(site_visit_updated_datetime) as MaxDate
Resident Inserts;
LET vMaxDate = Peek('MaxDate',0,'MaxDates');
DROP TABLE MaxDates;
In above for vMaxDate  null value is coming. But it is having max value. Where it is wrong. I think my script is correct. Can anyone tell me where it is going please guide me
 NareshGuntur
		
			NareshGuntur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hope you have checked the count of the table MaxDates before dropping it.
.png) 
					
				
		
 sasikanth
		
			sasikanth
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HI,
are you able to load the data ? if not check '\' there in that variable or not
LOAD *FROM
$(Vqvdpath)fact_site_visit.QVD (qvd);
LOAD *FROM
$(Vqvdpath)\fact_site_visit.QVD (qvd);
Check site_visit_updated_datetime format
 
					
				
		
Thanks for your reply. I am able to load the data. Only when I do max there it is creating problem.
Date format is dd/mm/yyy hh:min:ss
.png) 
					
				
		
 sasikanth
		
			sasikanth
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		can you share your QVD ? with limited load
 
					
				
		
 markodonovan
		
			markodonovan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Kumar,
Could you remove the DROP TABLE MaxDates; and check the table viewer to check the table is being created correctly.
If you could upload an app it would be helpful.
If the QVD is loading OK there shouldn't be a problem.
Thanks
Mark
 
					
				
		
Syntax looks okay, if you can share some sample data or app, would be great?
You may also try like this?
Inserts:
LOAD *FROM
$(Vqvdpath)fact_site_visit.QVD (qvd);
MaxDates:
LOAD Max(site_visit_updated_datetime) as MaxDate
Resident Inserts
where site_visit_updated_datetime<>' ';
LET vMaxDate = Peek('MaxDate',0,'MaxDates');
DROP TABLE MaxDates;
 
					
				
		
my QVD is having 20 gb of data.
.png) 
					
				
		
 sasikanth
		
			sasikanth
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		conditional load can help
Load * from qvd where condition;
 
					
				
		
To debug the issue enable log file and add trace function to your variable values.
Your script looks correct. I would say, do drop the maxdates tables and check the MaxDate have the value or not.
What is your date format in "site_visit_updated_datetime" ?
