Questions tagged as 'sql-server'

3
answers

Application logon failure in IIS when trying to connect with SQLServer

When I run an application of type site in visual studio, the connections to the database work normally. But when trying to run IIS 7 to perform some tests, I get the following message:    Unable to open the "XXX" database requested by logon...
asked by 30.06.2017 / 14:41
4
answers

SQL query comparing two fields from the same table

I have a table in SQL Server and I'm having a hard time making a query. I have a table like this: alunos ra nome serie cod_curso 23 joão 1 EI 23 joão 2 EI 23 joão 3 EI 44 mari...
asked by 12.11.2015 / 11:51
3
answers

Will I lose my databases if I upgrade SQL Server 2012 Express to Standard?

I have installed an instance 2012 Express, I need to upgrade to Standard, but to update I need to make sure that there is no change in the databases.     
asked by 17.09.2015 / 21:38
1
answer

Is it indifferent to use SQL Server or MySQL with PHP?

I'm setting up a medium project and I'm going to model the database, then create the tables, the procedures , and the database itself, of course. I would create everything with MySQL, but by already messing with SQL Server, I thought I could us...
asked by 22.07.2016 / 19:47
3
answers

Table Structure / Nomenclature

I am developing a permission system and I have a universe of 9 tables, which form the final permission for the user to use my systems, however, I am in doubt about how to build two of them, that of "inherited" permissions of Systems and Groups,...
asked by 19.11.2014 / 14:33
2
answers

Error while inserting - String or binary data would be truncated

When doing this insert: INSERT INTO t_cmo_oit1980_leitura(id_oit_let,id_oit,rx_num, dt_rx) SELECT (1), (SELECT id_oit FROM t_cmo_oit1980 WHERE id_oit = 6574), (SELECT rx_num FROM t_cmo_planilha_leitura WHERE id_xfc = 39517),...
asked by 19.04.2017 / 12:55
2
answers

Add or subtract value, depending on the type of posting (MSSQL)

I have the following query: SELECT MOVTIPOPRODUTO.ID_ENTIDADE, ENTIDADE.NOMECLIENTE, PRODUTO.NOMEPRODUTO, TIPOPRODUTO.DESCRICAO, MOVTIPOPRODUTO.ID_PRODUTO, MOVTIPOPRODUTO.ID_TIPOPRODUTO, MOVTIPOPRODUTO.ID_SAFRA, MOVTIPOPRODUTO.ID_LOCALE...
asked by 23.07.2018 / 14:27
1
answer

Error while trying to connect to SQL Server from webservice in IIS 7.5

I'm getting some errors when trying to perform a query on SQL Server from a WebService hosted on an IIS 7.5 server. My connectionString in web.config: <connectionStrings> <remove name="LocalSqlServer" /> <add name="TE...
asked by 17.09.2015 / 18:54
3
answers

Do not repeat records in a join

I have two tables: One with 1009 records and another with 11949. When I do a join, I have 11949 records, and the records in the 1009 records table are repeated several times. I need to do a select with join, but bring only the amount of records...
asked by 20.04.2017 / 22:19
4
answers

How to perform SQL concatenation

I need to concatenate year and month. How could I do that? select cast(year(orderdate) as int) + ' ' + cast(month(OrderDate)as int) as Year_Month From sales.SalesOrderHeader     
asked by 14.08.2017 / 18:15