oracle

oracle php ORA-00911 invalid character on UPDATE

Hi Gurus I'm running a PHP Script that updates a table from a Oracle DB. First I receive an object with JSON: [{"lot":"KLMHA17N9N00","requestor":"B10078","id":"FRESHLOT","username":"B26696","password":"B26696"},{"lot":"KLMHA17R1800","requestor":"B10078","id":"FRESHLOT"}] That with no problems since I've been using JSON in other proje...

Can I create a custom expression without using the where clause?

While I have already solved this issue in a previous question using a native query. I am now wondering if it is possible to create a custom expression that is usable in a Criteria without using the where clause? The reason I don't want the where clause is because Oracle's connect by ... start with ... (here) statement. I followed this pa...

Single out duplicates between two result sets

Hi, I'm having trouble with a query I'm trying to do. I'm trying to select values that come up in to result sets. I'm currently dealing with two queries: A) SELECT /*+ RULE */ pi.compressed_name, pi.phn, to_char(pi.date_of_birth , 'YYYY/MM/DD') as date_of_birth, gen.description as gender , to_char(pe.started_on , 'YYYY/MM/...

PDO refuses to switch between multiple Databases!

Please I am very new to PDO, rather a novice at PHP as well. I am currently working on a project that involves connections to many databases: MySQL, MSSQL and Oracle. So I am using the class below, with PDO, for my connection. The class code is below. class db { private static $objInstance; /* * Class Constructor - Create a new data...

SQL to query by date dependencies

Hi, all. I have a table of patients which has the following columns: patient_id, obs_id, obs_date. Obs_id is the ID of a clinical observation (such as weight reading, blood pressure reading....etc), and obs_date is when that observation was taken. Each patient could have several readings on different dates...etc. Currently I have a quer...

Oracle sql query running for (almost) forever

An application of mine is trying to execute a count(*) query which returns after about 30 minutes. What's strange is that the query is very simple and the tables involved are large, but not gigantic (10,000 and 50,000 records). The query which takes 30 minutes is: select count(*) from RECORD r inner join GROUP g on g.GROUP_ID = r.G...

displaying Oracle table's column names

Is there a one-liner out there for this task? Note that I won't be using Oracle's SQL Plus. ...

Check if table exists in the database - PL SQL

Hello, I'm new in PL SQL, and I need to check if table exist on server and drop it. Thanks in advance, Goran ...

Oracle 'CONNECT BY' Syntax

This is an offshoot of the following question: http://stackoverflow.com/questions/3524604/single-out-duplicates-between-two-result-sets As by a comment in that questions, I'm trying to implement my query using Oracle's special 'CONNECT BY' syntax. I'm having trouble finding any (clear) information on how to implement the syntax in my ca...

Best way/tool to get the results from an oracle package procedure

EDIT: Clarified the question In MS SQL Server if I want to check the results from a Stored procedure I might execute the following in Management Studio. --SQL SERVER WAY exec sp_GetQuestions('OMG Ponies') The output in the results pane might look like this. ID Title ViewCount Votes ...

Oracle CRM OnDemand custom web applet - add User object variables to URL

I have a custom web applet that I am adding to the Lead object tab of my Oracle CRM On Demand app. It is easy to include a variable in the URL via the %%%VARIABLE_NAME%%% convention but that seems to only work with the object itelse (Lead, Service Request, etc) Since the field I want to add is part of a different object (the User) it doe...

Oracle SQL query count group by timestamp substring

Given a table that has a column of string "timestamps" (yyyyMMddHHmmssSSS format), I want to substring the first 8 characters, and get a count of how many rows have that substring, grouping the results. Sample data... TIMESTAMP 20100802123456123 20100803123456123 20100803123456123 20100803123456123 20100804123456123 20100805123456123 2...

Caching small, more or less constant tables in Oracle 11g

A lot of the queries in our application involve joins between a large (+ frequently updated) tables with small (+ constant tables). By large I mean > 1 million rows and by small table I mean < 5000 rows. I am looking for ways to utilize some feature/optimization technique in Oracle (not at application layer) so that these joins can be m...

What is the reason for using "user_Id:password" for PKCS11 when it only accepts a pin?

With respect to Oracle Database 11g transparent data encryption (TDE) with HSM, I understand that the following command is used to set the master encryption key. However, why does a user_Id have to be specified when the PKCS#11 library for the corresponding HSM only requires a PIN? SQL> ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY "use...

Missing documentation for Oracle Database 11g TDE master key

I have looked through the whole set of "Oracle Database 11g Release 2 (11.2) Documentation" searching for the details of the master encryption key used for transparent data encryption (TDE) with HSM. There was only a single insignificant line out of the whole set of documentation that says it makes use of AES. What surprised me was that...

Which PKCS#11 function does Oracle Database 11g makes use of?

I am currently in the process of coming up with a PKCS#11 library with minimal functions such that my legacy HSM is able to support the Oracle database 11g transparent data encryption (TDE). I do not want to come up with the complete PKCS#11 library with all the functions since all I need is to support Oracle database. In addition, codin...

How to specify tab delimitation file load in Oracle sqlldr control file?

This should be simple, but what is the correct syntax for an Oracle sqlldr control file in order to specify tab delimited/separated data? FWIW, I found the file was UTF16 and not UTF8, and was editing fine but would introduce null bytes as Oracle read the control file. Can't even replicate today. ...

asp.net oracle connection with tns info

now I am connecting my oracle db with connection string in webconfig. thas is But I wanna connect oracle database with tns like that tns: TDDB.xe=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=20.100.173.31)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=tddb))) user/pass = hr/hr if this is posssible , ...

Decode function in Oracle

I have a condition like if(someparam!=value1) someparam=1 if(someparam!=value2) someparam =2 Default value = 1 How to use decode function for this condition ...

designedly big value in SQL

Ok, I have to put null values last. The query should run under Oracle and MySQL. I've already came up with ORDER BY CASE WHEN some_table.ord IS NULL THEN 9999999999 ELSE some_table.ord END I should use value > max(some_table.ord) instead of 9999999999. I think subquery to determine this value is too ugly here. If this was C+...