Questions tagged as 'sql'

2
answers

Query in Access with a While cycle

Good morning. I have a problem, I would like to select data from my database in Access with a range of dates and a specific name. How can I do it? My thought is with While but it does not work for me. select * from Registro While...
asked by 23.12.2016 / 17:00
3
answers

Count between 2 columns of 2 tables

I have these 2 tables table 1 ---------------------------------- | articulo | Ubicacion | ---------------------------------- | 200116 | cy1112 | ---------------------------------- | 200116 | ee3091 |...
asked by 25.07.2017 / 22:00
3
answers

Get fields that contain a phrase with Match () Against ()

I'm trying to get the books whose titles contain what the user enters. Assuming I have the following books: Trees Planes There was once trus Assuming that the user entered the letter a , before resolving it using the followin...
asked by 24.02.2017 / 04:44
2
answers

Case in sql query

I'm doing a query in sqlsrv 2000, to several tables where there are two fields estado and estado2 (that do the same thing, I do not know why they did it that way) that they keep 0 and 1 . I currently have a case in...
asked by 22.06.2016 / 14:57
1
answer

Using Ajax.BeginForm MVC 4 aspx c #

I'm a novice with MVC 4 My question is; How can I send all the information that the user captured in HTML to a function of my controller ?. That this function inserts my data sql server with Ajax.BeginForm there are n...
asked by 01.07.2016 / 18:25
1
answer

Get a JSON from an SQL query in Postgres [duplicated]

I have several tables with the following data: | sonda | fecha | valor | +-------+-------------------------+--------+ | s1 | 2018-10-23 23:34:00.444 | 34.5 | | s2 | 2018-10-23 23:34:00.444 | 4.5 | | s3 | 2018...
asked by 20.12.2018 / 18:12
1
answer

Convert Date to UTC in SQL Server 2014

Hello I have a record of calls made from different countries, I have the date and the country, the dates are adjusted to the time zone of each country, but I need to convert it to UTC, since I need to calculate the number of calls made in a mont...
asked by 13.12.2018 / 17:58
1
answer

Create new file every time the xp_cmdshell command is executed

I am working with SQL and what I want is that every time I execute the xp_cmdshell command, a new file is generated, since as I currently have it, write the same one, I leave the code of my query : DECLARE @Comando VARCHAR(2048) SET @...
asked by 08.08.2017 / 17:49
1
answer

Update a field in the database

I have the following table in informix: CREATE TABLE eh_user ( user_key serial NOT NULL, borrado boolean DEFAULT f NOT NULL, fecha_alta datetime DEFAULT current NOT NULL, propietario varchar, fecha_modificacion datetime,...
asked by 05.10.2018 / 11:38
2
answers

Is there a way to adapt an SQL statement when a null field arrives?

Hi, I hope you're ok, is there any way to adapt an SQL statement so that it reacts according to whether a parameter arrives nil or not, something like this: drop table if exists tabla; create table tabla ( id int primary key AUTO_INCREMENT...
asked by 21.08.2018 / 18:07