var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SQL Server BCP
DB Table Structure:
Data in Table after BCP:
col1 col2 col3 col4 col5
1 abc xyz ab xy
2 def mno de mn
3 ghi suv gh su
Basically the col4 and col5 are calculated values from col2 and col3 values.
Does SQL Server BCP utility support such kind of operation? Any pointers will be appreciated.
Why do you store them at all then?
Originally Posted by
Any value that can be calculated should not be stored in the first place
If it's explained somewhere, then most probably in the manual:
Any pointers will be appreciated.
But I don't think it's possible.
Why don't you import the existing columns, and then "compute" the missing values using an UPDATE statement?
Or define those columns as computed columns directly, then you don't need to worry about them at all.
Thanks for the reply. Even i was thinking in lines of updating the columns but my another concern is performance. I mean will updating or using calculated columns be efficient? Let me also go though the links you suggested.
I like the option of a view to calculate our values
You'd have your base table with three columns, which you BCP into, and then you create a view based on this table which includes the computed values
CREATE VIEW dbo.my_view99
, col1 + col2 As [col4]
, col2 - col3 As [col5]