Data dodania Pytanie
2017-12-09 20:12 ORA-00907: missing right parenthesis Developer »
What could be the problem? CREATE TABLE ASIGNACION_ANUAL( ANIO NUMBER(4), COD_VENDEDOR VARCHAR2(4), MONTO_ASIGNACION NUMBER(9) NULL_MONTO, CANT_VENTA...
(1) odpowiedzi
2017-12-09 12:12 PostgreSQL SELECT, UPDATE and INSERT together »
I'm currently trying to SELECT columns from a table, do some arithmetic with the selected values and then INSERT the updated values back into the same...
(2) odpowiedzi
2017-12-09 10:12 Why where clause doesn't affect of the query? »
Here is my code: $tracking_codes_obj = new TrackingCode; $tracking_code = 140; if ( !is_null($tracking_code) ) $tracking_codes_obj->where('tr...
(2) odpowiedzi
2017-12-08 23:12 ORA-00907: missing right parenthesis SQL Developer »
I need to know why I get a parenthesis error in this part of the code. CREATE TABLE CIUDAD( COD_CIUDAD NUMBER(3) CONSTRAINT CIUDAD_PK PRIMARY KEY (CO...
(2) odpowiedzi
2017-12-08 18:12 PostgreSQL IGNORE NULLS in window functions »
On the left panel data without IGNORE NULLS. On the right panel data with IGNORE NULLS. So I need to get right variant in PostgreSQL Need to emula...
(2) odpowiedzi
2017-12-08 17:12 How to sum column values from two tables and preserve another column which is only in one table »
i have created tables item and item2, I know maybe it's data redundancy but i want to know how can select it, and create a view? create table item( ...
(3) odpowiedzi
2017-12-08 14:12 Combine multiple OR and LIKE mySql »
I understand that LIKE can not be used in inside IN clause from here. My table has col1, col2, col3 columns. How can I find multiple values in multi...
(1) odpowiedzi
2017-12-07 23:12 Filtering set returning function results »
I'm hoping to clarify my understanding of how set returning functions behave behind the scenes in PostgreSQL. Let's set I have a set returning functi...
(1) odpowiedzi
2017-12-07 18:12 oracle sql request column ambiguously defined »
I am working on oracle 11g and tried to execute this request select code_mod,INTITULE,code_et,nom ,avg(note) from note,exam,module,etudiant where not...
(2) odpowiedzi
2017-12-07 10:12 local collection types not allowed in SQL statements - Oracle »
SET SERVEROUTPUT ON; DECLARE type r05_id_type is TABLE of r01_table.R01_ID%TYPE; r01_ids r05_id_type; BEGIN SELECT r1.r01_ID as R01_ID BULK...
(1) odpowiedzi
2017-12-07 00:12 Pros and cons for MySQL snapshots vs SQL dumps »
What are the advantages/disadvantages of using database snapshots vs. backing up SQL dumps (from mysqldump)? I find SQL dump files easy to backup and...
(1) odpowiedzi
2017-12-06 23:12 What happens when a SQL query runs out of memory? »
I have a Postgres Server on AWS with a table (mytable) that is 100GB in size. When I query the data from my laptop, for example if I do select * fr...
(2) odpowiedzi
2017-12-06 21:12 Count multiple items in the same column pulling data from 2 tables - mysql »
I have 2 tables and I need to count the number of times any role shows up in each movie Example of Tables: Movie Table TITLE MOVIEID ...
(2) odpowiedzi
2017-12-06 19:12 Why can't I call my function in a SQL statement? »
I create a package that executes my function in a SELECT statement right inside that same page: CREATE OR REPLACE PACKAGE p AUTHID DEFINER IS F...
(1) odpowiedzi
2017-12-06 17:12 ORA-01748: only simple column names allowed here in Oracle »
What I am trying to do ? I am trying to create two tables and at the same time i am trying to link them together using foreign and primary keys. Howe...
(2) odpowiedzi
2017-12-06 15:12 Workaround solution to do a "INSERT...ON DUPLICATE KEY UPDATE" with null value on unique key »
To begin with, here is my code structure and what I want to achieve : I have this 3 tables : +----------------------+ | CONFIG_CAMPAIGN | +----...
(1) odpowiedzi
2017-12-05 23:12 how to use connect by method dynamically »
How to achieve the following I've got a query: select sr.source_rel_id, sr.source_rel_start, sr.source_rel_end, sr.source_rel_...
(2) odpowiedzi
2017-12-05 18:12 Precision MySql in division »
mysql> SELECT CAST(1 / 3 AS DECIMAL(21,20)); +-------------------------------+ | CAST(1 / 3 AS DECIMAL(21,20)) | +-------------------------------+ ...
(1) odpowiedzi
2017-12-05 10:12 merge data from rows to columns »
I have a source table like so: id | code | description | parent_code | level 1 111 testone null 1 2 222 testtwo nul...
(1) odpowiedzi
2017-12-04 21:12 Split rows in limited size buckets »
I have a table with thousands of records, I want to associate each row with a bucket and each bucket has a maximum of rows associated to it. I'd love...
(1) odpowiedzi
2017-12-04 19:12 SQL- how to retrieve by similar dates »
Okay, so I have a table with a user_id column and a submitted_dtm column. I want to find instances where users submitted multiple records within 1 d...
(4) odpowiedzi
2017-12-04 17:12 Can we define a GROUP_CONCAT function in PostgreSQL? »
I have several lines of SQL code for my legacy database with GROUP_CONCAT statements, as in: SELECT SUM(age), GROUP_CONCAT(sal) FROM Users; In Post...
(2) odpowiedzi
2017-12-04 17:12 How to select max price using multiple query »
i have create tow table, table and data inserting value are given below : create table product ( pid number(10) primary key, pname varchar2(30) ); ...
(2) odpowiedzi
2017-12-04 09:12 how to query nested array JSON in postgres? »
I have following structure of JSON document storing in one of my POSTGRES table link to the sample JSON is here here in that JSON , i have below s...
(0) odpowiedzi
2017-12-04 07:12 POSTGRES : SELECT : Query for number of rows which EXIST BETWEEN given range »
I have to query the table to search for given conditions : order_no specified in the range must exist. Example: I am getting a request for a rang...
(3) odpowiedzi
2017-12-04 06:12 Count variables per group at time intervals »
I am collecting data about a fleet of vehicles at 10 minute intervals. The following query returns 144 rows as expected (the number of 10-minute inter...
(1) odpowiedzi
2017-12-03 21:12 Stored procedure return return value and capture(LINQ) »
The output of the stored procedure named giris is as follows. How can I get the value of return_value with c # and linq. DECLARE @return_value int, @...
(0) odpowiedzi
2017-12-03 19:12 SQL trigger on delete mutating table »
I have to do a project for school and I got stuck at a question. I have created the following tables: Flights(flight_id, from, to, distance, departure...
(1) odpowiedzi
2017-12-03 17:12 SQL get unique id per user »
How can I group the statement by their user_id, i keep getting duplicates of 2 and 3 already used a group by on the user_id? What seems to be the erro...
(3) odpowiedzi
2017-12-03 14:12 How to get all rows of a table that share a value on a specific field? »
For Example If i have a table named students that has 4 fields id,fname,lname and dob (date of birth) How can I retrieve all students' names that sha...
(6) odpowiedzi
2017-12-03 14:12 SQL allowing an entity to participate in a relationship only if it meets certain requirements »
I have a practice Super Hero SQL database with a SuperPerson table and a Disaster table. There are two relationships between SuperPerson and Disaster,...
(1) odpowiedzi
2017-12-03 11:12 How can I check matching two values in a pivot table? »
Here is my code: $role_id = Auth::user()->role_id; $page_id = Page::where('path', $request->path())->where('method', $_SERVER["REQUEST_METHO...
(1) odpowiedzi
2017-12-03 03:12 2 Functional Dependencies in a single table »
I'm trying to create a schema based on these 2 Functional Dependencies. A -> B, C, D B -> D I'm trying to create a single tabl...
(1) odpowiedzi
2017-12-02 20:12 count of columns having a particular flag in oracle »
I have a table with 10 columns to store flags which can only be Y or N against a name like below NAME FLAG1 FLAG2 FLAG3 FLAG4 FLAG5 … ...
(2) odpowiedzi
2017-12-02 17:12 Why do these queries return different results? »
SELECT DISTINCT productName, listPrice FROM product WHERE productID IN (SELECT productID FROM saleItem WHERE quantity = 2) AND productID NOT IN (S...
(4) odpowiedzi