Questions tagged as 'sql-server'

1
answer

Doubt with date and time in sql server

I have a field in the bank of type "char", I am returning the dates this way: select CONVERT(VARCHAR(20),HORA_FECHAMENTO) as HORA_FECHAMENTO, CONVERT(VARCHAR(20), DATEADD(hour, +0, getdate()), 120) as HORA_ATUAL from TB_ESTRACAO wh...
asked by 28.01.2017 / 04:14
3
answers

SQL script to create mascara

I have a database of a client that has some unmasked data for use on my system which is the NCM ; The same has 8 digits (eg 0000.00.00), but the same in my system is unmasked "00000000" I need to simply put the points 4.2,2 but I am not...
asked by 28.12.2016 / 18:06
4
answers

How to write a store procedure that uses values from the current and previous row?

I have the following table, # id # dataTmp # referencia #nProduz#nStock # id2 #necessi# # 115237 # 31-01-2017 # VL03280103 # 0 # 0 # 6 # 0 # # 115238 # 01-02-2017 # VL03280103 #...
asked by 30.01.2017 / 15:26
0
answers

Error 500 php SQL Server

I tried to make a code in PHP and I'm having difficulties with the SQL Server query, now I tried to do a query in another way and gave 500 error in PHP what can it be? My page code: <?php $servidor = 'VINIPC\SQLEXPRESS'; $db = 'D...
asked by 12.12.2016 / 21:14
0
answers

Create a PHP query to insert into the table

Hello, how can I create a query in php that clicks the insert button in the table? My code: <?php $error = null; $sucses = null; if(isset($_POST['Promo'])) { $AwardID = $_POST['AwardID']; $ActiveID = $_POST['ActiveI...
asked by 12.12.2016 / 20:18
0
answers

Fulltextsearch in SQL Server

Hello! Is that okay? I need to query the fulltextsearch because it needs to be indexed. However, I am not able to set up a query that returns all possibilities, as if it were a like . The query I was able to mount is as follow...
asked by 17.01.2017 / 19:31
1
answer

TRIGGER and ASSERTION sql server

I'd like to know how TRIGGERS and ASSERTIONS work I'm a beginner and I have no idea where to start?     
asked by 07.12.2016 / 21:58
1
answer

I can not register dates

I have a Form with two dates, however, when I register them I get the following error:    String was not recognized as a valid DateTime. What can it be? This application is made in four layers: The modelos layer is where the...
asked by 09.12.2016 / 23:45
1
answer

Problems with asp, retrieval of value returned from a stored procedure

Good afternoon, I'm having trouble retrieving a value returned in a stored procedure. The database is sql server. The procedure executes an insert and returns the id of this data, however I can not retrieve the id value in asp. <% sql...
asked by 07.12.2016 / 20:37
0
answers

Interrogation in place of C # accent and SQL Server

Good afternoon guys, I have an application in C # with SQL Server database, the problem is that words that have accented letters, instead of those letters appear lozenges with a question mark in the middle as in the image below, when I enter and...
asked by 14.12.2016 / 21:10