September 8, 2008 at 3:29 am
Hi
I want to save a varbinary value from a varbinary filed in my database into a file in his binary form,not hexa and I don't really know how...Can you help me?
Thx
September 8, 2008 at 9:23 am
BCP should be able to do that. Check it out and see if it will do what you need.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
September 9, 2008 at 3:29 am
I'm checking...but the solution hasn't apeared...
simple things work.i'm trying to save binary in txt file...maybe I'm doing something wrong here....I don't know...
September 9, 2008 at 8:53 am
I have a ...let's say ...more complete question ...because I tried with bcp and using sqlcmd and I've obtained some results but not the ones I search for ...so, here is the question: Can I obtain the binary value from a varbinary field,not hexa,the value it normaly returns?
Thx
September 9, 2008 at 9:04 am
I think I need to know a bit more about what you're storing and how you're trying to retrieve it. You mentioned something about text files, but not why they're stored as varbinary (instead of varchar or text), nor how you're trying to retrieve them from the database.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
September 9, 2008 at 9:18 am
In my database I have varbinary values,and I want to export then in a txt file,the values...
for instance I want to have on every row the binary value stored in my database.
In the database I have aprox 200 rows...It's not very big
I hope I was clear.
I tried to extract them but I get the hexa value...and if I read corect on msdn that's the way they are stored, hexa.And I'm asking if I can extract the binary value and put it in a txt file...
and sorry for not being so clear:D...
September 9, 2008 at 1:02 pm
They're stored as hex. You could build a converter to convert to binary, but there isn't one in SQL that I know of.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
September 9, 2008 at 1:19 pm
Can you post an example of your varbinary columns contents and what you want to see in the text file?
For example, if the VARBINARY column contains 0x616263 do you want to see 'abc' in the text file or '01100001...'?
September 10, 2008 at 12:26 am
I want to see '01101010011', but I still tried and I think I'm giving up:)
for instance I exported in a text file and I open it with UltraEdit and I choose the the Hex edit option and I have the binary form, but i can't use it.
So....I think I'll renounce
Thank you for your help...
September 12, 2008 at 1:24 am
Hi there,
I created a procedure for converting decmal to binary, hex, and oct... although... it only converts numbers:P
_____________________________________________
[font="Comic Sans MS"]Quatrei Quorizawa[/font]
:):D:P;):w00t::cool::hehe:
MABUHAY PHILIPPINES!
September 12, 2008 at 1:28 am
and what do I have to do to make you share it with us/me?:D
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply