Questions tagged as 'sql-server'

1
answer

Get data from a created column

Good night, I have a table with 4 fields and through them I make some calculations and create a new field to show these same results ... The problem is that later I want to go get those results and I do not know how to redeem them. / p> declare...
asked by 01.07.2017 / 03:10
3
answers

Authenticating users through a form with a connection to a database is secure in relation to crackers?

I would like to authenticate users of my program using a form with connection to a sql server database but I do not know if it is a secure way against unauthorized copies. Authentication will be done in a common way with username and password, t...
asked by 13.07.2017 / 20:15
2
answers

Period variable data SQL Server

Below I have the following code where I search in a table all the data within the specified period in the declared variables. However, a specific customer has a different month closure, in which case his month starts on the 26th, and ends on the...
asked by 02.08.2017 / 15:36
1
answer

Query query - SQL Server 2012

Good afternoon! Well, I do not know if that's possible, but I wanted to know how I can get a one line record to stay on another line. I will illustrate. In the query below is coming out like this. Projeto Operador...
asked by 04.08.2017 / 19:18
1
answer

Perform sub-query with data from a first

Hello friends, a question has arisen, where even though I have entered various forums, I have not succeeded in healing it, so see if you can give me a "light". I have a main SELECT, and some sub-queries. In one of these sub-queries I need to pas...
asked by 27.06.2017 / 19:14
1
answer

Drop Inventory with SQL Triggers

I started doing a course on SQL and I am in doubt regarding the triggers this is the table create table Produto ( codProduto int primary key identity(1,1), Nome varchar(50), Quantidade int, Preco smallmoney ); create table Item...
asked by 13.09.2017 / 12:53
2
answers

How to store information from a SELECT into variables

Good evening community, I have a stock program that I'm finishing and I want to do a validation for it always check if you have enough of that product before adding it to the sale. For this I used a simple math operation, where one variable stor...
asked by 07.12.2016 / 00:30
1
answer

Foreign Key Sql Server

I have a doubt refuse the foreign key in the following situation: Tehno the table UF, with 3 columns: ID_UF (PK), Cod_UF (int) and DescUF (nvarchar (50)) I have another table called IDE, with 3 columns: ID_IDE (PK), Cod_UF (int) and...
asked by 30.08.2016 / 17:07
1
answer

Image gallery asp.net and C # with problem to view the photo

I'm having trouble displaying the photo in the browser, the repeater brings all the info from the bank except the photo. I inserted the data manually into the database. // TABLE CREATE TABLE [dbo].[Imoveis]( [CodImovel] [int] IDENTITY(1...
asked by 12.08.2016 / 00:00
1
answer

Doubt about data type database

Look at this table of INT data types in SQL SERVER: tinyint | 0 a 255 | 1 byte smallint |-2^15 (-32.768) a 2^15-1 (32.767) | 2 bytes int |-2^31 (-2.147.483.648) a 2^31-1 (2.147.483.647...
asked by 19.05.2017 / 17:01