Questions tagged as 'sql-server'

1
answer

How to run a program made in C # on the client machine?

Good afternoon, I just finished a sales system in C #, I'm testing the same on another machine this generate error, I already installed the .Net Framework 4.5 but still it continues. What will be the mistake this time around?     
asked by 26.04.2017 / 16:39
1
answer

Generate report on Azure

I need to generate reports in an MVC application that will be hosted on Azure and I learned through this tutorial: Using the Report Viewer in ASP.NET MVC it is necessary to hire a Virtual Machine for the viwer reporter to work. From what I see...
asked by 09.10.2016 / 19:08
2
answers

Compare values with different conditionals in the same table

When I make a SELECT COUNT(*) in view vwNotaFiscal I get the total of lines: 3498 SELECT COUNT(*) FROM dbo.vwNotaFiscal WHERE tbEmbarques_emissao BETWEEN CONVERT(DATE,'01/05/2016',103) AND CONVERT(DATE,'31/05/2016',103) A...
asked by 04.07.2016 / 20:20
2
answers

word occurrence in sql query

I have a query SELECT NOME FROM PESSOA WHERE CODIGO = 1 It returns me ANA ANA JOAO ANA ALBERTO ANA Is there a way to count the occurrences of the ana? Using only the sql query?     
asked by 18.03.2017 / 21:00
1
answer

Group results in single line according to the sequence

I have the following query: SELECT * FROM ARELBATIDATRANSITOVIEW WHERE CHAPA = 1234 AND CODEMP = 1 AND BATIDA IS NOT NULL It picks me up like this: COD |DATA |BA...
asked by 20.03.2017 / 16:37
3
answers

Select with several Procedures

Good morning, How do I perform select with multiple procedure? I have a procedure that returns 3 averages of 1 specific month. Now I need to run this 12x proc on select. Type: SELECT (SP_JANEIRO), (SP_FEVEREIRO), (SP_MARCO) ..... Does anyone kno...
asked by 19.04.2016 / 16:06
1
answer

PDO SQLSTATE [07002]: COUNT field incorrect or syntax error [duplicate]

I'm having trouble making a decrease in sql with pdo. I'm getting the following error   SQLSTATE [07002]: [Microsoft] [ODBC Driver 11 for SQL Server] COUNT field incorrect or syntax error code <?php ob_start(); include'../../classe...
asked by 30.10.2016 / 21:58
2
answers

Calculate Value of SQL columns

I have two tables BMV_PEDIDO and BMV_PEDIDOITEM and would like the total sum of the value of the orders made on a certain date. Currently I do this by request, that is, I replicate this code 70x. I would like my query to return...
asked by 20.04.2017 / 16:34
2
answers

Format date and time return PT BR in PHP

I am using the strtotime function of PHP to format the date that comes in the SQL SERVER database and is working normally on the local server , but on the web it returns the date 12-31-1969 21:00 PM. Does anyone know why? (As it is recorde...
asked by 01.02.2017 / 15:30
1
answer

What is the best way to do these Triggers?

I wonder if there is a better way to write these triggers. I thank you --gatilho para gravar os dados do usuário CREATE TRIGGER TGR_TB_USUARIO_INSERT ON TB_USUARIO FOR INSERT AS BEGIN DECLARE @IDUSUARIO INT SELECT @IDUSUARIO = IDUSUAR...
asked by 16.06.2015 / 03:13