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 2000 Forums
 Transact-SQL (2000)
 insert data with vary data

Author  Topic 

maodou
Starting Member

5 Posts

Posted - 2004-07-19 : 04:01:50
I have a table :
PCA_LOG(
PdLine char 3,
WC char 2,
McbSno Char 10,
IsPass tinyint ,
BadgeNo tinyint,
Cdt datetime 8)

now ,i want to inset this table with data,but the row:PCA_LOG,PdLine,WC,IsPass ,BadgeNo,Cdt is all fixed data,only McbSno is a scope of data,

how can i do it easily?
now I noly know import these data with excel file.


only test,have bug

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-07-19 : 09:02:01
Set column defaults on the columns with fixed data.
Then in the import data task ( assuming dts ) only use one Copy Column mapping for McbSno

/rockmoose
Go to Top of Page

maodou
Starting Member

5 Posts

Posted - 2004-07-19 : 20:19:34
thanks a lot

only test,have bug
Go to Top of Page
   

- Advertisement -