SQL & PL/SQL :: How To Use Tags And Make Code Easier To Read
Sep 5, 2011
format your code (Instant SQL Formatter is here) and - before submitting a message - enclose it into the [code] tags.Note the difference; see how the formatted code is easier to read?
View -1 Replies
ADVERTISEMENT
Feb 13, 2012
I downloaded oracle sql developer, i type my code into a worksheet but if i use the run statement option, it asks me to make a connection. I dont want to make a connection, just test the data locally.However, even if I do try and make a connection, i get ora-12560 error (local connection).
I just want to type up some data to make some table and test to retrieve or manipulate the data. I'll use any program, command line or gui.
View 7 Replies
View Related
Jan 8, 2013
Oracle Version 11.2.0.1
Windows
There are some tables in a schema. How can I make some rows as a read only i.e. no user can make either any update nor delete them. After searching in google, I found that trigger is one way, but since this way can be manipulated by dropping or renaming the trigger, so I am looking non-trigger way to achieve this problem. Making tablespace read only affects other users. I am not looking whole table as a read only, just couple of rows should be locked (no DML allowed) for specific time period and I after specific time/date this restriction should auto disable or on user call i.e. something like row's block level locking..
View 17 Replies
View Related
Sep 3, 2013
I would like to read some values from XML code, I try to do some test sql query but not successfully.The values what I need from xml are:
<currency>EUR</currency>
<amount>64.93</amount>
And there is a one example of xml:
CREATE TABLE "XML_TAB"
("ID" NUMBER(10,0),
"FILENAME" VARCHAR2(100 BYTE),
"XML" "XMLTYPE"
)
[code]..
how to write sql which get me a needed values?
View 13 Replies
View Related
Feb 28, 2011
I have the following chunk of code, which could return no rows, one row or many rows. When it returns one or many rows the DBMS_OUTPUT.PUT_LINE prints out my values. When no data is found 'Hello' is not printed?
Suggest a way I can change the code to make the exception print when no data is found?
SET SERVEROUTPUT ON;
BEGIN
FOR prec IN ( select * from xxx.part_maint where drop_partition = 'Y' )
LOOP
DBMS_OUTPUT.PUT_LINE (prec.SCHEMA_NAME || ' ' || prec.OBJECT_NAME);
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE ('hello');
END;
View 1 Replies
View Related
Apr 25, 2012
We are using sqlldr query to load data into a table. This is handled in a java code. We are uploading an xls file which gets converted into csv and then the sqlloader call works, which in turn creates a bad and log file for error messages.
But I am not able to locate the bad file(in filesystem) within java code.
Below piece of used.
File file =new File(destfilePath);
if(file.exists()){
FileReader fr = new FileReader(file);
LineNumberReader lnr = new LineNumberReader(fr);
linenumber=0;
[code]....
The above code is able to locate CSV ,but not the bad file(whereas both files created in same path).
View 1 Replies
View Related
Jun 21, 2013
We have an Oracle UCM and Oracle SES implementation.Currently there are too many tags returned for certain keywords by SES which breaks the UI,some of the tags being irrelevant too.Is there any configuration variable in SES by which these tags can be limited to say 20 most relevant tags.?
View 0 Replies
View Related
Jul 4, 2013
How can I escape HTML content without escaping the HTML tags?
View 4 Replies
View Related
Dec 14, 2010
is there any function in oracle which removes all HTML tags . our web pages uses rich text editor, when user enters text into editorand saves it, the database will have text with formatting ie all html tags. this works fine as long we display this text in web pages , but some time we have to provide reports to user just by running sql and ouptut in excel, in this case I want to strip out all html tags within the text .there is any function which can strip all HTML tags?
View 6 Replies
View Related
Feb 12, 2009
I have no knowledge about Barcode. The problem is an issue of Loyalty Cards of a Hotel and Restaurant to various customers and then these cards will be presented by the customers time to time in the Hotel as well as Restaurant. The Owner of the Hotel and Restaurant wants to generate separate barcode for each card and when this card will be presented then the bar code reader will readout the code and the system will calculate the amount of discount/rebate. Because if the data entry operator enter the code of the card through key board the it will be a chance of leakage or misuse of that card.
View 8 Replies
View Related
May 30, 2012
I have to compare my SVN source code (packages, views etc) with the production code in the database like views etc (actually we are not sure that what we have in the svn is the final version of production code, we have objects created in the production database, but we don't have latest scripts for that. we have to deploy the svn code in the UNIX box).
So here the comparison is between the OS files and the database objects.
I thought I would get scripts of all the packages, views etc from the production database by using DBMS_METADATA or some utility and save the code in OS files then compare one svn file with OS file manually by using some comparison tools e.g toad provide one comparison tool.
View 5 Replies
View Related
Nov 21, 2011
i am writing a script for inserting rows in a table where primary key of that table consists of 4 columns. I want to add a new row where 3 columns of that table will be same but change the value of the last one. this is giving an error saying that i am violating the unique constraint. I tried to disable that constraint/PK by following statement but still this error is coming
alter table sections_budgets modify primary key disable cascade;
OR
alter table sections_budgets modify constraints sec_bdgt_pk disable cascade;
the insert statement which i am using. The first four columns are part of PK
insert into sections_budgets (SELECT sb.bdgt_cd, sb.bdgt_dpf_cd, sb.bdgt_yr, :sec_code, sb.usf_usr_id,
sb.aty, sb.comaty, sb.comytd, sb.expn_ytd, sb.sys_dt, sb.cat,
sb.start_aty, sb.expn_lmt
FROM sections_budgets sb
WHERE sb.bdgt_dpf_cd = :b_d_code AND sb.bdgt_yr = :year);
is there any other way of inserting records in this table without droping the whole table because it contains too many triggers and constraints?
View 24 Replies
View Related
May 2, 2010
How can I make report in below format ?
Month Apr-09 May-09 Jun-09 ...... Mar-10 Total
Basic 1000.00 1100.00 1300.00 ...... 1300.00 13260.00
HRA 500.00 600.00 650.00 ...... 600.00 6350.00
Conveyance 100.00 200.00 300.00 ...... 350.00 1300.00
Gross Amt 12350.00 13500.00 13200.00 ......14500.00 23456.00
View 9 Replies
View Related
Apr 19, 2007
On a page I have let's say 5 rows (can be more or less) and each row ends with a checkbox. On the next page(next prcodure) I go through all rows, but I get a "No data found" when a checkbox is not checked. Checkbox's parametre is send using an array.How can I make sure is a checkbox checked or not. If it's not, I put a formHidden through in it's place?
View 1 Replies
View Related
Sep 4, 2009
i have multiple inserts to make in a table that is in an Oracle database...i already try several ways to do it but it always giving erros... how to make multiple inserts at same time.
View 2 Replies
View Related
Mar 4, 2013
how should i do to make horizontal partitioning?
View 18 Replies
View Related
Feb 8, 2013
I want to learn how to make columns out of records?
View 8 Replies
View Related
Mar 24, 2010
How to make a call to a proc and immediately return without waiting for the called proc to end.
Nothing I try seems to do the trick...The calling program always has to wait.
View 6 Replies
View Related
Mar 4, 2003
I have read the messages below about making a calendar but am still unsure of how to go about doing this. I have the STNDRD20.OLB file, but I don't know where to put it or what to do with it! What comes next?
View 20 Replies
View Related
Feb 27, 2012
How to make a node of a Hierarchical Tree BOLD without intervene java code ?
View 1 Replies
View Related
Aug 3, 2013
I want to make default 'y' for COL1 how should i make it.1) "COL1" NCHAR(10) DEFAULT N'y'or 2) "COL1" NCHAR(10) DEFAULT 'y' yours sincerly
View 5 Replies
View Related
Jun 11, 2013
Well I need to make a trigger that don't allow delete departments in the next 3 month.
I dont know how to start it :/
View 23 Replies
View Related
Nov 15, 2012
I need to run a query that runs a stored procedure. The stored procedure takes a cursor of record ids as a parameter. I've been making the cursor like this, if there was a smarter way. I can't change the stored procedure, so this is the only thing I have control over.
CURSOR id_cur
IS
SELECT id
FROM table t
WHERE
t.id IN (
id1,
id2,
...
id500
);It just seems kind of strange to select only ids from records when the list of ids is given.
View 6 Replies
View Related
Oct 5, 2013
If my query is under execution and I want to make an index on a column which is very much needed by my query. Will a simple index solve the purpose or is there any extra keyword required ?
View 2 Replies
View Related
Jul 12, 2012
I've seen how to implement a linked list in oracle ? but it's not what I'm interested in.
I've almost made a linked list (of chars) type, however it misses the notion of empty list and thus I virtually cannot construct it.
create or replace type LString as object
(
head Char,
tail ref LString,
member function cons(
p_x Char)
return LString
[code]...
I need to be able to make empty list to construct other lists, for example:
empty_lstring.cons('H').cons('i').cons('!')
View 2 Replies
View Related
Apr 6, 2013
---------------------------script of table for tree--------------
create table eqpt_mast
(
EQPT_ID VARCHAR2(16),
EQPT_CODE VARCHAR2(9),
PARENT_CODE VARCHAR2(9),
[code]....
output of tree like:-
grandf(0)
|__
---father1(1)
[code]...
i want to make tree like the above format.In the above tree "(value)" shows the code_type i.e. level of the tree..
version----Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
View 2 Replies
View Related
Jun 28, 2013
I have code that creates a sequence and a select statement that generates the next number in a sequence. It starts the sequence at 5 and every subsequent number is the previous number minus 3. The minimum value it can go to is 0. All I want is for my select statement to execute three times in a row. Is there any way I can do that?
create sequence MY_FIRST_SEQ
increment by -3
maxvalue 5
start with 5
minvalue 0
nocycle;
select MY_FIRST_SEQ.NEXTVAL from dual;
View 5 Replies
View Related
Mar 29, 2010
I have a table like this basic example:
ID Product Color Time-In
1 Apple Green May
2 Apple Red April
3 Pear Green May
4 Pear Green April
5 Plum Blue June
In SQL I want to return all 4 fields of the records except those records where Product and Color are identical - in that case it should return the latest (by name of month - preferred) or just the first it finds
So I should get these
1 Apple Green May
2 Apple Red April
3 Pear Green May
5 Plum Blue June
If I do a select distinct then I will only get those fields I test on (product and color), not the rest.
View 1 Replies
View Related
Sep 15, 2011
I want to make calendar in oracle form 10g, but i don't know make it. How to do make calendar?
View 2 Replies
View Related
Jul 9, 2012
How to make cursor to take a select statement
then check the rowcount
in certain case: assign another selete statement to the cursor
View 3 Replies
View Related