Questions tagged as 'sql-server'

1
answer

How do I show the result of a SQLSRV query in PHP?

I need to do a calculation via sqlsrv, add a column of values. Here is the code I tried to do: $qryAC = "SELECT SUM(VLRECEITACONT) AS receitaConta FROM [RDO].[dbo].[ANALISE_CRITICA] WHERE CC='$partCC[$i]' "; $stmtAC = s...
asked by 16.10.2014 / 19:59
1
answer

Product Structure Select

Good morning! Is there a way to create a query that brings the "product" and all "Components and Subcomponents" of the structure of this product? Let me try to explain better Structure Image LinktoImage: link Text format...
asked by 08.08.2018 / 13:48
2
answers

Error with insert in SQL Server: The conversion of a varchar data type to a datetime resulted in an out-of-range value

Next I have to do a search and implement a query in the database using Merge and I have to do this using one of the scripts used in class. The problem is that when I run the script it gives the following error in insert and the...
asked by 20.11.2017 / 17:31
1
answer

How to import XML from Data Dictionary to SQL Server?

To contextualize, I'm doing a data dictionary for a local database, for that I used a tool called "DataBase NoteTaker". This tool loads the data from the database and allows me to comment on the data in the tables and saves the changes to the...
asked by 29.11.2017 / 16:44
1
answer

How to change the date format in SQL Server 2008?

Currently my bank is in YYYY-DD-MM format I would like to in MM-DD-YYYY. I found the SET DATEFORMAT only that is not the best option since I will have to add it in all querys . Is it possible for me to configure it on my connection...
asked by 28.04.2014 / 21:36
1
answer

Trigger UPDATE write TXT file

How can I create a trigger that fires every time I have a UPDATE in x column, get the new value to create a new txt file and insert into it. (for synchronization purposes). For example: produtos Layout do txt: 55 | nome_pro...
asked by 24.04.2014 / 16:21
2
answers

How to get the date of creation of an index in SQL Server?

By SQL Server Management Studio I did not find in the properties of an index its creation date. How can I get the date of creation of a specific index just by name?     
asked by 20.01.2014 / 21:56
1
answer

Dynamic Attributes of an Entity Model

I have a procedure that returns a number of dynamic columns , because this procedure uses the Pivot , then the question arises: How to create a Entity Model for this procedure? Example: public class SProcedure_EF6Context : DbContext {...
asked by 18.05.2017 / 01:51
1
answer

SQL SERVER Myth about SELECT INTO and locks on tempdb

Lately I've been studying a lot about database and everything. Today, performing a routine check on the processes of the instance of SQL Server verified that a statement that was running in one database was blocking execution in another database...
asked by 09.04.2018 / 19:33
3
answers

How do I find "holes" in SQL Server tables? [duplicate]

I have a table with a column id (primary key, auto increment of value 1). My application allows rows to be deleted, so the query SELECT id FROM tbl ORDER BY id ASC would be this: id --- 1 2 3 4 5 6 7 ... However, some r...
asked by 04.09.2017 / 19:59