Questions tagged as 'sql'

1
answer

Dates conversion problem?

Well my problem is as follows, I have to save a datatble with several records between them some dates, and I try to save them through a stored procedure that executes a table-type variable that is where I deposit all my values. all the code well...
asked by 16.03.2017 / 20:04
2
answers

Select values from two different Java.Sql tables?

Hello, I am trying to create a method that returns me% String[] with the data from 2 different tables in this case is the table user and the table geolocation , the data of the user with its respective geolocation (city , nei...
asked by 11.10.2016 / 17:18
2
answers

How can I join these two SQL queries?

I need to join this query SELECT CodContrato, FechaBaja, FechaFin FROM Contrato WHERE ( (FechaBaja != FechaFin) OR (FechaBaja != **SEGUNDA CONSULTA** AND (FechaBaja BETWEEN '20180101 00:00:00' AND '20181231 23:59:59') with th...
asked by 11.12.2018 / 12:38
3
answers

Separate name and surname in SQL

How to separate the words from the column of the table according to the space between them through the query (Select format) without making any changes to the table. In this specific case I seek to separate the name, father's last name and mo...
asked by 01.09.2017 / 04:42
1
answer

use of Sum SQL SERVER

I need to add everything that is in value; This is my query create procedure sp_DetalleDeduccionesEmpleado @inicio datetime, @final datetime, @emp int as select ded.DedId, sum(ded.DetDedEmpValor), emp.EmpId from Tbl_DetalleDeduccio...
asked by 27.10.2018 / 00:13
2
answers

Modify fields phpMyAdmin

I just started working with BDs , and I'm trying to update the value of a field in all rows. That is, in the table FRUITS I have the column color , and I want to put all the fruits have color rojo . The fact is that when trying...
asked by 14.05.2018 / 11:12
2
answers

Validations in SQL

I have the following problem, I have a web application, in which I fill a form in which an image is attached (in sql I only save the name of the image and then open it in another form), when updating the record, if the image is not updated the S...
asked by 18.05.2018 / 17:44
3
answers

Doubt with inner join

I have a database with two tables. One is the coche table and the ruta table: Table coche : pk_coche modelo ------------------- 1 Modelo 1 2 Modelo 2 3 Modelo 3 Table ruta...
asked by 16.04.2018 / 12:02
1
answer

Modify data type sql

I am trying to modify a data type from varchar (20) to varchar (50) I have this query ALTER TABLE ALUMNO MODIFY DESCRIPCION VARCHAR(40); but I have an error near MODIFY : Incorrect syntax near 'MODIFY'. Somebody could help me p...
asked by 22.02.2018 / 15:52
2
answers

SQL SERVER. Add the amount of all records

I have an example problem about bank transactions. My table contains a lot of data such as Cash, Office, Name, Last Name, Date, ID, Amount, Type ... Each box (there are several) has several offices, and these in turn have many customers. Afte...
asked by 01.02.2018 / 16:27