I've stucked with a query. Let me explain the situation: I have a table that i store the IDs of logically equal records.
For example;
A = B
B = C
X = Y
Z = Y
My query must return all equivalent records. If you call the query with parameter 'A', the result set must contain B and C. And if you call the query with parameter 'Y', the result set will contain X AND Z. I have thought that i can write the query wity using start with connect by statement. But the query does not work as i expected. Here is my code and sample data:
create table temptable (ID1 number,ID2 number);/
insert into temptable values(11,12);/
insert into temptable values(12,13);/
insert into temptable values(13,14);/
insert into temptable values(13,15);/
SELECT distinct ID1 from
(
SELECT * FROM temptable
START WITH ID1 = 13 OR ID2 = 13
CONNECT BY NOCYCLE
[code]...
In my sample the equality definitions is;
11 = 12
12 = 13
13 = 14
13 = 15
When i call the query with parameter 13, i'm expecting to get 11,12,14,15. But it returns only 12,14 and 15.
Acer laptop, Intel Processor w/ Windows 7 Professional (64-bit) Delphi 2010 Professional Oracle XE (+ the Oracle XE client that comes with it)
I cannot can't to the Oracle database from Delphi. The error I keep getting is:
Alias is not currently opened. [Oracle][ODBC][Ora]ORA-12154:TNS: could not resolve the connet identifier specified.
Here's what I've done:
1. Create an ODBC connection to my Oracle database
- run C:WindowsSysWOW64odbcad32.exe to open the ODBC administrator. - Data source name: bt_user - TNS Server Name: localhost/xe - user bt_user - Clicked "test connection" -- Success.
2. Open Delphi and drop a TDatabase component on my main form.
- Set the Alias Name property to "bt_user" (the alias I set up in ODBC) - Set database name to "bt_user". - Checked "connected".
Alternatively, I tried using the Delphi ADO components (the dbGo components).
- Drop TADOConnection component on my form. - Select "connection string" and open the dialog. - Click "build string". - Select "Microsoft OLE DB Provider for ODBC Drivers" from the selection. - In "use data source", select "bt_user" from the drop-down list (my ODBC connection from #1) - Click "test connection".
Again the same error.
My questions are:
1. Can Delphi work with Oracle XE (Express Edition)?
2. If so, then do I need to install the "Instant Client"?
3. Will the instant client for Oracle 10g work with Oracle 10g XE?
4. Do I need to install any additional ODBC driver(s)?
5. Why was I successful in creating the ODBC connection in Windows, but it failed in Delphi?
6. Will Visual Studio.NET (C#) work with Oracle XE, and what are the steps for setting that up?
I am able to connect to DATABASE from SQLAssistant only when I provide string like ABOVE........If I dont mention the SERVICE, m unable to connect to DB.Now the biggest issue is with SQL Developer.....m not at all able to connect to DB using SQL Developer.
We have a scenairo in which we have two servers one is a Oracle server and the other is SQL server and we need to enable automated Emails from the oracle DB server. As the Oracle server is not whitelisted and we have a SQL server which is already whitelisted so is it possible to connect from Oracle server to Sql server so that the automated emails will be generated from the sql server (as it is whitelisted) and we do not want to whitelist the oracle server.
I am upgrading an application from 9i to 11g and I've been told that the connect by prior sql is broken. While I am waiting for the example and the error message, is 11g pickier about looping than 9i was? some documentation on 10 or 11 changes to hierarchical queries?
I am trying to develop a web application with C # VS.net, my application is to connect to an Oracle database on a server (LAN), the problem I want to connect to the database without install oracle or ODP on my client machine.
When I created the database the connection I used was s7s but whether or not I include that name or just use the ID/password that script will not connect.
Web Server(port80) and SSH Server(port 212) and Oracle client with sqlplus (192.168.137.2) || || SSH client (192.168.137.1/128.21.31.111) || || Oracle Server (port 1521) (128.21.31.112)
my php program have to access the db on oracle server, and then i do this on my SSH client
I have installed Oracle 10g XE in my laptop having Windows 7 home 64 bit OS..I have created some users in the oracle and iam able to connect these users through cmd prompt..But the issue is that iam unable to connect to the database through TOAD..
I have given the user name and password and database as XE and connect using as : XE but still iam getting the error as "TNS could not resolve the connect identifier (XE).
Unable to connect in TOAD in ORACLE 11g through sys user.
I am using Toad for ORACLE version 9.0.0.160 and ORACLE 11gR2 (11.2.0.1).
I make the FALSE to "sec_case_sensitive_logon" parameter hence not able to login through sys user. I can logged in through system user without any issue.
Recently i have installed oracle 10g.2 in my laptop under Win-7 64bit. But cannot connect oracle from Windows form [C#], Office application[Excel] and odbc. Showing error[Tns could not resolve the connect identifier specified Drivers SQLSetconnectAttr failed ]
Though I can connect oracle from toad and sqlplus and form 6i.
My OS is Linux and I installed Oracle 10.2. Everything is fine.I can use sqlplus, exp, imp etc with no problem.Now I have created another linux user test in /home/test. I unzipped basic-10.2xxxxxx.zip (/home/test/instantclient_10_2) and exported LD_LIBRARY_PATH.I guess I have installed instant client in this way.
My testOra.cpp:
#include <occi.h> int main() { return 0; }
This test.cpp would not compile. It cannot find occi.
I am having a problem understanding the relationship between users and databases within Oracle. I have a user "big" that logs on successfully on another machine to database "s7s" but on a different machine fails to connect. The following may be interesting:-
I have installed oracle 10g database in the my local laptop ( Windows 7) . This laptop is in LAN. I am not able to connect from other machines in LAN. When i open sqlplus, SQL Developer from the same machine, i was able to login to the instance.
But when i want to login from the other machines in LAN. I was not able to connect. I was able to ping the server on which the database was installed from other machines. why i am not able to connect ?
I am attempting to connect to an Oracle 8i database via the Oracle 9.02 ODBC driver and I am receiving the following error message upon testing the connection in WinXp's ODBC Data Source Administrator dialog box: "Unable to connect SQLState=IM004 [[Microsoft]][[ODBC Driver Manager]] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed" .
I am running Oracle Client 9.2 on a P4 machine running winXP.
EMP_ID MGR_ID EMP_NAME EMP_ROLE EMP_HIERARCHY 10 9 John Developer 7,8,9,10 9 8 Charlie Manager 7,8,9 8 7 Bruce GL 7,8 7 King CEO 7 20 18 Jack Developer 7,16,17,18,20 18 17 Adam Teamlead 7,16,17,18 17 16 Erik Manager 7,16,17 16 7 David GL 7,16
We can see that the for each employee, there is a corresponding Manager tagged except for CEO of the company. Now, I want the output to be like below
Here, MGR_ID is nothing but the MGR_ID from the same row and Supervisor_id is nothing but the MGR_ID of MGR_ID
Ex:- For 10 EMP_ID, the MGR_ID = 9 and Supervisor_id = Mgrid of 9 i.e., 8 For 8, the Mgr_id = 7 and Supervisor_id = Mgrid of 7 which is none. etc.,
The same logic applies for Mgr_name, Mgr_Role , Supervisor_name and Supervisor_role too. I could not format the data in a tabular format due to some formatting issues.