Questions tagged as 'sql-server'

2
answers

Service to get a change in the bank

I need the following. How do I make a service auto start whenever the bank flag changes from 0 to 1? I have a field in a table in the DB (Sql Server), that every time the seller requests a discount, the flag (FlagLiberacao byte) changes from 0 t...
asked by 28.09.2017 / 13:31
1
answer

Insert date written in the textbox in a certain format for the database

Code: private void button1_Click(object sender, EventArgs e) { conn.Open(); using (SqlCommand cmd = new SqlCommand("INSERT INTO (StartDate) VALUES(@StartDate)", conn)) { cmd.Parameters.AddWithValu...
asked by 26.09.2017 / 17:00
0
answers

Occupation of abnormally large space

Environment: Windows Server 2008 (A: x64, B: x86) SQL Server 2008R2 in both. The second column is the number of rows, the third column is the space occupied in KB. Does anyone have any idea what might be causing this? (I've already e...
asked by 15.09.2017 / 12:57
0
answers

DataBase in "Restoring" mode

Good afternoon, everyone! In SQL Server 2008, I needed to do a conversion in the database of one of our clients and was going to back up in case there was a problem, but I mistakenly pressed for a restore and for lack of attention I gave "Ok"...
asked by 13.09.2017 / 18:55
1
answer

Join between tables that are not directly related

I have three tables: Candidate that has an ID as pk (which was invented) Application that has FK for Candidate ENEM that does not have any id that represents the candidate, only his / her registration and information such as color / race...
asked by 18.09.2017 / 03:54
1
answer

Working days function

The query below in datediff is bringing the days difference correctly, but I only want to bring the amount of working days. I already have a working day function that excludes Saturdays, Sundays and holidays. But I'm having trouble put...
asked by 18.09.2017 / 15:33
1
answer

Get SQLServer TimeStamp

I'd like to get the TimeStamp from the SQLServer database, but I'm not getting it, here's my example: Connection connUpdate = DriverManager.getConnection(ConnectionURL); PreparedStatement atualizaDevice = connUpdate.prepareStatement("se...
asked by 09.08.2017 / 14:52
0
answers

Restoring database sql server management studio

I'm creating a development environment. I went into the production environment open the sql server management studio right click on the tasks database > do backup I came back in the development environment I opened sql server management studi...
asked by 09.08.2017 / 16:37
0
answers

PHP PDO drivers for SQL Server

I had the same problem, I performed the steps indicated, but I did not succeed in installing the SQL Server connection. Versions: PHP = 5.6.21; SO = Windows Server 2008 R2 Enterprise SP1. I have installed the following components:...
asked by 17.08.2017 / 15:35
1
answer

How to show only one result of a specific column [MSSQL]

I have the following QUERY: select id_cc_ponto_saldo_vecto, id_planta_re, tbl_cc_ponto_saldo_vecto.re, ponto_saldo_atual, convert(varchar(10),vecto_ponto,121) from tbl_cc_ponto_saldo_vecto INN...
asked by 16.08.2017 / 23:21