Questions tagged as 'sql'

1
answer

SQL query using several times the same function

I have a function that converts the ID of a version to number, for example, from 1.0.0 to 10000 , so I can filter the results. Function: CREATE OR REPLACE FUNCTION f_convert_tag_to_number(ptag varchar2(12)) RETURN NUMBER IS...
asked by 23.11.2016 / 20:06
1
answer

Development without EF ORM

It is worth developing without ORM, because today I want to develop an ERP, but I have no knowledge in any framework , is it worth doing everything at hand? Will I have the same result? Well, I realize that I'm wasting a lot of development t...
asked by 08.04.2017 / 00:57
1
answer

Spending only one year on a sql server 2014 proc

I made a filter in a proc and I can not bring results. When running the proc it did not give any errors, but it does not bring any result and I do not know if it is correct. The colleague said that I do not need to pass any parameters, I do not...
asked by 17.04.2017 / 14:26
1
answer

How to make a select that brings the data registered in a given week?

I want to list all the data registered in a given week, can someone help me? I did something similar to the example below and it does not work. public List<View_Venda> Venda_Semanais() { List<View_Venda> lis = new List<Vi...
asked by 13.04.2017 / 11:33
1
answer

SUM and GROUP BY duplicating values

When trying to aggregate and group values, I noticed that SUM and GROUP BY are not behaving the way I expect and I could not identify the cause. Performing the query below SELECT representantes.cod_representante, represent...
asked by 18.08.2016 / 15:55
2
answers

How to select single data from a conditional join?

I have 2 database tables: servers +----------+--------------+ | Field | Type | +----------+--------------+ | id | int(11) | | ip | varchar(255) | | votes | int(11) | | port | varchar(255) | | hash...
asked by 13.11.2016 / 20:33
2
answers

How to join 2 tables without repeating data?

I have 2 tables, one call SR7010 and another call SR3010 . The primary key of the two is the field R7_MAT and R3_MAT. The query I'm trying to perform is this: SELECT R7_FILIAL, R7_MAT, R7_DESCFUN, R7_DATA, R3_VALOR FROM SR701...
asked by 19.08.2016 / 21:15
2
answers

Connecting to the database in ASP.NET with EntityFramework

I need to migrate a system from one server to another. The system is in ASP.NET and the connection to the database is a bit strange. I need to know how to connect to the database. The only thing I found about connection in Web.Config...
asked by 11.07.2016 / 21:49
1
answer

SQL - Query Doubt

I'm wondering with a tremendous doubt, I have these 3 columns just need to bring the smallest record if the date is between the between. Example: If you enter date 12/23/2015 to 01/01/2016 it is not to bring record because the smaller record is...
asked by 26.07.2016 / 17:07
1
answer

mysql - row for columns gravity forms

Good afternoon, I'm a good beginner in database and programming, but I like to tinker when it's needed. I have a table in the database with answers of a form made in wordpress by gravity forms that presents the responses online such that: id...
asked by 14.06.2016 / 22:39