Good afternoon.
I need to generate an excel file by SQL SERVER. And I need to specify the data type of the cells in that file.
For example, in value cells, set the data type to "R $" for example. In cell with percentage, already set cell d...
I have a project running on Xampp with PHP 5.6 and SQL Server 2014 Express.
I am trying to migrate the project to PHP 7.1.0 but it is giving error as picture below.
I copied the dlls to the PHP ext folder which is in c: \ php7 \ ext.
Th...
In my table, I have two columns, DT_INICIO and DT_FIM , it would be an Absence table.
Let's say that an employee is absent in DT_INICIO From (25/03/2016) to DT_FIM (3/27/2016), I need to make an appointment on 03/26...
I have the following function that calculates the 01:00 hours, returns 60 minutes.
but the sql column stores in time (0) 01:00:00 format,
What about the error in my function, I do not know how to increment the code to calcu...
I need to perform an insert in three related tables in the same query. I have the following scenario: Cidade, Estado e Pais
How can I build a stored procedure on Sql Server for this?
I have a function that returns me the status of a request (in the database it's int) that only has two possible values, 0 (inactive), 1 (active). I was trying to increment it with 'case when' in case the result is 0 it returns 'Inactive Request'...
In a datetime field, when the value is NULL should only return - , I tried the IFNULL function
SELECT ISNULL(data, '-') as data FROM tabela
but I get the error
Microsoft OLE DB Provider for SQL Server error '80040e07'...
I have the query that returns me the results. I would like to add an incremental number to show the records from 1 to the end as if it were a new column.
select *, sum(valor) as ValorSoma, count(pedido) as QtdPedido from tb_vendas
where idvend...
I wanted to know if I could get the "SET STATISTICS TIME ON" result.
For example, the result of my query gave 1139ms. Can I get this result and manipulate it?
Convert to seconds, minutes, write to a table ...
Let's say I have this block:
declare @teste int
declare teste_cur cursor
for
select campo1 from tabela
.....
while @@fetch_status = 0
begin
set @teste = 0
select @teste = campo1 from tabela where campo2 = condicao2
end
.....
If the sele...