Page 1 of 1

double quotes for the numbers

Posted: Wed Dec 20, 2006 3:35 pm
by kirankota79
I am taking a table from db2 database into a sequential file. In the db2 table there are two double (data type) columns. The data looks like follow:

3.87675610000000006E+01 for both the columns.

When i set the format as double quote (") for sequential file, iam getting the doublequotes for all the columns except these two. and i cannot see the rows containing this type of data from datastage view. can anybody please tell me how i will get the doublequotes for these columns!

Posted: Wed Dec 20, 2006 3:52 pm
by ray.wurlod
If you must, select them as VarChar, possibly using a CAST function in the column derivation in the DB2 stage. But why do you think you need double quotes? It's a numeric value - the "rules" for CSV files specify quotes for character string data.

Posted: Wed Dec 20, 2006 7:15 pm
by kirankota79
can u tell me the rules for CSV for numeric values?

Posted: Wed Dec 20, 2006 7:54 pm
by I_Server_Whale
No quotes for Numeric values. :wink:

Posted: Wed Dec 20, 2006 7:54 pm
by chulett
Seeing as how quotes are only for character strings, numeric values would fall into the "no quotes" camp.

Posted: Wed Dec 20, 2006 8:16 pm
by kirankota79
I have a mix of columns with character and numeric. How can i proceed then?

Posted: Wed Dec 20, 2006 10:15 pm
by ray.wurlod
With impunity.

Set the format for Quote character to match the quotes on your character strings. Numeric files will be expected not to be quoted.