sqlplus

Bypass limit of 239 characters of sqlplus

妖精的绣舞 提交于 2020-01-06 03:47:46
问题 I loop on each line of a file, and each line has more than 3000 characters length. But when I execute my .bat, and after the SQLPlus connection, the console window contains the message: http://puu.sh/l6vOI/6bba21982b.png Traduction : the beginning of the string " " SO100ACa4 ... " is too long - the maximal size is 239 characters. I tested using Set VERIFY OFF and SET LINESIZE 4000 , but nothing worked. Here is a part of my batch script: for /f "delims=" %%f IN ('dir /b "%NomFichierU%*.txt"')

How do I handle errors in a batch file that calls sqlplus, because sqlplus doesn't set ERRRORLEVEL on error or failure?

穿精又带淫゛_ 提交于 2020-01-05 08:09:48
问题 i hv a prob here which already took me days to solve it.. my explanation will be quite lengthy but i try to keep it short. in my Oracle SQLdeveloper, i have a package name UT_BETWNSTR which contain: create or replace PACKAGE "UT_BETWNSTR" IS PROCEDURE ut_setup; PROCEDURE ut_teardown; PROCEDURE ut_betwnstr; END UT_BETWNSTR; and the package body is like this: create or replace PACKAGE BODY "UT_BETWNSTR" IS PROCEDURE ut_setup IS BEGIN NULL; END; PROCEDURE ut_teardown IS BEGIN NULL; END;

Get complete ddl for index in oracle

丶灬走出姿态 提交于 2020-01-05 06:44:47
问题 I am using oracle 11g/12c. I want to get ddl of indexes in my database. For this I used the query - SELECT DBMS_METADATA.GET_DDL('INDEX','SYS_IL0000091971C00001$$','CCEEXPERTS') FROM dual Here 'SYS_IL0000091971C00001$$' is my index name and 'CCEEXPERTS' is my owner name. From this I get the ddl - CREATE UNIQUE INDEX "CCEEXPERTS"."SYS_IL0000091971C00001$$" ON "CCEEXPERTS"."DATABLOB" ( And my actual ddl is - CREATE UNIQUE INDEX "CCEEXPERTS"."SYS_IL0000091971C00001$$" ON "CCEEXPERTS"."DATABLOB"

Get complete ddl for index in oracle

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-05 06:43:49
问题 I am using oracle 11g/12c. I want to get ddl of indexes in my database. For this I used the query - SELECT DBMS_METADATA.GET_DDL('INDEX','SYS_IL0000091971C00001$$','CCEEXPERTS') FROM dual Here 'SYS_IL0000091971C00001$$' is my index name and 'CCEEXPERTS' is my owner name. From this I get the ddl - CREATE UNIQUE INDEX "CCEEXPERTS"."SYS_IL0000091971C00001$$" ON "CCEEXPERTS"."DATABLOB" ( And my actual ddl is - CREATE UNIQUE INDEX "CCEEXPERTS"."SYS_IL0000091971C00001$$" ON "CCEEXPERTS"."DATABLOB"

Oracle: How to efficiently copy a table from one schema to another on a different database and server

帅比萌擦擦* 提交于 2020-01-05 03:59:06
问题 I have a large table (3.5MM records) that I need to copy from one schema/database to another schema/database. I tried TOAD's copy data from table feature, but got errors and it never fully copied, in part because the connection keeps getting dropped. I'm trying the object copy feature of SQLDeveloper, and after 11 minutes, it's still copying. I tried the SQLPlus COPY statement but got a syntax error (help needed). I'm still open to extracting the data as INSERT statements that I can just run

Oracle regular expression having a hyphen doesn't give same result on Windows as on Unix

我怕爱的太早我们不能终老 提交于 2020-01-03 17:32:47
问题 I have the following query with a regular expression: select REGEXP_REPLACE ('TEST 3304 V2', '[`~!@#$%^&*()_+-={}|;.:<>?,./]', ' ') as REG from dual; When executed via SQL*Plus on a Windows machine it returns the following: SQL> select REGEXP_REPLACE ('TEST 3304 V2', '[`~!@#$%^&*()_+-={}|;.:<>?,./]', ' ') as REG from dual; REG ------------ TEST 3304 V2 On a SunOS machine I get a different result: SQL> select REGEXP_REPLACE ('TEST 3304 V2', '[`~!@#$%^&*()_+-={}|;.:<>?,./]', ' ') as REG from

select only first letters of words from a varchar field

二次信任 提交于 2020-01-03 11:34:14
问题 I was asked in an interview,a question from oracle sql.this seemed to be a simple question but i had no clue to answer.could anybody help? if there is string like "newyork is a beautiful city" in a colum. select column_name from table_name; will result newyork is a beautiful city what is the query required to give the output as a string with all the first letters. i.e., the output should be niabc 回答1: Provided you're not concerned with maintaining the case of the output this can be done quite

select only first letters of words from a varchar field

痞子三分冷 提交于 2020-01-03 11:33:10
问题 I was asked in an interview,a question from oracle sql.this seemed to be a simple question but i had no clue to answer.could anybody help? if there is string like "newyork is a beautiful city" in a colum. select column_name from table_name; will result newyork is a beautiful city what is the query required to give the output as a string with all the first letters. i.e., the output should be niabc 回答1: Provided you're not concerned with maintaining the case of the output this can be done quite

How to solve this using a subquery in a from clause?

南笙酒味 提交于 2020-01-03 05:23:12
问题 Display author, title, retail and retail price of all books whose retail price is the highest for the specific author. I have the query below. I'm kinda confused how to do a subquery in a from clause. select lname, fname, title, retail from author natural join bookauthor natural join books where retail=(select max(retail) from books); Below is the data from the database that I'm using FNAME LNAME TITLE RETAIL ---------- ---------- ------------------------------ ---------- SAM SMITH BODYBUILD

How to use LIKE statement in sql plus with multiple wild carded values?

主宰稳场 提交于 2020-01-03 02:29:04
问题 my question is that currently if i want to query for multiple wildcarded values. I need to do something like this. select customername from customers where customername like '%smith' or customername like '%potter' or customer name like '%harris' or customername like '%williams'; So I wanna ask from the experts, is there any easier way to do this? Regards, Sanjan 回答1: Create a table of your 100 names select customername from customers c inner join customersames cn on(c.customernamename like '%