Data dodania Pytanie
2017-08-09 21:08 PL/SQL Add Multiple Columns to Query with Single Function »
Is there any way to accomplish something like this in PL/SQL... select a.col1, a.col2, a.col3, myFunc(a.id) from myTable a; and the result be more ...
(2) odpowiedzi
2017-08-09 17:08 Left outer join and OR clause is slow. Is it possible to join after filtering? »
I have 2 tables like below. (1 million records in each table) When I join the two table and execute a query with OR clause, it is very slow. Is it pos...
(2) odpowiedzi
2017-08-09 17:08 Incrementing sequence with string prefix from foreign_key column »
This is the Cluster table: ╭────╥────────────┬─────────────╮ │ id ║ name ...
(2) odpowiedzi
2017-08-09 16:08 Oracle SQL multiple left joins with duplicate records or "invalid identifier" »
I'm fairly new to SQL and have done some joins before but nothing as complex as this. Basically, what I'm trying to do is to join together many tabl...
(1) odpowiedzi
2017-08-09 15:08 Postgresql data bucket based analysis »
I have a table called work which has columns as: CREATE TABLE work (user text, user_type text, medium text, docs_read int, on_date timestamp with ti...
(2) odpowiedzi
2017-08-09 13:08 Can not return table type from a function PLSQL »
I have defined record type, table type and function inside package specification. TYPE name_RECORD IS RECORD ( name VARCHAR2(244), surname VARCHAR...
(1) odpowiedzi
2017-08-09 09:08 Django complex filter and order »
I have 4 model like this class Site(models.Model): name = models.CharField(max_length=200) def get_lowest_price(self, mm_date): '''T...
(4) odpowiedzi
2017-08-08 21:08 How to get date: one month away from a specific date? »
I know that I can get the date from today such as select CURRENT_DATE - INTERVAL '1 months'; But what if I need the first date specified. Somet...
(2) odpowiedzi
2017-08-08 21:08 Why does SQL query with GROUP BY produce more rows? »
I have the following table: +------+-------+--------------------------------------+ | id | rev | content | +------+-...
(3) odpowiedzi
2017-08-08 14:08 Combining SQL queries with shared logic »
I'm currently duplicating a rather large SQL aggregation query so that I can run it once to return the metrics for the entire data set, then again to ...
(2) odpowiedzi
2017-08-08 13:08 Oracle SQL primary key stuck »
I ran into a curious problem. I am creating copies of currently existing tables and adding partitions to them. The process is as follows: Rename c...
(1) odpowiedzi
2017-08-08 11:08 How scn map to timestamp using sys.smon_scn_time in Oracle? »
In Oracle DB you can find out when your table was updated last time by using SELECT SCN_TO_TIMESTAMP(MAX(ora_rowscn)) from myTable; (see here) Va...
(0) odpowiedzi
2017-08-07 23:08 Oracle outer join and constant values »
====== Original question ====== I've multiple outer joins on constants as below in the SQL: select .. from CLAS MDP, CLAS ORG_CNTRY, CLAS BEN_CNTRY ...
(2) odpowiedzi
2017-08-07 22:08 Names in Alphabetical order then location in alphabetical order "Order By" not working »
I am super confused. I thought I was putting the associates names in ascending order and then having my locations as a sub category ascending order. B...
(0) odpowiedzi
2017-08-07 20:08 Add a new colum with the diff of two values »
sql is goofy sometimes ain't it? Right now I want to take two values from different column and compare the difference. Ex: ColA |ColB| New collum 1 ...
(3) odpowiedzi
2017-08-07 13:08 Laravel: Query to return data depending the ID I pass in URL »
First of all excuse me if when you read all the question you think isn't clear or question should be edited, please, make a edit and i will accept it....
(2) odpowiedzi
2017-08-07 10:08 Sanitize user input with the USING keyword in PL/pgSQL »
This is how I create my search_term: IF char_length(search_term) > 0 THEN order_by := 'ts_rank_cd(textsearchable_index_col, to_tsquery...
(1) odpowiedzi
2017-08-07 09:08 Check if time is between two times »
i want to do the following in SQL : I have three shifts: Shift 1 : 07:00 - 14:59 Shift 2: 15:00 - 22:59 Shift 3: 23:00 - 06:59 I want to...
(2) odpowiedzi
2017-08-06 16:08 40 seconds strange sql performance puzzle »
I'm running a query to update my user's field like the following: UPDATE Members SET abc = abc + 1 where Members.id in ( SELECT DISTINCT(memberId) FR...
(1) odpowiedzi
2017-08-06 11:08 Oracle partition performance »
I have a large oracle table with more than 600 million records and we just repartitioned them so that we can purge some of the old data with out incr...
(1) odpowiedzi
2017-08-05 15:08 Trigger behaving strangely »
I'm making a Database that needs to store data for a school system and for certain activities minors need a permit. I have this trigger that checks th...
(1) odpowiedzi
2017-08-05 05:08 Error ORA-02291: Integrity Constraint - 1:1 instead of 1:M? »
I see that the parent key isn't found. In my case, both FK_PLAYERTEAM and FK_PLAYERPOSITION. I noticed that everywhere I see this error, it's an order...
(1) odpowiedzi
2017-08-05 04:08 SQL issue - type of fkey »
I'm using PostgreSQL What I need In SELECT query I need to select owner_type (client or domain). If solution does not exist please help me to rework...
(2) odpowiedzi
2017-08-04 17:08 Oracle With, Case When statement missing keyword »
Hi I am trying to create a view in Oracle SQL Developer. I would like the view to be everything from raw_test with a new column As 'Exclusion Reason'...
(2) odpowiedzi
2017-08-03 20:08 Rails/Postgres query all records created after 5 PM in taking into account daylight savings switch? »
I am looking to query for all records on a table with a created_at time of after 5 PM, EST WITH taking into account daylight savings. My DB is Postgr...
(2) odpowiedzi
2017-08-03 20:08 Checking if a Birthday was between a 6 month span which crosses the year break »
I am trying to write SQL code (using SQL Developer) that checks if a person had a birthday within the past 6 month insurance term. This is what my c...
(4) odpowiedzi
2017-08-03 13:08 SQL order table results by 2 date time fields »
I've got a little thing, basically I'm taking the results out of a table, wich has the both 'from' (date time) and 'to' (date time) fields, but I only...
(3) odpowiedzi
2017-08-03 11:08 Inconsistent query results from MySQL »
Today we have spotted a strange behavior in SQL queries (we use MySQL v5.6.36 and InnoDB). Take this query: mysql> SELECT count(*) FROM `invento...
(2) odpowiedzi
2017-08-03 11:08 Mysql - Taking too much time to execute queries »
So first my mysql table are defined like this : Orders(333000+ records) orders_id(PK), customerName, CompanyName, Status, shipping_no, shipping...
(1) odpowiedzi
2017-08-03 10:08 How to replace every other instance of a particular character in a MySQL string? »
How to replace value in mysql column by query like, Column is options and its of type varchar(255) From id options 1 A|10|B|20|C|30 2 A|Posi...
(5) odpowiedzi
2017-08-03 10:08 how to sum up minutes and seconds ?in oracle »
I have a column called duration_d which is varchar2 and the data in that table looks like below duration_d ----------- 12:25 01:35 12:10 04:21 12:18 ...
(4) odpowiedzi
2017-08-03 08:08 geometry matching and update »
I am trying to match geometries from two tables and update one table based on the match. But this is taking huge time. Table1 +-------------+------...
(1) odpowiedzi
2017-08-02 13:08 Select all from a table ORDER BY another tables column, with match primary key »
I've been looking for a while but the query I am trying to accomplish seems fairly hard to find any information or documentation on how to do what I a...
(3) odpowiedzi
2017-08-01 23:08 SQL pairing adjacent rows »
Using postgreSQL (latest). I'm a total noob. I have a view that always gives me a table of an even number of rows- no duplicates (the letters are ana...
(1) odpowiedzi
2017-08-01 22:08 How to handle/use special charaters like percent (%) and ampersand (&) in Oracle SQL queries »
I need to include the special character "%" in my LIKE clause in a SQL query, e.g.: Select * From Some_Table Where Field_Name Like 'bla%bla&2'; ...
(5) odpowiedzi