Data dodania Pytanie
2017-02-05 12:02 Is there a way to execute an SQL merge atomically? »
I am looking for a way to connect a tuple of values with a random UUID in a non-locking manner and without the potential to fail a transaction due to ...
(2) odpowiedzi
2017-02-05 01:02 Validate UK postcode using regular expression in oracle »
Below is the list of valid postcodes: A1 1AA A11 1AA AA1 1AA AA11 1AA A1A 1AA BFPO 1 BFPO 11 BFPO 111 I tried with (([A-Z]{1,2}[0-9]{1,2})\ ([0-9][...
(1) odpowiedzi
2017-02-04 22:02 Is value on the list of values? (Oracle SQL) »
Below works for SQL Server and MySQL, but how to modify it to work as proper Oracle query: SELECT city FROM station WHERE LEFT(city, 1) IN ('a', 'e',...
(2) odpowiedzi
2017-02-04 22:02 Case in Select Statement issue? »
I would normally use the popular if-else statement in java, but in sqlplus I'm using the case in select statement to query the conditional statement t...
(3) odpowiedzi
2017-02-04 08:02 Split a string based on hyphen »
I have a string like this XX0099-X01 I would like to split the string into two based on the hyphen, i.e. XX0099 and X01 I have tried as SELECT 'X...
(2) odpowiedzi
2017-02-03 19:02 Oracle SQL grouping elements »
I know this question is kind of trivial but I have difficulties writing the SQL for the example shown below. As shown in the first table, is the resul...
(4) odpowiedzi
2017-02-03 16:02 ORA-06553 character set name is not recognized »
I have changed oracle database's NLS_CHARACTERSET from WE8MSWIN1252 toAL32UTF8 as described here Now when I run database commands, I get the followin...
(1) odpowiedzi
2017-02-03 06:02 How to query "LastName, FirstName" from "FirstName LastName" when there may be middle initials? »
Field contains first and last names. PERSON: Bob Franklin Gene Smith Roy G. Biv I am trying to create a query that puts the last name first, then ...
(6) odpowiedzi
2017-02-02 21:02 How to differentiate PrimaryKey and uniquekey Constraint in java »
In both cases of PrimaryKey violation and uniqueKey violation, I see the same message, error code and sql state values. When I run the insert query ...
(3) odpowiedzi
2017-02-02 19:02 Oracle jdbc "createArray" throws "Unsupported feature" exception while trying to pass arrray to prepared statement »
I am trying to pass an array to my prepared statement by doing createArrayOf val prep: PreparedStatement = con.prepareStatement("select * from SOA_WE...
(3) odpowiedzi
2017-02-02 17:02 coldfusion combine results from two queries »
I have two coldfusion queries, like below which return different columns along with a date column. <cfquery name="qry1" datasource="test"> sele...
(2) odpowiedzi
2017-02-02 17:02 A better way to swap two primary key values and circumvent a ORA-00001: unique constraint violated? »
Goal: Swap the primary keys of two records without encountering an ORA-00001: unique constraint violated. The solution that 'works' (further below) i...
(1) odpowiedzi
2017-02-02 13:02 Convert from hex-encoded CLOB to BLOB in Oracle »
I have some large binary content in hex form stored in a CLOB and want to convert that to a BLOB where the hex code is actual binary byte encoding: D...
(1) odpowiedzi
2017-02-01 22:02 What is the @ sign in SQL used for other than parameters? »
For a query which looks something like select * from cus_query.ca_activity_vw@drifter I imagine cus_query is the schema and the view's name is ca_...
(2) odpowiedzi
2017-02-01 17:02 How can I reduce my dataset by omitting a value within a group »
I was looking for some assistance in regards to my query. I need to create a new table that contains a subset of data from the old table. The import...
(2) odpowiedzi
2017-02-01 12:02 Not getting ORA-25156 "old style outer join (+) cannot be used with ANSI join" when I should be »
When converting some old-style joins to the SQL-92 style a (+) was accidentally left in the query. No error was raised when I expected the error ORA-2...
(0) odpowiedzi
2017-01-31 22:01 ruby on rails prepared statement for oracle view/function »
I have the following code which executes an oracle view as follows: def run_query connection.exec_query( "SELECT * FROM TABLE(FN_REQRESP(#...
(0) odpowiedzi
2017-01-31 18:01 How to insert multiple rows from a single row in Oracle »
I have the following table in an Oracle database src_tbl id from_date thru_date ------------------------------ 1 01-JAN-2015 31-oct-...
(2) odpowiedzi
2017-01-31 11:01 The difference between two count statements »
I have two count statements in SQL and I would like to get the difference between them. I was trying something like this. SELECT 'Customers After', ...
(3) odpowiedzi
2017-01-31 11:01 Oracle fuzzy text search with wildcards »
I've got a SAP Oracle database full with customer data. In our custom CRM it is quite common to search the for customers using wildcards. In addtion t...
(1) odpowiedzi
2017-01-30 21:01 Database read locking »
I have a use case where I need to do the following things in one transaction: start the transaction INSERT an item into a table SELECT all the items...
(3) odpowiedzi
2017-01-30 19:01 Sysdate not working properly »
I have a oracle database which has a date (yyyy-mm-dd) and a time (hh-mm-ss in 24 hour format) column, I would like to compare each with today's date ...
(0) odpowiedzi
2017-01-30 10:01 ORACLE min date row for each code »
I have 2 tables PREVI_INFO ╔══════════╦══════════════╦═════════════
(1) odpowiedzi
2017-01-30 09:01 Read oracle tables using .NET, one LONG type column always returns empty string, how to solve it? »
I am reading from a table all_tab_columns, there is a "data_default" column, which is a type of LONG. If I query the oracle server using sqlplus, suc...
(1) odpowiedzi
2017-01-29 21:01 Stuck in my procedure [ORACLE] »
I am trying to perform an operation on my procedure but it does not work for me. I want to show the name of a file next to the tables that it has but ...
(4) odpowiedzi
2017-01-29 18:01 Relational Algebra how can I SELECT two conditions? »
The relevant table is: TRAIN (train-code, train-type, departure-station, destination-station) List details of trains which depart from LONDON and ar...
(3) odpowiedzi
2017-01-29 06:01 Max Value based on two columns »
I have a table with multiple columns that contains both month and year. I'm trying to identify based on column1,column2 what is the greatest month and...
(2) odpowiedzi
2017-01-28 19:01 How to properly call a function with date parameter? »
I had to create a function that computes how many people are born from the given date as a parameter. I have a table named Person with date of birth ...
(1) odpowiedzi
2017-01-28 13:01 Is possible insert a new row in a complex view created from 2 tables? »
I've read Oracle Language Reference and There is nothing about this situation So here we go... I've coded a complex view from 2 tables: CREATE OR RE...
(2) odpowiedzi
2017-01-28 04:01 Get all dates in a week »
When I select a date from dual. I have to display all the dates in particular week with days. First I get week number using select to_char(sysdate,'...
(1) odpowiedzi
2017-01-27 16:01 How can I use Hibernate/JPA to tell the DB who the user is before inserts/updates/deletes? »
Summary (details below): I'd like to make a stored proc call before any entities are saved/updated/deleted using a Spring/JPA stack. Boring details:...
(2) odpowiedzi
2017-01-27 16:01 SQL in a particular order »
I have data in below order: Bushing ID comp_Code Spot ID ---------------------------------------------- 1 R ...
(1) odpowiedzi
2017-01-27 12:01 How to check in Oracle if table is read only? »
I would like to make an ORACLE table read only. It is possible using: ALTER TABLE table1 READ ONLY; However when table1 is already read only, then a...
(2) odpowiedzi
2017-01-27 07:01 How to get min from 2 values using Oracle SQL »
I have 2 tables TAB1 and TAB2. Both have 3 columns each SEGMENT, LEVEL and VALUE. Below is the data from both tables: TAB1 SEGMENT LEVEL ...
(1) odpowiedzi
2017-01-26 16:01 Oracle - Group By Creating Duplicate Rows »
I have a query that looks like this: select nvl(trim(a.code), 'Blanks') as Ward, count(b.apcasekey) as UNSP, count(c.apcasekey) as GRAPH, count(d...
(1) odpowiedzi