|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/16/2008 9:38:13 AM
Posts: 2,
Visits: 17
|
|
Hi,
If anyone can help me in conversion of query to teradata
1.
isnull(ACC_DET.user_name,' ') as usr
2.
isnull(MAX(isnull(ACCESS_DATE,'')),' ') as max_access
3.
datediff(day, access_date , (select max(access_date) from cess_details )) < 90
Thanks and Regards
Rahul
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 10/3/2008 7:39:41 AM
Posts: 483,
Visits: 213
|
|
Hi Rahul,
ISNULL is proprietary, replace it with COALESCE, which is also supported by MS SQL Server. There are some minor differences, but you don't have to care about it in that case:
COALESCE(ACC_DET.user_name,' ') as usr
COALESCE(MAX(COALESCE(ACCESS_DATE,'')),' ') as max_access
Is access_date really a string and not a datetime?
DATEDIFF might be replaced by Standard SQL interval calculation, if it's in DAYs then it's even easier:
access_date > (select max(access_date) from cess_details ) - 90
Dieter
|
|
|
|