Sqlplus to csv conversion of scientific number
source link: https://www.codesd.com/item/sqlplus-to-csv-conversion-of-scientific-number.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Sqlplus to csv conversion of scientific number
I have the following in Unix under my shell script:
SET linesize 2000
SET pagesize 50000
SET ECHO OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET MARKUP HTML OFF
set numwidth 17
set colsep ","
select accountnum, cardnum, name, address, number from employee;
Once it generates the output in .csv, cardnum and accountnum becomes scientific like:
5.30706E+15
I want it to be:
501889176278289
I know how to change it in Excel but since I am sending these reports to a client. I want it to go to them in the correct format so they don't have to change anything.
I would suggest this:
SELECT TO_CHAR(accountnum,'9999999999999999999') accountnum
, TO_CHAR(cardnum,'9999999999999999999') cardnum
, name, address, number
FROM employee;
Related Articles
In Access 2007 CSV Export: Disable Scientific Notation
CSV Conversion per Spring Batch
A decimal to binary conversion of a number that also has a fractional part
Extract the scientific number of the string in Java
Conversion of scientific notation - Scheme
Unable to flatten the JSON network to prepare CSV conversion using Ruby 2.1.4
Dual-to-Chain Conversion without Scientific Notation
How do I create a CSV so that a number appears as a string in the spreadsheet?
json to csv conversion to php
Redux Payload Conversion Form from Number to String on Blur
Binary record to CSV Conversation
Decrease-formatted conversion error analysis number as a number group separator
How to generate Sqlplus in csv file?
Date of conversion to week number
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK