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
 SQL Server Development (2000)
 upload file to a field of DataType Bit

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-11-04 : 08:52:12
i am trying to upload a file (Unicode) to a table
where 1 of its columns is of type Bit.
i always get the value 1
why is that?
thnaks i nadvance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

Kristen
Test

22859 Posts

Posted - 2007-11-04 : 13:17:06
What's the value in the file?
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-11-04 : 15:27:08
sometimes its 1 sometimes 0
i tries to switch between them and even top ut True in the file but no luck

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-11-04 : 17:07:04
1 and 0 should correctly import into a BIT datatype column. (I don't think that True/False will work)

Are there leading / trailing spaces or anything like that which might be getting in the way?

Perhaps try importing into a VARCHAR(50) column and then do:

SELECT ']' + MyColumn + '['
FROM MyTable

so that you can see if any "extra" characters got imported?

Kristen
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-11-05 : 03:40:45
ok i will try but i dont hink there is a problem beacuse the colum seperated with Tabs

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page
   

- Advertisement -