How to insert a byte[] into a binary field in vertica

Moderator: NorbertKrupa

Post Reply
sushanth
Newbie
Newbie
Posts: 6
Joined: Wed Sep 25, 2013 6:59 am

How to insert a byte[] into a binary field in vertica

Post by sushanth » Mon Sep 30, 2013 12:29 pm

My requirement is to export data in sqlserver to vertica.
Iam able to export the data using COPY from LOCAL command.

Steps which i followed is as follows

1. Get the data from table in .net datareader object
2. loop through the reader object and will create a csv file
3. export the csv file using COPY from LOCAL command.

All these works fine.

My issue is that my one of my column from the table is timestamp and in the reader object iam getting as byte[] and i want to insert this byte[] into a binary field in corresponding table in vertica.

how can i do this ?

Thanks in advance
Sushanth.B

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1802
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: How to insert a byte[] into a binary field in vertica

Post by JimKnicely » Tue Oct 01, 2013 1:23 pm

Hi sushanth,

I'm not sure I understand your question. What do you mean by a byte[]? Is this in reference to a column having the data type BIT?
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “ADO.NET”