473,386 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Loading data into CSV files

I am trying to load some data into CSV files but I get this error message:

ORA-00922, missing or invalid option.

set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on
spool AdvisorClientGroupFact.txt
select MONTH_DSI_ID || ',' || GRP_DSI_ID || ',' ||ADV_DSI_ID || ',' || GRP_STAT_DSI_ID || ',' || VALUE_TIER_DSI_ID || ',' || PLATFM_DSI_ID || ',' || FP_STAT_DSI_ID || ',' || ORG_DSI_ID || ',' || YEAR_NBR || ',' || ADV_NBR || ',' || MONTH_NBR || ',' || GRP_STAT_CD || ',' || GRP_STAT_DESC || ',' || VALUE_TIER_CD || ',' || VALUE_TIER_DESC || ',' || SUMMARY_TIER_CD || ',' || SUMMARY_TIER_DESC || ',' || PLATFM_CD || ',' || PLATFM_NME || ',' || FP_STAT_CD || ',' || FP_STAT_DESC || ',' || GRP_NET_WORTH_CD || ',' || ACQ_ROLLING_12MO_HVC_IND || ',' || HVC_IND || ',' || HPC_IND || ',' ||GRP_ACT_ACCTS_CAMS_CNT || ',' || GRP_DRV_CASH_VAL_AMT || ',' || GRP_DRV_TOT_VAL_AMT || ',' || GRP_GDC_YTD_TOS_AMT || ',' || GRP_GDC_YTD_TOT_AMT || ',' || GRP_IAP_MAX_VAL || ',' || GRP_DRV_ANL_INCM_AMT || ',' || GRP_LOR_VAL|| ',' || NBR_PROD_TYPES_CNT || ',' || NOTPPT_TOT_VAL_AMT || ',' || QUAL_TOT_VAL_AMT || ',' || VAR_ANNTY_TOT_VAL_AMT || ',' || FX_ANNTY_TOT_VAL_AMT || ',' || FUNDS_PROP_TOT_VAL_AMT || ',' || BRKR_PROP_TOT_VAL_AMT || ',' || BRKR_NON_PROP_TOT_VAL_AMT || ',' || BRKR_OTHER_TOT_VAL_AMT || ',' || SPS_PROP_TOT_VAL_AMT || ',' || SPS_NON_PROP_TOT_VAL_AMT || ',' || SPS_OTHER_TOT_VAL_AMT || ',' || PREMIER_PROP_TOT_VAL_AMT || ',' || PREMIER_NON_PROP_TOT_VAL_AMT || ',' || DIR_INV_TOT_VAL_AMT || ',' || OTHER_TOT_VAL_AMT || ',' || CERTS_TOT_VAL_AMT || ',' || INS_TOT_VAL_AMT || ',' || ONE_ACCOUNT_STATUS_IND || ',' || NEW_GRP_IND || ',' || ART_FP_ACTV_STATUS_IND || ',' || POST_DTS
from T_ADVISOR_CLIENT_GROUP_FACT
where grp_dsi_id < 200000010000
spool off
Sep 25 '06 #1
2 3104
I added a ; works now.

Ok I tried this in SQL PLUS and it works only thing is it wraps in multiple lines and not just one line.

Is there a way to have the data to be displayed in one line and not in multiple lines?
set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on
spool AdvisorClientGroupFact.txt
select MONTH_DSI_ID || ',' || GRP_DSI_ID || ',' ||ADV_DSI_ID || ',' || GRP_STAT_DSI_ID || ',' || VALUE_TIER_DSI_ID || ',' || PLATFM_DSI_ID || ',' || FP_STAT_DSI_ID || ',' || ORG_DSI_ID || ',' || YEAR_NBR || ',' || ADV_NBR || ',' || MONTH_NBR || ',' || GRP_STAT_CD || ',' || GRP_STAT_DESC || ',' || VALUE_TIER_CD || ',' || VALUE_TIER_DESC || ',' || SUMMARY_TIER_CD || ',' || SUMMARY_TIER_DESC || ',' || PLATFM_CD || ',' || PLATFM_NME || ',' || FP_STAT_CD || ',' || FP_STAT_DESC || ',' || GRP_NET_WORTH_CD || ',' || ACQ_ROLLING_12MO_HVC_IND || ',' || HVC_IND || ',' || HPC_IND || ',' ||GRP_ACT_ACCTS_CAMS_CNT || ',' || GRP_DRV_CASH_VAL_AMT || ',' || GRP_DRV_TOT_VAL_AMT || ',' || GRP_GDC_YTD_TOS_AMT || ',' || GRP_GDC_YTD_TOT_AMT || ',' || GRP_IAP_MAX_VAL || ',' || GRP_DRV_ANL_INCM_AMT || ',' || GRP_LOR_VAL|| ',' || NBR_PROD_TYPES_CNT || ',' || NOTPPT_TOT_VAL_AMT || ',' || QUAL_TOT_VAL_AMT || ',' || VAR_ANNTY_TOT_VAL_AMT || ',' || FX_ANNTY_TOT_VAL_AMT || ',' || FUNDS_PROP_TOT_VAL_AMT || ',' || BRKR_PROP_TOT_VAL_AMT || ',' || BRKR_NON_PROP_TOT_VAL_AMT || ',' || BRKR_OTHER_TOT_VAL_AMT || ',' || SPS_PROP_TOT_VAL_AMT || ',' || SPS_NON_PROP_TOT_VAL_AMT || ',' || SPS_OTHER_TOT_VAL_AMT || ',' || PREMIER_PROP_TOT_VAL_AMT || ',' || PREMIER_NON_PROP_TOT_VAL_AMT || ',' || PREMIER_OTHER_TOT_VAL_AMT || ',' || DIR_INV_TOT_VAL_AMT || ',' || OTHER_TOT_VAL_AMT || ',' || CERTS_TOT_VAL_AMT || ',' || INS_TOT_VAL_AMT || ',' || ONE_ACCOUNT_STATUS_IND || ',' || NEW_GRP_IND || ',' || ART_FP_ACTV_STATUS_IND || ',' || POST_DTS
from T_ADVISOR_CLIENT_GROUP_FACT
where grp_dsi_id < 200000010000;
spool off
Sep 26 '06 #2
mdsami
2
Instead of all these hard work you can better use third party tools on the internet one such tool is Data Loader found at www.dbload.com

Ashi
Jun 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ram | last post by:
We are trying to load text tab delimited files into SQL server using informatica 5.1 version. The text files are FTPed to a local server and then files are moved to applicable folder before...
5
by: Olaf Gschweng | last post by:
We're new into DB2 and have some problem with DB2 8.1 (?) on a Linux system. We load some big tables of a DB2 database from files every day. We do a "DELETE FROM table" for each table and then we...
1
by: ozzy.osborn | last post by:
Hello All, I have been struggling with a cross browser solution to loading external javascript files on the fly. I have been successful using the following code in IE6: var newScr =...
10
by: eholz1 | last post by:
Hello Members, I am setting up a photo website. I have decided to use PHP and MySQL. I can load jpeg files into the table (medium blob, or even longtext) and get the image(s) to display without...
5
by: yeoj13 | last post by:
Hello, I have a db2load script I'm using to populate a large table. Ideally, my target table is required to have "Not Null" constraints on a number of different columns. I've noticed a ...
0
by: NickW | last post by:
I have written a stored procedure that is used to load data into a SQL Server 2000 and 2005 databases from some 40ish different text files. One of the text files is loading all of the rows apart from...
15
by: pdhb_1 | last post by:
I'm trying to run Apache2.2.6 with php. However, I keep getting a long list of error messages in the log file indicating that includes are failing. For example, "PHP Warning: PHP Startup:...
1
by: heather.j.mills | last post by:
I received a DVD worth of DB2 files of the structure: TblName.SYSCNTL TblName.SYSREC I have no experience with DB2, but am pretty strong in SQL. I see that the CNTL are table definition type...
1
by: hvellani | last post by:
Okay here is my problem... I have multiple csv files with data in each file. They are connected via foreign keys (with each table having its on primary key). I want to load these tables into an...
3
by: DR | last post by:
Why is its substantialy slower to load 50GB of gzipped file (20GB gzipped file) then loading 50GB unzipped data? im using System.IO.Compression.GZipStream and its not maxing out the cpu while...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.