Questions tagged as 'sql'

2
answers

Get date with day of week, number of week, month and year

Is there any way to get the date if you only have the day of the week, the week, month, and year number with MySQL? Example: I want to know what day it is with these parameters: Year: 2014 Month: September (09) Week number of the y...
asked by 18.09.2014 / 19:55
1
answer

Do a SELECT multiple tables and save in a worksheet

I'm trying to do a SELECT with multiple tables, where I have a product with your information, and I have another table structure to be able to add an extra field and their respective information. What I tried to do was this: SELECT p.codigo...
asked by 30.07.2018 / 20:13
2
answers

Insert Oracle sequence

Error SQL Error: ORA-00911: Invalid character 00000 - "invalid character" * Cause: identifiers may not start with any ASCII character other than letters and numbers. $ # _ are also allowed after the first character. Identifiers...
asked by 25.05.2017 / 00:17
1
answer

SQL select with dynamic where in ABAP

Is it possible to create a select with dynamic where in the abap language?     
asked by 13.12.2017 / 19:21
1
answer

PostgresSQL - Stored procedure

What's wrong with this Stored Procedure? CREATE OR REPLACE FUNCTION public.sp_teste ( IN varchar, OUT codigo integer, OUT setor varchar, OUT grupo integer ) RETURNS SETOF record AS $$ begin return query SELECT co...
asked by 16.04.2015 / 20:50
3
answers

Grouping by day and date period

I have a query from the period from 26 to 30-06 which brings the following result: Data_Cancelado Cancelados 27-06-2017 4 29-06-2017 5 However, I want it to come this way, that is, I want it to come to the query...
asked by 18.08.2017 / 15:41
1
answer

SQL does not work on another device after publishing to the web

Why can not my page run queries to the bank when it is published on the web and being used from other devices (networked computers and smartphone)? If I use the computer itself (server), I can access it normally. Would it be any SQL Server co...
asked by 11.05.2014 / 17:57
1
answer

How to use FOR to INSERT within a function in ORACLE?

I have the following function: FUNCTION PERSISTIR_CR( p_AnoExercicio TB_CONFIGURACAO_EXERCICIO.NUM_EXERCICIO%TYPE ,p_CodCR TB_CESTA_ROTINA.COD_CESTA_ROTINA%TYPE ,p_CodUG TB_CESTA_ROTINA.COD_UG%TYPE ,p_Pc...
asked by 14.04.2014 / 18:40
1
answer

How to make a subquery in laravel eloquent with WHERE

Hello, I'm using laravel 5.6 and I'm creating a query query using the eloquent laravel, but I'm having trouble creating a subquery What I want to create is simple in SQL server: ,DT_ALTA = (SELECT TOP(1) DH_DESO...
asked by 13.09.2018 / 15:28
3
answers

How do I relate three tables?

I have three tables. NotethatifIperformanINNERJOINonallthreetables,Iwouldonlyreturnproduct1(Router),whichispresentinallthreetables.However,Iwouldneedhimtoreturnallresultstome,butwithoutrepeatinginformation.Ex.:IfIhave7routersintheestoque1tablea...
asked by 10.08.2017 / 18:45