Questions tagged as 'sql-server'

2
answers

How can I do an SQL query that only shows me a record in a datagridview [closed]

I have my crews form where you are adding personnel, but when they are shown in the datagridview, I do not want them to show me all, but only one record per page. Here is an example of this:     
asked by 07.04.2017 / 17:30
2
answers

Problem adding SUM () in query

I have this Query SQL but when wanting to add a SUM to the column CANT_DISPONIBLE generates me an error, this is my Query select EB.ARTICULO,EB.BODEGA,EB.CANT_DISPONIBLE,EB.CANT_RESERVADA ,EB.CANT_TRANSITO,EB.CANT_REMITIDA,SUM(EB...
asked by 16.05.2016 / 20:42
2
answers

Format Date in MySQL

My problem is that I want to add a date column in this format 2016-08-13 Exactly in this Order I achieve this: DATE_FORMAT(NOW(),'%y-%m-%d') but now I need the same format but adding 30 days something like that but I have no idea DATE_FO...
asked by 14.08.2016 / 01:14
3
answers

Top 1 for each group in a Group by SQL Server

I have a table similar to this one CancelLog |ID| membrecia| User | DateCancel | Motivo | | 2| 1 | uS1 | 7/29/2011 | ... | | 3| 1 | uS2 | 7/30/2011 | ... | | 6| 1 | uS1 | 8/02/2011 | ... | |...
asked by 17.03.2017 / 22:16
1
answer

how to do a SQL query from different tables?

Good morning, I hope you can help me. I need to make the following query: Obtain the full name of the employees, as well as the name of the department, position and salary in which I have worked. I have the first query that is the following:...
asked by 28.11.2018 / 02:57
1
answer

SQL Server query: How to get a single record, from an inner join

I have the following tables, I would like to obtain the result which I mention in the example. I hope you can guide me a little. Thanks. Tabla: TR | idt | vt | ------------- | 1 | 1101 | | 2 | 1102 | | 3 | 1103 | ------------- Tabla TE...
asked by 23.11.2018 / 20:43
1
answer

Count records of three SQL server tables

I have the following: Tabla1: "CAT_SEXO" Campos: SEXO_ID/SEXO Tabla2: "CONDUCTORES" Campos: sexo_id Tabla3: "LICENCIAS" Campos: fecha_captura for mentioning the data of interest for my question. The point is that I need to consult the n...
asked by 23.08.2018 / 01:25
3
answers

Change date format to a column type date sql server

When I save a date in the format dd-mm-yyyy to a table with a date type field of SQL Server, it is saved as yyyy-mm-dd until there everything is fine, I want to save a date in the mm-dd-yyyy format as they use In the United...
asked by 20.09.2016 / 13:50
1
answer

Encode64 in Oracle?

How do I do an encode64 to a query? This is my query select id_solicitud from sol_solicitud where id_solicitud=506 My query brings me 506, but I need the query to return me with encode64, that is to say that it appears like this NTA2...
asked by 25.07.2018 / 14:32
2
answers

SQL Select inner join

I have this problem that according to me I made a query to get only one answer row, but for some reason I get the same record several times, can someone tell me what I'm doing wrong? select [Nombre de Obra], Estado = case...
asked by 17.10.2018 / 20:02