Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Retriving table name as field in table

Author  Topic 

varalakshmi
Yak Posting Veteran

98 Posts

Posted - 2007-12-28 : 05:53:52
Hi,

Im using many source tables in a dataflow from which data has to be union in to a single table.While doing this i have to pull the table names in to the destination table.How to get the table names as column values?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2007-12-28 : 09:38:38
Are you using OLEDB data source? then select SQL query option and hard code each table names along with other fields from table and attach them to Union step

ex: SELECT 'Table1' AS 'TableName',
Field1,
Field2
.................
FROM Table1
Go to Top of Page

varalakshmi
Yak Posting Veteran

98 Posts

Posted - 2008-01-02 : 02:08:40
thank u...
Go to Top of Page
   

- Advertisement -