Questions tagged as 'sql-server'

2
answers

Error 102 in OpenQuery

I'm having this error:    Incorrect syntax next to '@SQL_LINKED'. Error 102. SQLSTATE 42000.   Severity 15. MsgState 1. Line 78. When trying to run this script: SET @SQL_LINKED = 'SELECT CAST(v.produto AS VARCHAR(20)) AS CAIXA, v....
asked by 03.01.2018 / 03:37
1
answer

Permission User SQl Server

I need to create a user within the Sql Server login with access to the databases, however I do not want to release any other resources (such as Security, server role, Sql Agent, backup and etc). This user is for system development, is there any...
asked by 28.12.2017 / 12:49
2
answers

PHP (Between + Convert Date)

I am making a screen in php where the user has the date filter to extract a report from SQL Server , but MySQL it displays the default date mm / dd / yyyy , and I need it to dd / mm / yyyy in between , does anyone know how to do th...
asked by 03.01.2018 / 19:56
1
answer

Identify the change of record in a temporal table?

I'm working on a table that keeps track of some people, and I need to identify and display rows that have undergone some modification in a particular column. See example: --Tabela HistSituacaoPessoa id | nome | situacao | data 999| Fulano...
asked by 19.12.2017 / 18:13
0
answers

Bulk Insert bringing information without accent

Expensive, Good afternoon! I have a problem when I perform a bulk insert from excel to SQLServer, I have a column named city and when I do the bulk insert and I include the information in the database they lose their settings, eg SÃO PAULO...
asked by 12.12.2017 / 16:37
0
answers

Get data from excel sheet and insert into SQL SERVER database

I want to know if you have a way to get the records of a worksheet and play to a SQL-SERVER table, is there a possibility?     
asked by 08.12.2017 / 13:23
1
answer

How to check null fields in sql?

The trigger I have to do:    A user can only assign a rating to an offer if he has purchased it (reserve with estado = pago ). On the other hand, one of the two rating and comment attributes has to be NOT NULL . What I have do...
asked by 08.12.2017 / 02:00
2
answers

SQL / LINQ vs. Data to feed graphic

I am trying to generate a query in VS2015 with Linq (here, I exemplified in SQL, to speed up my tests directly in the bank) that returns the data grouped and counted from 6 months ago, it happens that in some of the months there is no data soon...
asked by 05.12.2017 / 13:16
0
answers

Month and day inverted when saving to database

I am using datepicker of jqueryUI to choose the date in a calendar, the problem is, if I choose 04/12/2017 it is saved in the 12/04/2017 database. datepicker: $('#schedulingCalendar').datepicker({...
asked by 28.11.2017 / 14:41
1
answer

Concatenate results

How to concatenate all results of a query in SQL Server in order to return all information in a variable? For example, considering a cliente table with the following composition: ╔═══╦════════════╗ ║ ║ Nome ║ ╠═══╬════...
asked by 11.05.2017 / 19:49