473,834 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BCP -k option - Very urgent

Hi Everyone,

I tried to bcp in the data file to a table in sqlserver 2000.
The data file has got few blanks in certain columns.
My requirement is all those blanks has to be converted null while bcp
in the data.

1. I have tried giving the option -k - Didn't work
2. I have tried creating a format file with prefix length 2 i.e as the
column is character.
3. Initially it was giving string data truncation error due to the
service pack3. Then I updated the service pack 3 also.

Pls someone help me out as this is very critical.

Thanks,
Ganesh
Jul 20 '05 #1
1 1698
Hi

An empty string is not the same as a null value. The -k option will not help
you with that. If you want to ignore the whole column then you can use the
format file to ignore the column. If you want to change these values after
loading use a subsequent update statement.

John

"Ganesh Babu" <ga************ *****@wipro.com > wrote in message
news:35******** *************** ***@posting.goo gle.com...
Hi Everyone,

I tried to bcp in the data file to a table in sqlserver 2000.
The data file has got few blanks in certain columns.
My requirement is all those blanks has to be converted null while bcp
in the data.

1. I have tried giving the option -k - Didn't work
2. I have tried creating a format file with prefix length 2 i.e as the
column is character.
3. Initially it was giving string data truncation error due to the
service pack3. Then I updated the service pack 3 also.

Pls someone help me out as this is very critical.

Thanks,
Ganesh

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
3076
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
16
2978
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In: http://www.mywebsite.org/WebResource.axd?d=5WvLfhnJp5Lc8WhQSD4gdA2&t=632614619884218750 -------------------------------------------------------------------------------- System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. at...
3
6483
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from the socket is missing the last character (line feed). When the same text is sent without the urgent flag set, all of the characters are read. I'm reading the data using the blocking read call of the network stream class. The .NET...
2
1171
by: kaikalursatya2000 | last post by:
Hi every body, In my list box if i select one item corresponding to that 4 fields has to be appear below the list box and if i select another item only 1 field has to be appear below the list box and if i select another item no fields has to be selected. any one can do this and send it to my mail id "kaikalursatya2000@gmail.com"
2
1479
by: chetanpicha | last post by:
hello I created one site. I that there is lots of technical courses and lots of material to study. I want that visitors only can read this material online. I don't want that anybody can save it on their local disk. I solve many ways to stop saving the page but i cannot solve(prevent) the user to save page by using Save Page As.. option.. I want to disable that option. So can u pls help me. If anybody got the...
5
5172
by: =?Utf-8?B?c3VydHVyeg==?= | last post by:
Hi, I feel like a noob for asking this. When I publish a VB windows application, I want to disable the ability of the the user to continue when there is an unhandled exception. For example, if there is a bug in the program that causes an exception, I want the program to crash. If there is an unhandled exception the program is in an undefined state, and continuing could be dangerous. I'm surprised the
8
2429
by: Rory Becker | last post by:
A wise man once said: "Never put off until runtime what you can fix at compile time." Actually I think he said it about 10 minutes before I started this post. I am a firm believer, like the man in question, in "Option Strict On" by default. Actually I don't believe I have code where this is not the case.
2
8337
by: rockystar | last post by:
I am trying to set the value for a select list..the code is as below...It works fine in firefox, but dosent work in IE ...need urgent help ... _________________________________________________________________ var Name="<%=value%>"; var oForm = parent.window.opener.document.mainForm; var oSelect = oForm.elements; var oOptions = oSelect.options; var bAdd = true;
5
5456
by: swethak | last post by:
Hi, i am using the select box consits the option items in option tag .I have displayed the two items in option tag.i,e product name is to align left and product price is to align right .How can apply css to this feature. I used like this <option value="">Product name &nbsp;&nbsp;&nbsp;product price</option> But in case long length product names,short length product names it will not align properly. If any body please help...
0
9643
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10789
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7755
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3079
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.