Re: Dynamic Table Name is Source Query
From: Darren Green (darren.green_at_reply-to-newsgroup-sqldts.com)
Date: 03/08/04
- Next message: Darren Green: "Re: Which is better?"
- Previous message: Darren Green: "Re: DTS Error - Any ideas"
- In reply to: Dave Wong: "Dynamic Table Name is Source Query"
- Next in thread: Dave Wong: "Re: Dynamic Table Name is Source Query"
- Reply: Dave Wong: "Re: Dynamic Table Name is Source Query"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 8 Mar 2004 21:17:25 +0000
In message <FD336A20-0B7D-4B69-BE12-818154F4BDEB@microsoft.com>, Dave
Wong <anonymous@discussions.microsoft.com> writes
>I'm new to SQLServer, I have posted this question before in this forum.
>With my luck, I still can't get the machine to do what it suppose to do
>:-(.
>My task is to download a table from Oracle which the table name is
>contained in another table (cyclic_tbl_ctrl) based on date, which
>cyclic_tbl_ctrl contains 2 fields (ie. table_name: monthly_usage_02
>table_yrmth 200401, so I find the table name by "select table_name from
>cyclic_tbl_ctrl where yrmth = 200401" ). After if find the table_name,
>this "table_name" becomes the table where I get the data from. I have
>lookup books and other source for few days and still out of luck.
>Doesn't anyone nice enough to give me an example on this? Thanks.
Add an Exec SQL Task with the query in to return the table name. Use an
output parameter (Row value) to store this in a global variable.
Then use a dynamic properties task to take the global variable and
assign it to the SourceObjectName property of your DataPump task.
-- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org
- Next message: Darren Green: "Re: Which is better?"
- Previous message: Darren Green: "Re: DTS Error - Any ideas"
- In reply to: Dave Wong: "Dynamic Table Name is Source Query"
- Next in thread: Dave Wong: "Re: Dynamic Table Name is Source Query"
- Reply: Dave Wong: "Re: Dynamic Table Name is Source Query"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|