Viewing 10 posts - 1 through 10 (of 10 total)
Hi rolf
take a look at the ne feature in 2005 called CTE
Good luck
March 29, 2007 at 1:40 am
Rick,
I have a little prc for this, you can direkt query to linked server
--------------------------
CREATE PROCEDURE [dbo].[syp_DOLINKQUERY]
@QER varchar(2000)
AS
-- query a linked table
--...
November 3, 2006 at 10:34 am
have you tried with openquery, something like this:
select * from openquery (POD,'select LAST_NAME FROM PER_ALL_PEOPLE_F WHERE LAST_NAME = ''Davis''')
November 3, 2006 at 8:41 am
Hi Rick,
I run in the same problem with SSIS reading number fields (without any dimensions in the oracle-table), I think the problem is the NUMBER definition with no dimension,
I made...
November 3, 2006 at 7:50 am
Hi I have done something similar,
I think the openquery with parameters will not work directly
so I have done it by dynamic query, make cursor for org Tabel and parse
every record...
November 24, 2005 at 1:47 pm
just like this
declare @s1 as varchar(2000)
set @ORDERID = 12345
set @s1 = 'SELECT O.CustomerAccountID FROM dbo.SS_ORDER O WHERE O.OrderID = ' + @ORDERID
execute dbo.syp_DOLINKQUERY1 @s1
just run the procedure dbo.syp_DOLINKQUERY1 with...
July 30, 2005 at 5:58 am
try this
CREATE PROCEDURE dbo.syp_DOLINKQUERY1
@QER Varchar(2000)
AS
-- query a linked tabel
declare @QER1 varchar(2000)
declare @LINK varchar (100)
declare @nsql nvarchar (4000)
set @link='MFG'
set @QER1= replace(@qer,char(39),char(39)+char(39))
set @qer='select * from openquery(' + @link + ',' + char(39)...
July 29, 2005 at 7:32 am
Sorry,
the dolinkquery is a bit wrong! , the where-clause is wrong for the link
--------------------------------------------------
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
ALTER PROCEDURE dbo.syp_DOLINKQUERY1
@QER varchar(2000)
AS
-- query a linked table
-- wm 01.2005...
April 29, 2005 at 4:52 am
here is another one for insert
CREATE PROCEDURE dbo.syp_DOLINKINSERT
@TABLE varchar(2000), -- the table name
@FIELDS varchar(2000), -- AA,AB,AC
@VALUES varchar(2000) -- 'TEST',4711,'AA'
AS
-- do the INSERT on a linked table
-- wm 01.2004
declare @QER...
March 9, 2005 at 1:23 am
hi
i had the same problem with oracle, so i done this procedure,you can put the query in @QER for the linked database, itworks fine for me
CREATE PROCEDURE dbo.syp_DOLINKQUERY1
@QER varchar(2000)
AS
--...
March 9, 2005 at 1:13 am
Viewing 10 posts - 1 through 10 (of 10 total)