Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 manoranjan_d
		
			manoranjan_d
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Details:
LOAD distinct
EMPDESG
MAX(DATE(CREATE_DATE_NUM,'MMDDYYYY')) asDATE_ID,
EMP_ID,
SAL
FROM
[XXX](qvd)
WHERE(IsNull(STATUS));
inner JOIN
Top5_project:
load distinct
EMP_ID,
TOP5_PROJECT,
EMP_DETAILS
FROM
FROM
[XXX](qvd)
i m getting invalid expression for the details table
 
					
				
		
one FROM to much
inner JOIN
Top5_project:
load distinct
EMP_ID,
TOP5_PROJECT,
EMP_DETAILS
FROM
FROM
[XXX](qvd)
 manoranjan_d
		
			manoranjan_d
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		its typo error its only one from
 manoranjan_d
		
			manoranjan_d
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Details:
LOAD distinct
EMPDESG
MAX(DATE(CREATE_DATE_NUM,'MMDDYYYY')) as DATE_ID,
EMP_ID,
SAL
FROM
[XXX](qvd)
WHERE(IsNull(STATUS));
inner JOIN
Top5_project:
load distinct
EMP_ID,
TOP5_PROJECT,
EMP_DETAILS
FROM
[XXX](qvd);
this is correct one but getting invlaid expression on MAX(DATE(CREATE_DATE_NUM,'MMDDYYYY')) as DATE_ID,
 PrashantSangle
		
			PrashantSangle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		max() is aggregated function need group by
Regards
 
					
				
		
 jagan
		
			jagan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You have to use Group by
Details:
LOAD distinct
EMPDESG
MAX(DATE(CREATE_DATE_NUM,'MMDDYYYY')) as DATE_ID,
EMP_ID,
SAL
FROM
[XXX](qvd)
WHERE(IsNull(STATUS))
GROUP BY EMPDESG, EMP_ID, SAL;
Hope this helps you.
Regards,
Jagan.
 
					
				
		
more typo Errors? comma and asDATE_ID without space?
Details:
LOAD distinct
EMPDESG ,
MAX(DATE(CREATE_DATE_NUM,'MMDDYYYY')) as DATE_ID,
EMP_ID,
SAL
FROM
[XXX](qvd)
WHERE(IsNull(STATUS));
 PrashantSangle
		
			PrashantSangle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Also max() convert date into number
so your final output is in number not in date
if want to convert it into date again then use
date(max(dateField),'DD/MM/YYYY')
Regards
 manoranjan_d
		
			manoranjan_d
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		THANKS
 
					
				
		
 jagan
		
			jagan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If you got the answer close this thread by giving correct and helpful answers to the posts which helps you in finding the answers.
Regards,
Jagan.
