Questions tagged as 'sql-server'

2
answers

Difference of exact hours between Date A and Date B

$qry = "select CONVERT(VARCHAR(20),fechaSalida,108) AS fechaSalida, CONVERT(VARCHAR(20),fechaEntrada,108) AS fechaEntrada, CAST(DATEDIFF(minute, fechaEntrada, fechaSalida)/60.0 as decimal (18,2)...
asked by 18.09.2018 / 22:34
1
answer

export excel with php and sql server

Hi, I would like to export php excel with sql server: The error that is coming to me is this: sqlsrv_query () expects parameter 1 to be resource, string given in sqlsrv_fetch_array () expects parameter 1 to be resource, boolean given in...
asked by 30.06.2018 / 16:48
2
answers

Problems joining two sql tables and comparing if there is

I want to get a query where Cve, Name and Exist, in one table I have the catalago and in another I have the ones that exist, therefore I want to get all the catalago but with an extra field that is in 1 those that exist and in 0 those that are...
asked by 23.06.2018 / 20:23
1
answer

Validations within the SSIS

I currently have the following flow in an SSIS My question is, is there any way to put an OLE DB, which allows me to insert information into a table called errors if the Excel Source comes to fail, in a few words, if the Excel file does...
asked by 03.05.2018 / 01:42
1
answer

How to read an xml saved in sql Database

I need to be able to read all the data in each row to put them in a bootstrap-table , does anyone have any ideas? I have this code saved in a field in my sqlserver database: <xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882' xml...
asked by 02.04.2018 / 17:33
2
answers

Get varbinary (50) from SQL Server to byte [] in C #

I'm doing a Login , in which the user's password stored in the Database is of type varbinary(50) I must recover this value, to later compare it with the key string entered by the user. In the Database I have the following:...
asked by 06.04.2018 / 15:27
1
answer

sp_rename in SQL server inside an exec

I want to use the sql server sp_rename function, the problem is that I have to put it inside an exec, since the database on which it runs is dynamic and I have it inside a cursor. The fact is that the following sentence works correctly: EXEC (...
asked by 25.04.2018 / 18:32
2
answers

How to update or insert data from one table to another table in the same database in SQL

Good morning one more time I need to get used to greeting help The problem I have is that I want to update a table with the data of another table always in the same database in SQL but for reasons of life has not updated me this is the script...
asked by 24.04.2018 / 17:05
1
answer

How to make a backup of the database from terminal?

I have a database in MS SQL Server 2017 express, in ubuntu 16.04, I am administering it DBeaver and I do not set an option to make a backup, I have tried with terminal and it does not work: $ tsql -S localhost -U SA BACKUP DATABASE prolo TO D...
asked by 10.03.2018 / 06:42
2
answers

Consult 3 tables and the result is by id the largest in 'Sql server'

I have 3 tables and I have the following query: select S.ID, C.IDSENSOR, C.ID, CF.IDCANAL, MAX(CF.ENTRY_ID) as entry, cf.estado from Sensor as S join Canal as C on S.Id = C.IdSensor join CanalFeed as CF on C.Id = CF.IdCanal where S...
asked by 14.03.2018 / 02:03