Data dodania Pytanie
2017-01-09 17:01 Oracle SQL Index DATE vs Index TRUNC(DATE) »
I have a Table named DEXTRACTO and I need to consult a period of time based on column F_EXTRACTO (witch is DATE format) with a BETWEEN DATE1 AND DATE2...
(2) odpowiedzi
2017-01-09 16:01 How can I inject "variables" WHERE clauses into a query? »
I have a query: SELECT * FROM table_name WHERE name=? surname=? gender=?; and I have to inject the strings into the query (I use the prepared statem...
(2) odpowiedzi
2017-01-09 14:01 Why mysql select count(distinct user_id) return wrong number? »
I have a big table in mysql.It has 13 million rows. Mysql version is 5.7.10. Table structure as below: create table table_name ( user_id varc...
(0) odpowiedzi
2017-01-09 08:01 Turning arbitrarily many rows into columns in PostgreSQL »
I have a table in Postgres that was designed to capture information in unstructured form and rebuild it. I need to re-apply some structure when export...
(2) odpowiedzi
2017-01-08 21:01 Updating a table in Oracle based on data from another table and 3 keys »
All, Here is my two tables: Table customer First_Name | Last_Name | Purchases| Age John Rambo 10 55 George Washington...
(1) odpowiedzi
2017-01-08 14:01 Difference between === null and isNull in Spark DataDrame »
I am bit confused with the difference when we are using df.filter(col("c1") === null) and df.filter(col("c1").isNull) Same dataframe I am gettin...
(2) odpowiedzi
2017-01-07 20:01 Bulk data insert from SQL to Oracle using C#.NET »
The following code snippet for for bulk insert of data from SQL DB into Oracle database. I have used stored procedure in oracle database with 2 para...
(1) odpowiedzi
2017-01-07 14:01 SQL Trigger information »
I have a general question about Triggers. Is there anyway to program the SQL database in a way that whenever a trigger is fired, SQL tells us what row...
(1) odpowiedzi
2017-01-07 12:01 How can this postgresql query return as table? »
I am trying to call modules which in specific course but it returns as error: more than one row returned by a subquery used as an expression Query: ...
(2) odpowiedzi
2017-01-07 08:01 How to delete a node from Oracle XMLTYPE based on a condition? »
I have a XML data stored in a CLOB column and I would like to delete some nodes based on a specific condition. Example XML Data : <?xml version="...
(4) odpowiedzi
2017-01-06 20:01 Issue with case when SQL »
I have a table named 'candidate' which contains among others columns ,score_math' and 'score_language' reflecting candidate's score in respective test...
(2) odpowiedzi
2017-01-06 15:01 How to identify and aggregate sequence from start and end dates »
I'm trying to identify a consecutive sequence in dates, per person, as well as sum amount for that sequence. My records table looks like this: person...
(2) odpowiedzi
2017-01-06 12:01 With Oracle, how can I restore a table that I dropped accidentally? »
I have actually dropped instead of deleting a table in Oracle SQL. Drop table emp; Is there any way to retrieve it back? ...
(3) odpowiedzi
2017-01-06 12:01 What is the difference between NOT condition and NOT() in Oracle and MS SQL Server »
Recently I happened to come across not () in Sql Server and Oracle. Tried different examples comparing NOT condition and not() with different operator...
(3) odpowiedzi
2017-01-06 10:01 SQL multiple OR chain query »
I have a single table where I am attempting to access rows via a simple SQL query I think, however, I am misunderstanding the way the OR modifier tech...
(2) odpowiedzi
2017-01-06 10:01 Mysql query unknown behavior »
I have the following query that I'm working on for a wordpress website: Select posts_tender.ID AS tender_ID, tender_meta_user_ministry_tbl.me...
(0) odpowiedzi
2017-01-05 22:01 PostgresSQL using sum in where clause »
I have a table which has a numeric column named 'capacity'. I want to select first rows which the total sum of their capacity is no greater than X, St...
(2) odpowiedzi
2017-01-05 22:01 Oracle database - determine what table triggered a trigger »
I am working with Oracle Express 12c. One of the tables I created has an associated trigger which prevents it from directly updating one of its column...
(2) odpowiedzi
2017-01-05 20:01 Postgres bulk INSERT function using JSON arguments »
Here's a plpgsql function for postgres 9.6. It tries to INSERT a row, and if the insert doesn't fail (due to a key constraint violation), then it runs...
(1) odpowiedzi
2017-01-05 18:01 SQL Consecutive records with count »
Table Name Calls Field 1 - Phone_number Field 2 - System_outcome Phone_number System_outcome DateTime ----------------------------------------...
(3) odpowiedzi
2017-01-05 18:01 How to search in Json file attached in BLOB field using Oracle 12c? »
I want search text inside of json. that json is persisted in blob field. I have created the follow table CREATE TABLE APPLICATION ( application...
(2) odpowiedzi
2017-01-05 16:01 error with inner join - table not found although it's there »
SELECT * FROM "animalTbl" INNER JOIN "deathTbl" ON animalTbl.animalID = deathTbl.animalID; this is my code, and when I run it shows a problem ...
(2) odpowiedzi
2017-01-05 09:01 Find Duplicate in column b for each value in column A Oracle »
I have Table like Below: Sr_No C_A C_B ------------------- 1 100 A 2 100 A 3 100 B 4 101 A 5 102 A 6 102 ...
(2) odpowiedzi
2017-01-05 04:01 MySQL - Efficiently delete all records except last N »
I started learning SQL recently and now was asked to perform a simple deletion on a table, keeping the last 100 records for each user. I was researchi...
(2) odpowiedzi
2017-01-04 20:01 How to put a CASE statement in the GROUP BY clause »
I've got a table with one column that is a comma separated list of possible values. I'd like to query, grouped by each individual possible value. As...
(2) odpowiedzi
2017-01-04 20:01 List the number of records that have X number of associations in has_many »
I have my Person class which will have 0 or more widgets associated class Person < ActiveRecord::Base has_many :widgets end I'd like to list o...
(2) odpowiedzi
2017-01-04 14:01 MySQL sum each X rows »
I need little MySQL help. I have a table with hourly values like that: ID | VALUE | HOUR 1 | 1.0 | 01.00 2 | 1.0 | 02.00 ... 24 | 1.0 | 24.00...
(2) odpowiedzi
2017-01-04 14:01 Json query vs SQL query using JSON in Oracle 12c (Performance) »
I am using oracle 12c and Sql Developer with json For this example I have the follow JSON: { "id": "12", "name": "zhelon" } ...
(1) odpowiedzi
2017-01-04 07:01 How to sum all columns value of a table and display the total in new row by using Postgresql »
I am using normal select query to display all rows SELECT type, debit, credit, (debit-credit) as balance from bank_cash_registers ...
(2) odpowiedzi
2017-01-04 04:01 Getting Hourly Average »
I'm fairly new to coding and would appreciate all the help I can get. I am trying to get hourly amount values from my transaction table. It collects d...
(1) odpowiedzi
2017-01-04 01:01 SQL Using a String Function on Indexed Column Performance »
I have a general question regarding using String Functions and their impact on performance. I have a table with a non-clustered index on column ID. T...
(1) odpowiedzi
2017-01-03 23:01 Database structure and queries for a Twitter-like posts timeline »
I'm posting this question with a Django tag, because I'm working in this environment, but it's actually more or a generic question: I'd like to show s...
(3) odpowiedzi
2017-01-03 19:01 Efficient SQL table joining or query in POSTGRES ? How and what to do? »
I have the following tables table 1 ID1 YEAR1 1 1980 2 1964 3 1910 table 2 ID2 YEAR2 VALUE 1 2000 A ...
(4) odpowiedzi
2017-01-02 19:01 mysql select closest date from today »
I have below table date ----------------------- 1. 2017-01-02 20:59:00 2. 2017-01-04 10:00:00 3. 2017-01-04 11:00:00 4. 2017-01-09 17:20:00 Q1:...
(4) odpowiedzi
2017-01-02 18:01 Run SQL statements in PL/pgSQL only if a row doesn't exist »
I want to do something like this in a PL/pgSQL function in Postgres 9.6: INSERT INTO table1 (id, value) VALUES (1, 'a') ON CONFLICT DO NOTHING; --- I...
(4) odpowiedzi