January 23, 2009 at 5:12 pm
I'm looking for a way to get the server time stamp of an Oracle DB from Sql Server. We have it as a linked server, so i'd imagine I'd use OPENQUERY. Anyone know the syntax?
January 23, 2009 at 5:39 pm
oracle has SYSDATE ahs an equivalent of our GetDate();
oracle would be SELECT SYSDATE FROM DUAL;
(oracle syntax requires a FROM clause...DUAL is a dummy table that can be used to supply the source.
Lowell
January 23, 2009 at 6:26 pm
thanks. that worked
January 23, 2009 at 6:32 pm
Lowell (1/23/2009)
Lowell (last pork chopped for stupidity on 01/22/2008 11:30 pm)
Man, I hope that's in good humor... If it's not, I'm really sorry.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 23, 2009 at 6:42 pm
got another question... same type actually.
what if it's a linked server that i want the current_timestamp for?
select current_timestamp from linkedserver.????.dbo.????
normally we do just "select current_timestamp" which is a function on the local server. but, assuming i have permissions, how would i grab it from another linked server?
January 23, 2009 at 7:49 pm
since current_timestamp is a variable, it really doesn't matter which table you get it from;
by same question, you mean from a linked sql server?
i did select top 1 current_timestamp from linkedSQLserver.master.dbo.sysobjects, and it worked no problem;
for fun i did a dif database with the same results:
select current_timestamp from stormsql.geo.dbo.sysobjects
Lowell
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply