I have a query where not all conditions are necessary. Here's an example of what it looks like when all conditions are used:
select num
from (select distinct q.num
from cqqv q
where q.bcode = '1234567' --this is variable
and q.lb = 'AXCT' --this is variable
and q.type = 'privt' --this is variable
...
I am writing a program in java where I need to create a copy of a table (without data). for that I am using the following query
CREATE TABLE NEW_TABLE AS
SELECT * FROM OLD_TABLE
I have come across a table where one of the columns has the data type LONG RAW which is depricated.
I tried using the query below but it did not work. (ORA-0...
I have been looking during hours for a way to check in a database into source control. My first idea was a program for calculating database diffs and ask all the developers to imlement their changes as new diff scripts. Now, I find that if I can dump a database into a file I cound check it in and use it as just antother type of file.
T...
I'd like to figure out the best way to archive the data that is no needed anymore, in order to improve the application performance and also to save disk space. In your experience what is the best way to implement this, what kind of tools can I use? It is better to develop an specific in house application for that purpose?
...
DBMS_ASSERT is one of the keys to prevent SQL injection attacks in Oracle. I tried a cursory search...is there any SQL Server 2005/2008 equivalent for this functionality?
I am looking for a specific implementation that has a counterpart of all the respective Oracle package members of DBMS_ASSERT.
NOOP
SIMPLE_SQL_NAME
QUALIFIED_SQL_N...
My procedure:
CREATE OR REPLACE PROCEDURE akcia_nepozicane_s_kurzorom
(denny_poplatok IN NUMBER,
kilometrovy_poplatok IN NUMBER)
AS
my_id_auto NUMBER(5);
my_poplatok_denny NUMBER(4);
my_poplatok_km NUMBER(2);
CURSOR c1 IS
SELECT id_auto, poplatok_denny, poplatok_km FROM Auta;
BEGIN
OPEN c1;
LOOP
...
Hi to all,
I am new to oracle. I have created one table in oracle i want to update that tables with all columns without any content..I want all columns in that table.How to do this?Can anyone explain me?
Regards,
Raman
...
Friends,
I am looking at migrating a Oracle Forms (10g) application to APEX (3.2.1) and looking at options that would enable me to get to a stage where I can obtain a "first cut" of the Oracle Form within APEX.
Having got to grips with the Forms migration tool by reading this guide as well as this appendix and converted a couple of...
I have to use Hibernate and retrieve data from Oracle but the problem is, that the number of parameters passed to the query is not always the same.
For the sake of simplicity let's consider the following query:
select COL_1, COL_2, ..., COL_N from TAB_1 where COL_1 in (?, ?, ... ?)
The number of parameters passed to in clause is betwe...
I want to create trigger which will be fired after insert into some table, let`s say user.
In this trigger I want to select some records from table user, besides this one I insert to table, but then I receive error about mutating table. Is it possible to get records from this table?
...
Is it possible in oracle sql to return a default row if no rows found.
I have a process where in rows fetched will be put in a flat ascii file.
now i have a requirement that if there are no rows fetched by the sql query then there should be a default row in the ascii file.
is it possible in sql to output a default row if no rows fetched...
I'm looking at some code written by a former employee where I work and I'm noticing that he sometimes uses hexadecimal notation, and other times decimal. Since he's long gone I can't ask him why, so I hope someone here could take a look and enlighten me.
command.Parameters.Add("PI_EMPLOYEE_NUM",
OracleDbType.Varchar2, T...
I have this database which contains a varchar.
I want to know which records holds numeric values. I tried REGEXP_COUNT and other but I'm running on 9i and I think this is for 10g >
How can I achieve this?
I tried:
select to_number( my_column ) from my_table
But it doesn't work, because well not all of them are numeric.
EDIT
Ba...
I could use some help to write a prog./sql construct for a report..
The Sql should first check for the prompt & then decide which "select" statements should run
something like (pseudo-code)
Select ACCT,LOC FROM (
IF :loc = 'MN' THEN
Select acc as ACCT,location as LOC
ELSE IF :loc = 'MA' THEN
Select accid as ACCT,loc...
I am dealing with Sql Server and Oracle through Qt, when using QSqlDatabase::transaction() on a database connection. When another user/connection has a transaction open on the same database does the transaction() call block until the other transaction is finished or fail ?
...
I have a proc that print checks if there is any new checks to be print. If there is nothing to issue new checks it wont print any. Now i want to modify this proc like even if i don't have any new checks to be print, it should pick up at least one check to be print.( even if it is already printed). Can you tell me how to do that. Here is...
Hello:
I need to do a generic C# program to let the data reading from an Oracle database table (T1) with, for example, field names a, b, c, d, and saving into an SQLite3 table (T2) with the same field names and types than T1, althought with additional fields that can have null values.
I am using the different ado.net libraries provided...
When the Oracle 10 databases are up and running fine, OCILogon2() will connect immediately. When the databases are turned off or inaccessible due to network issues - it will fail immediately.
However when our DBAs go into emergency maintenance and block incomming connections, it can take 5 to 10 minutes to timeout.
This is problematic fo...
Hi,
The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes Excel. Any ideas??
Thanks
Sub GetData()
Dim conn As New ADODB.connection
Dim connString
connString = "DSN=name;Uid=user;P...
I am having a prior knowledge of shell scripting.
I am trying to connect to a table using SQL*Plus and fetch the data in a Perl script and store that output in a Perl variable.
Normally in a shell script I would do like below:
SQL_RESULT=`sqlplus -s ${CONNECT_STRING} << EOF
${SQLPLUS_SETTINGS}
select foo||'|'||bar ||'|'|| xy...