Questions tagged as 'sql-server'

1
answer

Saving data in hexadecimal in the database

I need to register a document or image in hexadecimal format in the database and then retrieve this data by converting it back to the correct format.     
asked by 03.10.2014 / 15:50
1
answer

How to convert 39 hours to type 'TIME'

To accomplish a certain task, I count the amount of time I spend on the task in my system. Today I came across the following: Data Inicial: 17/12/2018 16:49:14 Data Final: 19/12/2018 08:02:58 totalizando: 2362,29 minutos. Converto para d...
asked by 19.12.2018 / 11:43
1
answer

When firing an Update Trigger, one of the fields only refreshes after a second Update

I created a trigger to report the fine on the return delay of rented movies, however, when triggering the trigger once (giving an UPDATE), the "MultaTotal" field does not update (only it). But when the trigger is triggered a second time, the fie...
asked by 09.12.2018 / 16:27
4
answers

How to create mirrored temporary table in another

Is it possible to create a temporary table that is mirrored in another? Example: Let's say I have in my bank a table with 60 fields. I would like to create a temp named #tabela with the same structure as the table in the database, but wit...
asked by 19.04.2017 / 14:04
3
answers

Show table comments

Good morning guys, I would like to know if it is possible to list all the comments in my "table" in SQL-SERVER, not column comments, but only the "tables"     
asked by 07.08.2018 / 14:41
2
answers

SQL Server - CONCAT + IF in VIEW

I have a problem and I will try to explain the situation. I have a client table called ENTIDADES , in it there is an attribute called ID_GRUPOECONOMICO where this is a FK of the GRUPOECONOMICO table. I am creating a...
asked by 07.08.2018 / 22:57
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
1
answer

Temporary table with underscore

I'm trying on my service to create temporary tables as I've always learned by putting # in front of the name I want. But I do not know what happens when I create one, it puts a huge underscore and some random stuff after the name. For exa...
asked by 27.06.2018 / 03:07
2
answers

UPSERT or UPDATE-INSERT?

Through this question I felt the need to research and understand a little about the UPSERT . I was wondering what a blessed command this is? I never saw .. I found some information but it is still not clear to me because there is no "basi...
asked by 23.08.2018 / 13:16
3
answers

Delete repeated records in PHP

Good morning, I'm here with a pretty big question. I've been in this for a whole day and I still have not been able to resolve the situation. I have a database in sql server and I need to display a buttons with the records of the description of...
asked by 22.02.2018 / 12:15