How could I use a LookUp Query in a DataTransform Task to reach my goal?
- From: icebold54@xxxxxxxxxxx
- Date: 6 Jun 2005 06:10:44 -0700
I'm interested in doing the following thing:
I have this stored procedure:
CREATE PROCEDURE usp_sequence
@idseq int OUTPUT
AS
BEGIN TRAN
SET @idseq = (SELECT idSequence FROM tblSEQUENCE)
SET @idseq = @idseq + 1
UPDATE tblSEQUENCE
SET idSequence = @idseq
COMMIT TRAN
GO
which takes values from this table:
CREATE TABLE [dbo].[tblSEQUENCE] (
[idSequence] [int] NOT NULL
) ON [PRIMARY]
GO
I want to use the stored procedure to fill the PK column of this table
:
CREATE TABLE [dbo].[TEST] (
[PK] [int] NOT NULL ,
[Field_1] [varchar] (255) NULL ,
[Field_2] [varchar] (255) NULL ,
[Field_3] [varchar] (255) NULL
) ON [PRIMARY]
GO
I DO KNOW I could use an "Execute SQL Task" (the easiest and quickest
way) with some elaborated SQL code but I've been asked not to do so.
Now, I'm trying to do it with a LookUp Query associated to a
"DataTransform Task" however I'm unable to succeed in it.
Anybody could tell me how could I use a LookUp query in a "Data
Transform Task" to assign an incremental value to the PK column in the
same fashion as would do the procedure?
Thank you from beforehand to anyone who can answer this question.
Greetings,
David Grant
.
- Follow-Ups:
- Re: How could I use a LookUp Query in a DataTransform Task to reach my goal?
- From: Allan Mitchell
- Re: How could I use a LookUp Query in a DataTransform Task to reach my goal?
- From: Yunus's Group
- Re: How could I use a LookUp Query in a DataTransform Task to reach my goal?
- Prev by Date: Import Flat file Data into Sql Server with Transaction
- Next by Date: Re: Importing Hyperlinks
- Previous by thread: Import Flat file Data into Sql Server with Transaction
- Next by thread: Re: How could I use a LookUp Query in a DataTransform Task to reach my goal?
- Index(es):
Relevant Pages
|