PL/SQL :: How To Make A Linked List
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
ADVERTISEMENT
Sep 24, 2012
How do I get a list of all servers associated with linked databases?
for example: I have an entry in TNSNAMES.ora:
PTSYS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = BMSQL2.BEAM.LOCAL)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PTSYS)
)
)
if I link this database as follows:
create public database link SourceDB --@PTSYS
CONNECT TO sysadm IDENTIFIED BY password
using
'PTSYS';
How can I tell that this database is on the BMSQL2 server?
View 1 Replies
View Related
Mar 1, 2010
I have table called Orders with lots of fields from Imports Fields are ConsigneeKey,Shipto,ProductCode. and another table called Product. Main fields are ProductCode,Price,Weight,StdCube. Now I have two list of Consineekey,One which is shipto X area and another is of Y area. I want to make query like separate list of Orders which is shipto X,Y and Common Products in Both X and Y. I will supply list of Consigneekey in where clause.
View 8 Replies
View Related
Mar 2, 2011
The code was originally an MS Access Query with linked tables to the Oracle DB however trying to remove the need for access and have it drop directly into Excel using Recordset.
SELECT
SWPRO.CASE_INFORMATION.CASEDESC,
SWPRO.OUTSTANDING_MAIL.CASENUM,
CASE_DATA_1.FIELD_VALUE,
SWPRO.OUTSTANDING_MAIL.SENTDATE,
SWPRO.OUTSTANDING_MAIL.DEADDATE
FROM
[code]....
View 20 Replies
View Related
Oct 20, 2011
I want to derive a query to find the Empid's that are linked to only deptid 101 .
Empid DeptId
1 101
2 102
2 101
3 101
5 103
ie, in the above table empid 2 is linked with deptId's 102 and 101 and empid 3 and empid 1 is linked only with deptid. So i want the query which fetches only empid's 3 and 1 and should not fetch 2 as it is linked with deptid 102 also.
View 4 Replies
View Related
Mar 28, 2011
i just posted another topic where i heard about external table and i had a few questions concerning them. I thought it was best to create a new topic than to continue on the other one...
I noticed that to create an external table the CTL is like this:
CREATE TABLE emp_load (FIELDS description)
ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY ext_tab_dir
ACCESS PARAMETERS (RECORDS FIXED 62 FIELDS (employee_number CHAR(2),
[Code]...
1) This creates an external table, but, is it possible to Create a normal table in a CTL file? For physical tables, the table has to exist right?
2) if you create a view linked to 2 external tables and if the CSV files are updated each day, the external tables will be updated automatically, and the view will be updated as well?
3) Can't there be any synchronisation problems?
4) What happens if a select request (or someone requests on the view) while the CSV file is being updated?
5) Is there anyway you can protect the accesses from those tables/views when the CSVs are being updated?
6) Is it possible to create an index on these sort of tables?
7) Is it possible to index a view?
8) Are external tables visible on a tool like sql developper?
View 11 Replies
View Related
Jul 24, 2012
I have installed Oracle server and SQL Server on separate machines which cause me a time delay of 21 seconds for each execution. Why executions delay? I have set RPC out (true).
Note: My main concern is either if the query is correct/incorrect it executes for 21 seconds._
Another case when I have both servers on the same machine it executes in milliseconds. I have tried Following methods in SQL SERVER.
*1, Using OPENQUERY:*
SELECT * From OPENQUERY(Linked Server Name,’Select * from OracleTableName ‘)
*2, Using Exec:*
DECLARE @sql NVARCHAR(MAX);
SET @sql =(’Select * from OracleTableName ‘);
EXEC (@sql) AT Linked Server Name ;
How to reduce the time delay caused for the execution?
View 0 Replies
View Related
Apr 26, 2013
I have data in a table and another in XML file,I used SQL query to retrive the data placed on the table, and link this query with XML query that retrieves the data stored in the xml file. The data stored in the table and xml file sharing a key field, but the xml contents are less than what in the table.I want to show only the data shared between the two queries, how can I do that?
e.g.:
Table emp:
e_id | e_name | e_sal
023 | John | 6000
143 | Tom | 9000
876 | Chi | 4000
987 | Alen | 7800
XML File
<e_id>
143
876
So, I want the output to be:
e_id | e_name | e_sal | e_fee
143 | Tom | 9000 | 300
876 | Chi | 4000 | 100
View 2 Replies
View Related
Sep 27, 2011
I am creating the Dynamic list but when i am compiling the form it gives the compilation error "No list elements defined for the list item".
I can eliminate it by entering the dummy list element but this dummy value will be displayed at form run time.
View 1 Replies
View Related
Dec 14, 2011
Im trying to list the products list of a client grouped by type of the product. Ex:
product type
prod.A acid
prod.B flavour
prod.C acid
prod.D cleaner
prod.E flavour
I want to list something as:
Acid
Prod.A
Prod.C
Cleaner
prod.D
Flavour
prod.B
prod.E
View 1 Replies
View Related
Oct 30, 2011
DECLARE
CURSOR GRP IS
SELECT RowNum rn, Letter_Group_ID||'-'||A_Desc AName,Letter_Group_ID
FROM Hrs_Group;
BEGIN
Clear_list('Letter_Group_ID');
FOR I IN GRP LOOP
Add_List_Element('Letter_Group_ID',I.rn,I.AName,I.Letter_Group_ID);
end loop;
END;
FRM-30351: No list elements defined for list item.
List LETTER_GROUP_ID
View 4 Replies
View Related
Apr 22, 2013
I just want to list and group all my tables that are linked together by constraints. I just want my tables to be able to be listed together as one particular database. my tables are , CUSTOMER, ORDER_INFO, ORDER_LINE, PRODUCT. They're all linked together by way of constraint and I want to list and print them all together as one DB. HOW DO I put them all in one schema and then also list them all together and print/illustrate them as one. also, I tried to import them into their own scheme but i ran into a series of probs regaurding the .dmp file being read.
View 2 Replies
View Related
Sep 1, 2013
I want to get the list of values which is not the given list .
I have the below data in my emp table
SQL> select emp_id from emp;
EMP_ID
----------
101
102
103
104
105
106
108
110
120
220
225
11 rows selected.
But I need to display the values from the list of values which are not in the emp table . So the result will be '3000,3002,3003'.
SQL> select emp_id from emp where emp_id ?;
EMP_ID
----------
3000
3002
3003
View 9 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
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
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
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