system
August 4, 2015, 10:59pm
#1
I am making a two server unx using IDT. I need to change this
@catalog (‘FMHP-GHP-EZCAP-DB-CN’).“EZ_FN.dbo”.“CLAIM_BATCHSUMMARY_ALL”.“CREATEDATE” to use something like this
Cast (Convert(DATE , CLAIM_BATCHSUMMARY_ALL.CREATEDATE, 101) as datetime)
I try but I keep getting errors
Tiger_Dan (BOB member since 2015-07-07)
system
August 5, 2015, 7:04am
#2
Have a look here: DB-specific Relative Dates SQL Server, Oracle, Netezza, DB2
Halfway down the page, I posted several bits of code for dates that work in multi-source IDT. Took me ages to figure out but IDT has its own peculiar syntax so that code works with different databases.
May not help, but might point you in the right direction!
debbie
Debbie (BOB member since 2005-03-01)
system
August 7, 2015, 10:35pm
#3
dear moderator
I am sorry.
But can you or anyone please tell me where I can see some examples
Thanks
Tiger_Dan (BOB member since 2015-07-07)
system
August 9, 2015, 12:11pm
#4
Dear Tiger_Dan - this is what Debbie meant:
So in the interests of saving other people’s sanity, here are some relative dates that work in multi-source oracle/SQL Server BI4 IDT:
(Start of) first day of current month:
cast(timestampadd('SQL_TSI_DAY',-dayofmonth(now())+1,now()) as date)
(Start of) first day of last month:
cast(timestampadd('SQL_TSI_MONTH',-1,timestampadd('SQL_TSI_DAY',-dayofmonth(now())+1,now())) as date)
(End of) last day of last month:
timestampadd('SQL_TSI_SECOND',-1,cast(cast(timestampadd('SQL_TSI_DAY',-dayofmonth(…
Nick Daniels (BOB member since 2002-08-15)
system
August 10, 2015, 9:03am
#5
Also:-
https://bobj-board.org/t/227720
Mak 1 (BOB member since 2005-01-06)