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.
| Author |
Topic |
|
lazloth
Starting Member
2 Posts |
Posted - 2002-08-06 : 16:39:22
|
| Hey gurus, question or two.I posted earlier regarding an issue with eliminating a delimiter during a bcp extract, which I have somewhat successfully resolved. I've run into another quirky situation, and was hoping someone might have a quick and dirty solution or idea.We're using bcp against a sybase staging table to pull various fields. [I mention this because I don't have access to the Books Online portion of mssql7]. The data extracted is fed to an adolescent middleware product which can only parse based on fixed length. Problem arises when the extract pulls a row with a null in a given field -- the field isn't padded to its char-length. (Remember, delimiters are moot.)Sooooo, to make a boring scenerio short, is it possible without an IF/THEN tree per field, to force dummy values within a bcp dump?Thanks again in advance. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-08-06 : 16:53:17
|
| Not with bcp, but DTS can do this handily (requires some programming though). However, if you can modify the data source to use a SELECT query, you can use a CASE statement or IsNull() function to replace nulls with the properly padded value.If you can post your table structures and some sample text file rows for comparison we can probably hammer it out for you. |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2002-08-06 : 17:08:47
|
| The SQL 7.0 BOL are available on the Microsoft website. I downloaded them from there just the other day. They may be in the MSDN subscriber area. I don't remember where I got them. They are about 12MB's.Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
|
|
|
|