Questions tagged as 'sql-server'

1
answer

How should data be selected from a table through joins?

By using SELECT to get the data of tabela_A by joining with tabela_B , normally, and assuming it to be the correct form, we use some of the JOIN commands. Ex: SELECT codigo, nome FROM tabela_A a INNER JOIN tabela_B b...
asked by 25.02.2016 / 20:41
1
answer

Date format in PHP coming from SQL server

I'm running the following code: $sql= mssql_query("select getdate()"); $res = mssql_fetch_assoc($sql); and it is returning me the following date:    2015-04-10 32767: 06 The time is 5 digits, does anyone know why? ps. I've alrea...
asked by 02.10.2015 / 14:56
1
answer

microsoft sql server connection and configuration in php

I'm trying to connect to a microsoft sql server database using php. The php version is: PHP Version 5.6.3 and the error it gives is    Fatal error: Call to undefined function mssql_connect () in C: \ xampp \ htdocs \ aloha.php on line...
asked by 02.12.2015 / 14:34
2
answers

Schema permission on a specific user

I created a default database and created some schemas within this database. I created users for each schema, now I want to give full permission to each user in their schema only, how should I do?     
asked by 05.10.2015 / 19:26
1
answer

How to perform JOIN where the identifier could not be associated

I have the following query ready on an old system: SELECT regional, r.cod_gerente AS cod_gerente, u2.username AS nome_gerente, s.COD_REPRESENTANTE AS cod_representante, u1.username AS nome_representante, SUM(s.jan_valor) AS...
asked by 23.11.2015 / 21:32
3
answers

SQL CASE with more than one condition

I wonder if you can use CASE with more than 1 condition. In this query I have calculations that need to be done when a.operacao == 'C' but that depend on the value of a.DESCRICAO_PREMIO ( '1P' or '1/5P' ) to...
asked by 08.05.2016 / 22:13
1
answer

Insert a large volume of data in the sql server

I downloaded a list of cities on the internet. There are more than 5,000 municipalities. I tried a simple Insert and I could not. You have exceeded the maximum number of 1000 records. Then I tried Bulk, but I do not know if I did it right or not...
asked by 06.05.2016 / 20:30
1
answer

How to select a String in column format? SQL SERVER

I have a STATUS field in a table with the following data: VENDA,COMPRA,DEV.VENDA I need to make a query in this field that the result is a column, where each row will be one of the strings between the ',' (VALUES). For example: VENDA...
asked by 22.05.2015 / 15:14
1
answer

Customize Individual User Accounts

Well, I have an Asp.Net MVC web project that uses Individual User Accounts and I would like to use a specific table in my database and a different class to manage user login. How can I do this?     
asked by 03.06.2015 / 14:35
1
answer

Table to store expenses and revenues. Cyclical information

I'm creating a C # system for storing individual revenue and expenses. I am in doubt about the storage of this type of information, which has frequencies and repetitions. For example: I have a monthly expense of 36 months or I have an indefinite...
asked by 05.03.2015 / 01:03