Thanks Razzak.

That works provided the VARCHAR value can fit into a NOTE.

I have a number of records that are approaching 12,000 characters in length 
which results in this error during the  execution of the "INSERT INTO 
SELECT" SQL:

-WARNING- Column ColumnName will be truncated.

Once this happens, R:Base becomes unstable; either crashing outright or 
refusing to close down completely (I must kill the process).

I can get around that problem using a "ssub(VarcharColumn, 4092)" in the 
SELECT statement.

Is my only option to chunk the large VARCHAR values into blocks of 4092 
characters? 

Bob

On Monday, February 27, 2017 at 6:29:06 PM UTC-7, A. Razzak Memon wrote:
>
> Bob, 
>
> You can easily convert the VARCHAR data to NOTE data! 
>
> Try the exercise below to get an idea. 
>
> 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! 
>
> In your specific case, you can accomplish the task using TEMPORARY tables. 
>
> Once you have the required data as NOTE column, you can use the power of 
> UNLOAD or GATEWAY EXPORT options to extract data, on demand. 
>
> Very Best R:egards, 
>
> Razzak. 
>
>
> At 08:09 PM 2/27/2017, Bob Taylor wrote: 
>
> >R:BASE X, Enterprise, U.S. Version, Build: 10.0.2.20126 
> > 
> >I have this table: 
> > 
> >CREATE TABLE `NOTES_TABLE` + 
> >(`NOTE_KEY` BIGINT NOT NULLÂ  ('Value for column NOTE_KEY cannot be 
> null') , + 
> >Â `NOTE_VALUE` LONG VARCHAR NOT NULLÂ  ('Value 
> >for column NOTE_VALUE cannot be null') ) 
> > 
> >insert into notes_table(note_key, note_value) values (1, 'Testing'); 
> > 
> >I then use the File Gateway dialog to export the table: 
> > 
> >Select Table/View = NOTES_TABLE 
> >Format = Comma Separated Values (*.csv) 
> >File Name = NOTES_TABLE_EXTRACT.CSV 
> > 
> >All other options are left with the default state. 
> > 
> >When executed, the NOTES_TABLE_EXTRACT.CSV file contains this: 
> > 
> >NOTE_KEY,NOTE_VALUE 
> >2,"<BLOB>" 
> > 
> >What do I have to do to get the actual column 
> >contents ("Testing") to appear in the export? 
> > 
> >I've tried some of the other formats (xls, xml), 
> >but I always end up with some type of BLOB reference in the export. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to