Questions tagged as 'sql-server'

0
answers

Schedule job sql server 2014

I have a procedure that I would like to execute at every X time. I did the scheduling on the sql agent all right. My question is the following, I need to replicate this procedure in all the bases to be able to use with the command: EXEC sp_MSfo...
asked by 09.06.2016 / 16:17
1
answer

Query between different banks in SQL Server

Given this query: SELECT PontoSecullum4.DBO.funcionarios.N_FOLHA, PontoSecullum4.DBO.funcionarios.NOME, PontoSecullum4.DBO.funcionarios.EMPRESA_ID, 1 [ORIGEM] FROM PontoSecullum4.DBO.funcionarios WHERE 1=1 AND NOT EXISTS( SELECT Cod...
asked by 09.06.2016 / 22:34
1
answer

JPA Eclipselink - Trigger SQL SERVER

I'm having a problem with a trigger created in SQL SERVER. When I insert the data in the table that initiates the direct trigger in SQL SERVER the trigger works normal, however when done the insertion by JPA it presents an error and of the rollb...
asked by 18.06.2016 / 17:47
1
answer

Insert apostrophes with variables

I'm doing a query through a value stored in a variable. This variable is declared DECLARE @it_codigo varchar(max) and gets value of a ntext field from another table, through a procedure. SELECT * FROM anaProdutos WHERE cod_produt...
asked by 19.04.2016 / 14:24
1
answer

Connect to SQLServer using Windows 10?

I'm using Windows 10 and I have to connect to a SQLServer 2000 database using the command line in a java application. But I'm getting an error. run: ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver SQLException: No suitabl...
asked by 25.04.2016 / 14:04
1
answer

Validation function pdo php

I have the function below that makes an insert in the table ESP35302_TMP but before entering I need to do a validation in this table, if there is already the bar code number that I am inserting, if it already exists that it does not need to exec...
asked by 25.10.2016 / 18:29
1
answer

Convert the result value of the sql query

I have the query that return me two results where I would like to format it to come in the proper format. How could I do that? select *, sum(valor) as ValorSoma, count(pedido) as QtdPedido from tb_vendas where idvendas > 0 and data_venda be...
asked by 12.04.2016 / 21:04
1
answer

Error writing data from some tables by application

I have an application in asp.net mvc which, among other functions, registers personal data of clients. We recently switched database access from one server to another, which has a copy of the database from the previous server. The problem is...
asked by 18.04.2016 / 16:00
3
answers

Format date in SQL SERVER [duplicate]

I need to do a SELECT in my SQL Server 2008 database and I'm not getting it. I need to convert a date to the formatted yyyy/MM/dd HH:mm:ss , however I need to convert it somehow that works on any SQL Server from 2008.     
asked by 15.03.2016 / 20:37
0
answers

Problems with encoding in java

I have a classic encoding problem, I did several tests, but nothing solved. The problem occurs only with data brought from the database in Sql Server, with the fixed text on the screen is working perfectly. I tried:    add in jsp:
asked by 14.03.2016 / 21:52