number of columns in csv file [message #202459] |
Thu, 09 November 2006 22:50 |
monasingh
Messages: 229 Registered: May 2006 Location: Mumbai
|
Senior Member |
|
|
Hi,
These days I am working on converting sql to csv file.
I am familiar with that and know how to do that.
I want to know the number of columns with data in a csv file through sql query.
Please advice me how can I know the number of columns in a csv file.
Thanks,
Mona
|
|
|
|
|
Re: number of columns in csv file [message #202510 is a reply to message #202508] |
Fri, 10 November 2006 02:16 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If your Oracle version supports it, use of an external table could be useful in this case. Otherwise, open the CSV file in any text editor, copy one line and paste it as an argument of string function(s) you'll use to count commas, such as
SELECT count_commas('this, is, a, line, coppied, from, CSV, file')
FROM dual;
|
|
|