Hi Experts I have a Linked SQL 2005 server to an Oracle db
I want to query a table by a date field held in SQL server, can I do the following or do I need to create my SQL syntax before passing it the open query
DECLARE @RunDate datetime
SET @DateTime = (select RunDate from tblParameter)
SELECT * FROM OPENQUERY
SELECT * FROM ORACLE.MYTABLE WHERE ENTRY_DATE >=
TO_DATE(''' + @DateTime +''',''YYYY-MM-DD HH24:MI:SS'')'