Thanks Razzak I’ll give it a try.

Dan Goldberg

From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak Memon
Sent: Monday, June 08, 2015 2:07 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: export varchar text to csv

Dan,

In order to export VARCHAR data as TEXT, first you need to convert the data as 
NOTE.

Here's how:

Example:

TableA:
ColumnA INTEGER
ColumnB VARCHAR

TableB:
ColumnA INTEGER
ColumnC NOTE

Routine to convert VARCHAR to NOTE Field:

INSERT INTO TableB (ColumnA, ColumnC) SELECT ColumnA, ColumnB FROM TableA

The resulting ColumnC in TableB will include the converted VARCHAR to NOTE.

That's all there is to it!

Once you understand this trick, you should be able to achieve your goal.

Very Best R:egards,

Razzak.

www.rbase.com<http://www.rbase.com>
www.rbaseX.com<http://www.rbaseX.com>
www.facebook.com/rbase<http://www.facebook.com/rbase>
--
32 years of continuous innovation!
17 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--

On Mon, Jun 8, 2015 at 4:01 PM, Dan Goldberg 
<[email protected]<mailto:[email protected]>> wrote:
I am trying to export varchar text to csv but when I do the varchar shows as 
<blob>.

So I thought I would try to create a table with text fields and use the ctxt 
function but it does not work.

Hourssales1, hoursservice1, hoursparts1 are the field I am trying to get the 
varchar text data into.

CREATE TEMP TABLE tmpdealer (dealerid INT, dlrname TEXT 30, address1 +
TEXT 30, city TEXT 40, STATE TEXT 2, zipcode TEXT 10, country +
TEXT 20, typeofunit TEXT 20, hourssales1 TEXT 150, hoursservice1 +
TEXT 150, hoursparts1 TEXT 150, phonenumber TEXT 14, generalemail +
TEXT 150, loclat REAL, loclong REAL, typeofuniti INTEGER)

INSERT +
INTO tmpdealer (dealerid, dlrname, address1, city, +
STATE, zipcode, country, typeofunit, hourssales1, hoursservice1, hoursparts1,+
phonenumber, generalemail, loclat, loclong) +
SELECT dealerid, dlrname, address1, city, +
STATE, zipcode, country, typeofunit, (CTXT(hourssales)), +
(CTXT(hoursservice)), (CTXT(hoursparts)), phonenumber, generalemail, loclat,+
loclong FROM dealer

Does anybody have an idea on how to convert it?

There must be a way to convert varchar text data to regular text data but have 
not found it yet…

Tia

Dan Goldberg


Reply via email to