Questions tagged as 'sql'

2
answers

Creating two links with an Explode path

I'm developing a project and next to the form, the user can upload a file. In the case, the registration part next to the upload (s) I have already been able to do, now I am creating the view / change of the record. And that's what I'm packing....
asked by 20.09.2017 / 04:29
0
answers

Unique or something similar for 3 or more different tables

Sirs, In the company where I work, I use an ERP that I do not know why, it is done typing sales notes, return sales and purchases returns in three different forms, and the same activity could be performed on the same form , the field of nf nu...
asked by 17.09.2017 / 23:36
1
answer

Error updating given with condition

I am trying to run this update but it only updates the "value" column if the "discount" column is different from 0.00. If it is 0.00 it enters the second condition of the IF and places the value of itself in value. If it is different it does the...
asked by 17.09.2017 / 06:21
2
answers

SQL result in columns

I have an Oracle SQL query that returns records per line, and I wanted to turn this into column. I've researched and found that Pivot does this, but I'm not sure how to use it, can anyone help me? CURRENT RETURN: SELECT AFD.CODEMP AS...
asked by 19.09.2017 / 22:35
1
answer

Scheduled Backup in Azure SQL Database

I know that the backups in SQL Azure are automatic, but how can I make a configuration in them? Schedule for a particular time?     
asked by 06.10.2017 / 15:39
0
answers

Generate sql script on a given date

Good afternoon! Well, I have a great mission that is as follows. I have a script that I set up below that I need it to be executed only on the 1st of each month, respecting the two conditions that I put in the IF clause. I tried via trigger a...
asked by 06.10.2017 / 20:05
0
answers

How do I save the contents of my page in the onclick url?

Good morning, I'd like to know how I can save the contents of my page in the url with a unique id. Same as jsfiddle.net For example, when you first access it, it has the default url: jsfiddle.net, but when you click the "save" button, it gene...
asked by 24.09.2017 / 16:12
2
answers

Error "1241 - Operand should contain 1 column" trigger that checks for duplicates

I'm doing this trigger to check if dados_id and referente_obs exists in the bank table But it returns this error:    1241 - Operand should contain 1 column (s); BEGIN IF (NEW.id_dados and NEW.referente_obs) not in (...
asked by 14.09.2017 / 19:25
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
0
answers

Trigger in MYSQL to delete record when it exceeds a date

Hello, how could I create a Trigger that excludes database records that exceed the current system date?     
asked by 20.11.2017 / 20:20