Questions tagged as 'sql'

1
answer

Problem with UNION ALL

I have a problem with a SQL statement that I do not use too much, in fact this is the first time I use it for practical purposes. I have two tables, one of questions and one of answers. The structures are these: questions: idpregunta / i...
asked by 16.11.2017 / 18:33
3
answers

Help with this sql query

I have a question with the following exercise: Aware of the extra expenses that employees must face in the month of March, it is desired to reward the employee or employees with the highest sales amount for the month of March. To do this, we...
asked by 06.04.2017 / 00:38
1
answer

Problem with select in datetime field

The definition of the intento table is: create table INTENTO ( ID_INTENTO int not null auto_increment, ID_U int, ESTADO varchar(50) not null, FECHA datetime not null,...
asked by 02.02.2017 / 08:12
3
answers

How to open a sql Server connection in C #?

Well my problem is that I want to open a sql server connection so I can make a query BD and get a possible result either erroneous or successful. Code of my method to authenticate users: public string Autentificar() { string sql = @"SE...
asked by 24.03.2017 / 22:50
2
answers

How to show a row in a SQL query?

I have an SQL query in a web application, what I want to show is that the rows with total = 100 are displayed in color verde and rows with total = 0 are displayed in color rojo , but not How to implement this function...
asked by 22.03.2017 / 17:18
2
answers

only shows me the first record of my query

Hello friends I have a problem with my query, it turns out that I am making a query with related tables my table: inscription_projects I relate it to my table: inscription_students by means of the id of the inscription_projects table and that id...
asked by 08.12.2016 / 19:23
1
answer

Floating point error when obtaining the result of two high negative numbers in SQL Server

I want to perform the following operation SELECT POWER(-0.616666,-1.6441441441441) but it returns the following error Msg 3623, Level 16, State 1, Line 3 An invalid floating point operation occurred. I already tried to cast both number...
asked by 05.03.2018 / 20:42
3
answers

SELECT between two dates

I am trying to do a SELECT that brings me all the records that are between two dates. However, I want to ignore the time (hours, minutes, seconds, etc ...). For example, I have a record that has 2016-11-14 11:47:56.207 , but I send...
asked by 15.11.2016 / 16:43
1
answer

SQL Error 18456 when connecting to the server

I'm having trouble connecting to "SQL Sever Authentication." When I installed the program in the Database Engine Configuration part I selected mixed authentication mode, this created me an administrator "CRONOPIO \ Lucas (Lucas)" but when w...
asked by 30.10.2016 / 03:34
1
answer

Problem with the Index Primary Key identity they give huge jumps in tables.

In some occasions the database has given me jump we say that of going in 200,000 until 250,000 or even greater. Some idea of how I can do a log search, to determine the problem, some recommendations of possible causes or information that will he...
asked by 06.10.2016 / 18:53