Copying text in Sql*Plus
I seem to be unable to copy and paste text using the "highlight text and right-click" procedure in Sql*Plus 8.0.6.0.0. The right-mouse button seems to work in everything else so it doesn't seem to be the mouse that is the problem. Does anybody know if this could be due to the way Sql*Plus is set up or some other Oracle related problem?
You can either do SET PAGESIZE 0 which turns off all headings.
Of you can do SET PAGESIZE 50000 which will reprint the headings every 50,000 lines.
50,000 is the max. I don't know of a way to show the headings once, and only once. (you can turn off headings and fake them one time with a select ... from dual before your main query).
Similar Messages
-
Am trying to use the copy command in SQL*Plus to copy a table
from an Oracle database to a local table on my machine in
another format. Keep getting errors. It seems to contact the
remote machine fine, but can't locate my local machine or figure
out where to put it. Any suggestions on how to set up my
Windows 95 machine to get the copy command working would be
greatly appreciated. Thank you.
nullHi,
Here is an example :
SQL> copy from scott/tiger@q4_production_server create ord -
using select * from ord;Array fetch/bind size is 15. (arraysize is 15)
Will commit when done. (copycommit is 0)
Maximum long size is 80. (long is 80)
Table ORD created.
21 rows selected from scott@q4_production_server.
21 rows inserted into ORD.
21 rows committed into ORD at DEFAULT HOST connection.
Hope this helps,
Bala
Laura Michaels (guest) wrote:
: Am trying to use the copy command in SQL*Plus to copy a table
: from an Oracle database to a local table on my machine in
: another format. Keep getting errors. It seems to contact the
: remote machine fine, but can't locate my local machine or
figure
: out where to put it. Any suggestions on how to set up my
: Windows 95 machine to get the copy command working would be
: greatly appreciated. Thank you.
null -
How to copy procedure to sql plus window.
I am trying to copy my procedure from note pad to sql plus window and some of the texts are being cut off. How can I copy the entire procedure to sql plus window.
thanksThank you guys this is what is happning.
1 CREATE OR REPLACE PROCEDURE ITEMCUSTOMPAGING(
2 p_desc in itemlist.idescr%type,
3 p_letting in bidlet.datelet%type,
4 p_letting1 in bidlet.datelet%type,
5 p_sort in NUMBER ,
6 p_order in VARCHAR ,
7 i_results out sys_refcursor
8 )
9 AS
10 BEGIN
11 OPEN i_results FOR
12 SELECT g.csecnum , e.iplineno , substr(e.eiitem ,1,4)||'.'||substr(e.eiitem ,5,9) ItemNum,
13 INITCAP(i.idescr ||' '|| e.isupdes) Descrip,INITCAP(i.idescrl ||' '|| e.isupdes) Descrip
14 DECODE (TRIM (p.prroute), NULL, 'N/A',p.prroute) Route,b.datelet ,trim(to_char(b.datelet ,'
15 FROM itemlist i, estitem e, estcatg g, propproj x, proposal p, bidlet b, letprop l
16 WHERE p.contid = x.contid AND x.pcn = g.pcn AND e.pcn = g.pcn AND e.cn = g.cn AND i.item =
17 AND i.ispecyr = p.cspecyr AND e.iplineno <> ' ' AND e.eiitem <> '2550601/01000'
18 AND e.eiitem <> '2565601/00031' AND e.eiitem <> '2565601/00032' AND e.eiitem <> '2565601/0003
19 AND e.eiitem <> '2402601/01000'
20 AND (i.idescr like TRIM(UPPER(p_desc))||'%' or i.idescrl like TRIM( UPPER(p_desc))||'%'
21 AND b.datelet between p_letting and p_letting1
22 AND p.contid = l.lcontid
23 AND l.letting = b.letting
24 AND SUBSTR (l.lcontid, 4, 4) <= '5'
25 GROUP BY g.csecnum,i.idescr,b.datelet,i.iunits,p.clocat1,p.clocat2,p.contid,p.cdescr, p.cproj
26 ORDER BY p_sort p_order;
27* End;
QL> /
arning: Procedure created with compilation errors.
QL> SHOW ERR
rrors for PROCEDURE ITEMCUSTOMPAGING:
INE/COL ERROR
2/8 PL/SQL: SQL Statement ignored
6/25 PL/SQL: ORA-00933: SQL command not properly ended
QL> -
CONNECT and ALTER statements in a Procedure. COPY command in SQL*Plus
Hi people,
Is it possible to use the SQL commands, "CONNECT" and "ALTER TABLE" in a procedure, function or trigger?
In one of my audit procedures, I need to connect to a financial database (FROM the applications database), and then proceed to alter a number of tables based on certain data. I'm sure I've done it before, but I can't remember how! Isn't there a command such as "EXEC_SQL" or something?
Another question:
I need to copy a table from one database ("OPS$TSLIVE") to another ("TRACKER"). Here is an excerpt of my code, as well as an error! I've never had this error before!
JOHANN> copy from ops$tslive/pwd@cds to tracker/pwd@tracker create new_alerts using select * from alertcodesfile;
Array fetch/bind size is 15. (arraysize is 15)
Will commit when done. (copycommit is 0)
Maximum long size is 80. (long is 80)
select * from alertcodesfile
Error in SELECT statement: ORA--1002: Message -1002 not found; product=RDBMS; facility=ORA
Please help!
Kind regards,
Johann.You are refering to 'execute immediate' (>=8i). As far as I know it is not possible to do connects. Alter table perhaps, if it is in the local database (try it). If you want to perform dml in a remote database, create a database link and use that to perform you dml on. a DB link can also be used to call a remote procedure (That perhaps does the alters for you). Try it.
The oracle doc says this about ORA-1002:
ORA-01002 fetch out of sequence
Cause: In a host language program, a FETCH call was issued out of sequence.
A successful parse-and-execute call must be issued before a fetch. This can
occur if an attempt was made to FETCH from an active set after all records have
been fetched. This may be caused by fetching from a SELECT FOR UPDATE
cursor after a commit. A PL/SQL cursor loop implicitly does fetches and may
also cause this error.
Action: Parse and execute a SQL statement before attempting to fetch the data.It looks like a bug, ask Oracle support.
L. -
COPY command in SQL*Plus 8.1.6 returns ORA-65535
The COPY command in the windows version of SqlPlus (SQLPLUSW) does not work any more. I get the following error
<< Array fetch/bind size is 5. (arraysize is 5)
Will commit after every array bind. (copycommit is 1)
Maximum long size is 80. (long is 80)
ERROR:
ORA-65535: Message 65535 not found; product=RDBMS; facility=ORA >>
Interestingly, I can run the same COPY command successfully if I use SQLPLUS.exe ( the command line version ). No error & it completes the copy.
I recently changed my Oracle client from 7.3 to v8.1.6.
I had not encountered this problem with the same command in v7.3.You may have run into bug 1504702. As a workaround you will need to use command line, as you've already figured out. I don't think a patch is available for Windows yet, although there is for Solaris (in the 8.1.7.4 patch set).
Alison -
I'm having problems with the copy command in sql plus
Here's my command
COPY FROM tib_oms/tib_oms@odb1 -
TO gbonk/gbonk@stage -
INSERT -
gbonk.products ( id_manufacturer, id_sku, category ) -
USING -
select id_mfr, sku, prodcat from tib_oms.pricinghistory
The error I receive is...
CPY0007: Select list has fewer columns than destination table
I'm selecting 3 columns and I'm specifing 3 columns so I don't get what's up.
null<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Greg Bonk ([email protected]):
Well i gave it a shot. Here's my modified copy command....
copy from tib_oms/tib_oms@odb1 -
TO gbonk/gbonk@stage -
insert -
gbonk.products ( "ID_MANUFACTURER", "ID_SKU", "CATEGORY" ) -
using -
select "ID_MFR", "SKU", "PRODCAT" from tib_oms.pricinghistory;
But I still recieve the same error. Is there anything else that I could trouble shoot?<HR></BLOCKQUOTE>
did u check if the destination & target columns have the same structure. maybe one of the is a composite datatype (i.e varray,nested tables etc) ?
null -
SQL*Plus 'Copy' command and LONG datatypes
Hi. I'm using Oracle 9.2.0.5 and wanna copy LONG to LONG without using an Interface in VB or any other programming language.
Some of the fields (plain text) are greater than 32 Kb, and I tried the SQL*Plus 'Copy' command, without success.
(For compatibility reasons I can't convert LONG to CLOB, I need to copy LONG to LONG)
This is the example I'm working with:
Table Source_LONG (ID number, DATA long)
Table Destination_LONG (ID number, DATA long)
The SQL*Plus command: (connected from test_database@environment)
set long 100000
copy from test_database/test_database@environment insert destination_long (id,data)
I tried using both FROM and TO, but same results.
The fields are copied into destination_long, but they are
truncated at 32768 bytes, even with the LONG variable set to 100000. Any ideas ?
Thanks.I'm working with 2 similar tables with this structure:
SOURCE_LONG (ID number, DATA long)
DESTINATION_LONG (ID number, DATA long)
SOURCE_LONG contains two rows:
ID DATA
1 hello
3 ....text bigger than 32kb...
I tried your solution and it insert 2 rows, but only the ID is filled. The DATA is empty in both cases :-(
insert into destination_long(id,data) (select id,to_lob(data) from source_long); -
Copying and pasting sql statement in sql*plus
how do you paste sql statement in sql*plus...I have tried the following options, getting the windows interface for this following the documentation below but that didnt work
http://download.oracle.com/docs/html/A88829_01/ch3.htm
then i tried creating a simple .txt file with my sql statement and tried running it using @name(where name is the name of the file) and it is giving me the following error SP2-0310: unable to open file "firstscriot.sqlHi,
Using the command-line interface, copying is a pain. Right click on the title bar at the top of the window, then click on "Edit" and "Mark". After you highlight the text you want to copy, you can press the Enter key to copy it.
To paste, simply right-click. It doesn't matter how the copy buffer got filled (the cumbersome process I described above, using Control-C in Notepad, or whatever). -
Can v read a client text file using SQL*plus??
We have a requirement like this: We need to read a text file to find spelling mistakes. Problem is the file has to be always moved to the DB machine, which is a Linux box and then run a stored procedure which uses UTL_FILE. Now in order to show the spelling mistakes of the file the user will have to again copy the file with the spelling mistakses (output file) from Linux to Windows.
Is there a way to do it using SQL*Plus, where the text file is in the client machine???? Then users don't have to copy the file to and from the Linux box.SQL*Plus is a client software and whatever code you write using SQL*Plus, it ultimately run on the server. So the answers to your question is "no".
-
GPF in SQL*PLUS Copy Command?
Hello,
I'm getting a GPF and crash of SQL*Plus when I use the copy command. Seems like I used to be able to make it work if I tried logging on to the source database before the copy, but now even that won't work. I issue the command, it looks out over the modem for the remote database, then the GPF occurs.
copy from me/[email protected] to me/me@LocalDB -
insert ARRG_BNDRY_OBJECT -
using -
SELECT * FROM ARRG_BNDRY_OBJECT WHERE ARRG_BNDRY_KEY IN -
(80169);
Ideas?
Thanks,
DaleYou might also want to try the same command using SQL*Plus command line (DOS version). If you haven't used it before, enter SQLPLUS at the command prompt, eg:
c:\sqlplus
Alison -
SQL*Plus COPY command does not work
SQL*Plus COPY command does not work in SQL Developer. I am using SQL Developer 1.5.1 on Windows XP.
copy from <source_db_connection> to <target_db_connection> create <target_tab_name> using select * from <source_tab_name>
Does it work on different versions of SQL Developer ?
Anyone had any success in trying COPY command in SQL Developer?
Thanks in advance.While it hasn't been updated for v1.5, this page lists the supported SQL*Plus commands. COPY is explicitly listed as not supported.
theFurryOne -
Help with SQL*Plus COPY Command syntax
Hello people.
DBs are 10g
PROD DB is a remote DB (over DB Link)
TEST DB is where my SQL*Plus is logged in.
LOCAL_DB_TABLE is the table I need to create to TEST DB
REMOTE_DB _TABLE is the table that already exists in remote PROD DB
COPY FROM replica/replica@PROD
CREATE LOCAL_DB_TABLE@TEST
ROW_ID,
CREATED,
CREATED_BY,
UPD,
UPD_BY
USING SELECT
ROW_ID,
CREATED,
CREATED_BY,
UPD,
UPD_BY
FROM REMOTE_DB_TABLE
WHERE ROW_ID='XXX';The error message I am getting:
usage: COPY FROM <db> TO <db> <opt> <table> { (<cols>) } USING <sel>
<db> : database string, e.g., hr/your_password@d:chicago-mktg
<opt> : ONE of the keywords: APPEND, CREATE, INSERT or REPLACE
<table>: name of the destination table
<cols> : a comma-separated list of destination column aliases
<sel> : any valid SQL SELECT statement
A missing FROM or TO clause uses the current SQL*Plus connection.
CREATE LOCAL_DB_TABLE@TEST
ERROR at line 1:
ORA-00901: invalid CREATE commandThank you in advance for your help.Hi,
I hope you are thinking of Creating a Table with the Same Structure as the remote database Table, If so.
You can create a Table from the Existing Table using CTAS(Create Table as Select).
Provided, you have created a Database Links between the 2 Databases. You can create a
table in your Schema as,
CREATE TABLE local_db_table AS
SELECT * FROM remote_user_name.remote_db_table@dbname;Thanks,
Shankar
Edited by: Shankar Viji on Jul 19, 2012 11:01 PM -
ORA-01401 on execution SQL*Plus Copy command
I looking solution for strange problem :
I having two database created with AL32UTF8 character-set ; current application design are that we loading data throw SQL Loader and than transferring loaded data from one database to another using SQL*Plus copy command.
Now , we having two tables , declared 100% identically , with respect to NLS and CHAR semantics (all varchar fields having CHAR inside length).
At attempt to transfer data , with SQL*Plus Copy command I'm receiving next output :
ERROR:
ORA-01401: inserted value too large for column
If I'm trying to transfer data via DB link , and this succeeds , or throw exp/imp utilities it also works .
Database servers are 9.2 (i tryied with 9.2.0.6 or 9.2.0.8) ; client side were 9.2.0.8 , 10.1.0.5 ...
On client side NLS_LANG variable are set to AMERICAN_AMERICA.AR8MSWIN1256 (we working on project who needs to support arabic language)
Did anyone encountered same problem ? Any One ?it could be that the column of the table that you are trying to insert the data has a small length.
-
Copying TEXT column from flat file into SQL results in empty fields....
I'm copying TEXT column from SQL to Flat file (ragged right fixed width) - DT_TEXT. It copies fine and I''ve checked the output file. Now, while trying to copy the flat file to sql server in another system. I find all the fields are empty.
When I preview the source from flatfile, I see all the entries there. But it copies other fields but the field with DT_TEXT is empty.
This is when I preview
SQL Table output
Any help will be helpful!!!Hi, I'm not sure If I'm understanding what you're saying. The data got copied from SQL to Flat file. I've double checked the flat file and I see the DT_TEXT data there. The size of file also gives an indication that there's existence of TEXT Data
But, when I copy that data back to sql again (which I can also preview before the load), The DT_TEXT values goes missing. Same when I copy to Excel as CSV or as a Flat file. I don't see text data.
The TEXT data resides on the first output. But when I try to extract to other format from that output, it doesn't come out. -
Does SQL Developer have any way to run the SQL*PLUS COPY FROM command?
set arraysize 100;
set copycommit 100;
COPY FROM SCOTT/TIGER@OtherDBinstance -
CREATE COMPANY -
USING SELECT * from COMPANY;Thanks. I have been using the create table ABC as select * from ABC@otherdb but this often runs into temp segment issues for very large tables. The SQL*PLUS version allows me to have the copy commit save after each xxxxx lines and this seems to be able to handle any size table. Can copy commit be used from SQL Developer?
Maybe you are looking for
-
Help needed, powerbook down after FCP HD crashed
Hello, any help would be useful : my PB : PB 12, 756 (or so) MB memory, OSX 10.3.9 I was running FCP HD on my powerbook to compute some effect (timecode on a 4 minutes movie). The disks for rendering and so on is an external LaCie drive (firewire). F
-
Field order on Firewire output
I have been using Premiere Elements for some years and, before that, Premiere 6.5. I have now begun to use Premiere Pro CS6 and am getting on well with it. I have Windows 7 Home Premium with 4Gb of RAM. I realise that 4Gb is borderline for editing HD
-
JTextPane: Problem adding hyperlinks & images
Hi, I have a problem and I just can't figure out how to solve it. I need to implement a simple Editor for HTML files. Lucky for me, most of the functionality i need is already provided by swing, but i still need to add images and hyperlinks to my doc
-
EPM 11.1.2: Using LDAP with BugTracker
Hi, I'm using EPM 11.1.2 as production env with NativeDirectory and I'd like to use Redmine as bugtracker for my support of EPM. I need for integration it's LDAP and my bugtracker (Redmine). I found this: http://www.redmine.org/projects/redmine/wiki/
-
HP Vectra VL400 series video drivers
We are trying to install Solaris 2.7 on the HP Vectra VL 400 series Pentium III. We cannot get the video driver configured during installation. Please help!!! Where do we go to get the most current video graphics driver.