dbTalk Databases Forums  

Importing Dynamic Table Name from Oracle Help

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Importing Dynamic Table Name from Oracle Help in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave Wong
 
Posts: n/a

Default Importing Dynamic Table Name from Oracle Help - 03-01-2004 , 01:46 AM






I've a job that needs to download a table from Oracle, which table name is stored in an Oracle table. I can use dynamic sql in Oracle, so it can have the same name every time, which needs a lot of space and sounds very stupid. Is there a better way of doing it? Thanks in advance for your help

Exampl

Cyclic Table in Oracl

table_name mont
table01 20040
table02 20040
..
..
..
..



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Importing Dynamic Table Name from Oracle Help - 03-01-2004 , 02:01 AM






As long as the structure reamins the same you simply need to rename the
DestinationObjectName of the DataPump task.
You can do this dynamically using

Dynamic Properties Task
Active Script task (If you can script the logic behind table naming)

Changing the DataPump Source and Destination Tables
(http://www.sqldts.com/default.aspx?213)

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Dave Wong" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I've a job that needs to download a table from Oracle, which table name is
stored in an Oracle table. I can use dynamic sql in Oracle, so it can have
the same name every time, which needs a lot of space and sounds very stupid.
Is there a better way of doing it? Thanks in advance for your help.
Quote:
Example

Cyclic Table in Oracle

table_name month
table01 200401
table02 200402
..
..
..
..





Reply With Quote
  #3  
Old   
Dave Wong
 
Posts: n/a

Default Re: Importing Dynamic Table Name from Oracle Help - 03-01-2004 , 03:06 AM



Thanks! But I only need to select certain fields from the Oracle table, how do I put the varable into the SQL for Oracle
ie. In the SQL box, I usually put in select field1, field2, field3 from table01 where cust_segment = 'MASS' (table01 is the tablename being selected from the cyclic table


----- Allan Mitchell wrote: ----

As long as the structure reamins the same you simply need to rename th
DestinationObjectName of the DataPump task
You can do this dynamically usin

Dynamic Properties Tas
Active Script task (If you can script the logic behind table naming

Changing the DataPump Source and Destination Table
(http://www.sqldts.com/default.aspx?213

--

---------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP
www.allisonmitchell.com - Expert SQL Server Consultancy
www.SQLDTS.com - The site for all your DTS needs
I support PASS - the definitive, global communit
for SQL Server professionals - http://www.sqlpass.or


"Dave Wong" <anonymous (AT) discussions (DOT) microsoft.com> wrote in messag
news:5100D506-C822-43DA-AFA7-949F6A3298AA (AT) microsoft (DOT) com..
Quote:
I've a job that needs to download a table from Oracle, which table name i
stored in an Oracle table. I can use dynamic sql in Oracle, so it can hav
the same name every time, which needs a lot of space and sounds very stupid
Is there a better way of doing it? Thanks in advance for your help
Quote:
Exampl
Cyclic Table in Oracl
table_name mont
table01 20040
table02 20040
.
.
.
.


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Importing Dynamic Table Name from Oracle Help - 03-01-2004 , 04:12 AM



OK then that is the SourceSQLStatement property of the DataPump task.


--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Dave Wong" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks! But I only need to select certain fields from the Oracle table,
how do I put the varable into the SQL for Oracle?
ie. In the SQL box, I usually put in select field1, field2, field3 from
table01 where cust_segment = 'MASS' (table01 is the tablename being selected
from the cyclic table )
Quote:

----- Allan Mitchell wrote: -----

As long as the structure reamins the same you simply need to rename
the
DestinationObjectName of the DataPump task.
You can do this dynamically using

Dynamic Properties Task
Active Script task (If you can script the logic behind table naming)

Changing the DataPump Source and Destination Tables
(http://www.sqldts.com/default.aspx?213)

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Dave Wong" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:5100D506-C822-43DA-AFA7-949F6A3298AA (AT) microsoft (DOT) com...
I've a job that needs to download a table from Oracle, which table
name is
stored in an Oracle table. I can use dynamic sql in Oracle, so it
can have
the same name every time, which needs a lot of space and sounds very
stupid.
Is there a better way of doing it? Thanks in advance for your help.
Example
Cyclic Table in Oracle
table_name month
table01 200401
table02 200402
..
..
..
..




Reply With Quote
  #5  
Old   
Dave Wong
 
Posts: n/a

Default Re: Importing Dynamic Table Name from Oracle Help - 03-02-2004 , 04:26 AM



Thanks Alan. I'm fairly new to SQLServer, have problem embedding the table name into the SQL pass to Oracle. Looking up the books right now :-(

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.