If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Load a string into a table column

Started by tneogy1, 10 Apr 2012 02:04:38 AM

Previous topic - Next topic

tneogy1

I have a source csv file to load into a table through datamanager. File has a string field and string has newline character for a single record. Example
"I am a good boy..
I am here
I like cognos"
I like to load this type of string in a single column of a table in target database. Could you please let me know the process to do this?

MFGF

Use SQLText Designer to configure a definition file which describes your CSV, then you can add a data source pointing to the definition file, load it as normal (using SQL) in a Fact build and deliver the data to a relational table.

Regards,

MF.
Meep!

tneogy1

#2
I don't think this will solve the issue. Please find the definition below :
-----------------------------------------------------------
FILENAME 'E:\sample.csv'
VERSION 7
CHARSET 'windows-1252'
HEADERLINES 1
TRAILERLINES 0
ROWERROR 'ERROR'
QUOTECHAR 'DOUBLE'
DECIMALSEP '.'
THOUSANDSEP ','
LINEDELIMITER 'NL'
RECORD ','
COLUMN 'EMP NO' 'INTEGER' 20 'NULL' 'KEY'
COLUMN 'NAME' 'CHAR' 50 'NULL' 'NOT KEY'
COLUMN 'COMMENT' 'CHAR' 250 'NULL' 'NOT KEY'
COLUMN 'DEPT NO' 'INTEGER' 20 'NULL' 'NOT KEY'
-------------------------------------------------------------------
Please find the example record : 

File headers are : EMP NO,NAME,COMMENT,DEPT NO
-------------------------------------------------------------------
Example of a record : 12345, Jon,"I am a good boy..
I am here
I like cognos",100
------------------------------------------------------------------
Now if you process the file, you will get an error in the specifid record that 'incorrect no of column'. However I want to process the COMMENT  as a single string