Questions tagged as 'sql-server'

1
answer

Subtract Saturdays, Sundays and specific dates from another table

Good afternoon, I have a table: National Holidays id data dascricao I have a table: holidays (single and spliced) id data description in another table: obligation (where through a user-informed "long-term" date I w...
asked by 16.02.2017 / 20:39
2
answers

Compare a null bit column

I know the result of the following queries are the same, but I would like to know if there is a difference in execution by SqlServer in performance issues and etc. SELECT * FROM CLIENTES C WHERE C.FL_EXCLUIDO IS NULL OR C.FL_EXCLUIDO = 0 or...
asked by 13.02.2017 / 20:41
1
answer

I need to display a TOTAL field in a PIVOT query

I have the query below that returns the total quantity in stock of the products for each city. Each city is a column and the products are displayed in rows. Now I need to display in a field (column) the sum of the total quantity of each city,...
asked by 15.02.2017 / 17:54
0
answers

How to install sqlsrv driver in pdo?

How do I install or sqlsrv driver in pdo? <?php function conectar(){ $pdo = null; try { $opcoes = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION); $pdo = new PDO("sqlsrv:server;host=192.168.0.30\COMPASS;dbname=weset;", "sa","...
asked by 22.02.2017 / 21:01
0
answers

Encrypt database CodeIgniter

Good evening. I caught the boat walking here in the company I joined to continue a system for a company, in CodeIgniter connected with a SQLServer database. My knowledge in SQLServer and servers is very low, so I'm picking up a little. The...
asked by 02.02.2017 / 21:41
2
answers

PDO Drivers for SQL Server

I'm trying to run a PHP application (version 5.5.8) with the connection to the SQL Server database with PDO, but it returns the following error:    could not find driver I have tried to enable features in php.ini but to no avail! Remem...
asked by 23.01.2015 / 18:15
1
answer

http post with BodyRequest Sqlserver

Hello, how do I get a post request passing an xml as date? I tried it on another GET request and it worked: DECLARE @Tabela TABLE ( CampoXML XML); DECLARE @URL VARCHAR(8000) SELECT @URL = 'url?parametros=' DEC...
asked by 02.02.2017 / 13:00
0
answers

Faster form API REST - PHP

Good morning people Stack overflow !! Next, I'm doing an integration next to my Sql server bank of a Rest API, where I pass the information I want in the URL and get the content as json I make several requests in this API, bec...
asked by 16.01.2017 / 13:22
0
answers

How to retrieve the id inserted in sqlserver database using delphi datasnap

How to get the id that has just been inserted into the database on the server side, use Delphi XE10.1 SQlServer and Firedac Bank, I would get the id to use in the child table when it is master detail. as shown below procedure TsrmCadastro.dspP...
asked by 09.01.2017 / 22:27
1
answer

Delete records dynamically in SQL

I need to delete multiple table data in different SGDB types, but I do not know how to do this in a practical way. I need to keep 10 records in the tables and I need to delete all the remaining ones, but I can not do this with the command:...
asked by 11.01.2017 / 20:26