Questions tagged as 'sql-server'

1
answer

Show alert message without causing an exception

I would like to display an alert message to the user without causing an exception in the procedure. I am using SQL Server. So I can not use RAISERROR , nor PRINT , as it is not shown to the user. Is there a way to display an alert...
asked by 21.11.2016 / 13:45
2
answers

List every month in Query or PHP?

I need to list every month within a period, including the ones that did not move, for example: My Query: SELECT LEFT(B8.B8_DTVALID, 06) AS VALIDADE, SUM(B8.B8_SALDO) AS VENCIDO, 0 AS VENCENDO, 0 AS AVENCER FROM SB8030...
asked by 22.07.2015 / 22:25
1
answer

Compare Current Line with Previous [duplicate]

I want in a "Test" column to set the "S" value to only the first line of a given "code" and all others set the value "N" and so on to all other codes in a SELECT, I'm using SQL SERVER. ID COD VLR DATA TESTE 01 123 100 "06/09/2015"...
asked by 16.09.2015 / 21:28
2
answers

Field format for saving time

What field should I use in SQL Server to save a running time? Example: 2Days 23H 47Min 00Sec. If you have an example with Fluent API it will help a lot.     
asked by 23.06.2016 / 04:20
1
answer

SQL 2012 - replace (nolock) with with (nolock)

I need help solving an incompatibility problem. The company I'm working on is migrating from a SQL Server 2008 to 2012 Bank, but we've identified some issues. The main one is the declaration of (NOLOCK) without WITH in VIEWs, FU...
asked by 13.08.2015 / 14:18
2
answers

Import and read from file

I have an Asp.Net MVC project with Entity Framework 4 and SQL Server, where there is a Action that receives via POST a csv file. Considering memory usage, processing time and resources, or any questions about the database...
asked by 31.05.2016 / 21:39
1
answer

How to connect PHP with SQLServer via PDO

I'm using the following code: try { $con = new PDO("sqlsrv:Server=172.20.21.193,9090;Database=sgt","deb","123123"); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { die ("Erro na co...
asked by 07.07.2015 / 19:31
2
answers

c # query with cycles

Good people I'm doing a job in using C # and my knowledge is still very limited and I'm having a question. I have 2 tables and what I wanted to do was to show the 2 information where the information would not be repeated. Thisisa1-nrelationwh...
asked by 14.07.2015 / 13:30
1
answer

How to write bit information to SQL Server database?

I am developing a registry system in VB and need help writing the CheckBox information to the SQL Server database. The column is in bit in the database, I do not know how to pass the parameter so that the user's choice is saved...
asked by 25.09.2015 / 16:52
1
answer

How to retrieve data from a query made with "ADODB.Command" object?

Based on the code below, where can I retrieve results from ADODB.Command ? This unit will always work with stored procedure , and the parameter types that will be used are input and output . unit uadolibrary; interface...
asked by 24.01.2015 / 04:09