Questions tagged as 'sql-server'

1
answer

Use application made in VB6 in a smartwatch

Is it possible to create an application for the smartwatch in which the application is already made in Visual Basic and has the BDA in SQL Server? The purpose is for the user to be able to see the data in smartwatch such as a normal dashboar...
asked by 09.10.2016 / 12:50
1
answer

How to work with more than one dropdownlist to mount a C # URL?

I have the following dropdownlist where in the first one the person chooses whether he wants rental or sale. Thequeryinthedatabaseisbeingdoneasfollows:publicList<Imovel>ObterCasaOperacao(stringcodigoOperacao){try{stringsql="SELECT i.Co...
asked by 22.08.2016 / 19:16
1
answer

Group rows with null

How can I remove null rows and leave dates only side by side; Example: 48010255 | 2016-06-10 07: 46: 41,573 | null | 2016-06-09 12: 36: 22,243 SELECT cod_pista ,DT_ENTRADA = IIF(ST_TIPO_ACAO = 'E' AND CO_DESTINO = 7888,[DATA],N...
asked by 16.08.2016 / 07:31
1
answer

PIVOT SQL - Dynamic Columns with Variable

I have a table which I convert lines into columns with PIVOT. 'Chumbando' the column name works very well, however I will need to do this dynamically. Is it possible to use variables to define the name of the columns? SELECT PRODUTO,...
asked by 03.08.2016 / 17:26
1
answer

Procedure does not return select data

I created a simple procedure, it receives a parameter and should return the data according to this parameter: CREATE PROCEDURE [dbo].[testeLike] -- Add the parameters for the stored procedure here @teste varchar(50) AS BEGIN -- SET...
asked by 23.05.2016 / 15:42
1
answer

Days difference between records and display only the results that 14

I have the following query: SELECT V.CHAPA, F.NOME, V.DATA, DATENAME(dw,V.DATA) AS DIA, MAX(V.SEQUENCIALBATIDA) AS BATIDA FROM ARELBATIDATRANSITOVIEW AS V LEFT JOIN V_DADOSFUNC AS F ON V.CHA...
asked by 19.10.2016 / 23:24
1
answer

Incorrect syntax error near the keyword 'FROM'

This code generates the following error:    Msg 156, Level 15, State 1, Total ProcedureOrder Order, Line 7 Incorrect syntax near the keyword 'FROM'. CREATE FUNCTION dbo.totalGastoPedido(@id_mesa int) RETURNS int AS BEGIN DECLARE @To...
asked by 29.06.2016 / 01:10
1
answer

Conversion failed when converting the varchar value '????' to data type int

When performing UPDATE on a VARCHAR (4) column using an integer value in the SET clause. UPDATE TESTE SET ID = 9250 WHERE ID = 1234 The following error is returned:    Conversion failed when converting the varchar value '????' to data ty...
asked by 25.04.2016 / 22:53
2
answers

EntityFramework StoredProcedure retrieve parameter output

How to retrieve the Output parameter of a storedProcedure? SP Example: create PROCEDURE StoreProcedure_Name @ParametterWithNummvalue varchar(50) = null, @In_Parameter varchar(50), @Out_Parameter varchar(10) out AS set...
asked by 29.03.2016 / 03:47
1
answer

Index rendering sql query too slow

The DBMS in question is SQL Server On my system, we have a table that stores the journal entries. The table has a considerable amount of records, currently (around 1.2miles). Has a clustered index on a sequential numerator, which is the pr...
asked by 18.05.2016 / 16:06