Questions tagged as 'sql'

1
answer

Insert multiple records into MySQL using NODEJS

How do I add multiple records at once in MySQL by passing an array of, for example, products? HTTP-POST request, where products is an array with an x number of products. FRONT-END addProduct(products: any): Observable<any> { ret...
asked by 04.12.2018 / 16:51
0
answers

Problem in code - SQL Developer

The following tables have an error: CREATE TABLE REQ_ROB_EQP ( REQ_PER_ROB_ID NUMBER, REQ_EQU_NOME VARCHAR(100), CONSTRAINT REQ_ID_NOME_PK PRIMARY KEY (REQ_PER_ROB_ID, REQ_EQU_NOME) --CONSTRAINT REQ_PER_ROB_ID_FK FOREIGN K...
asked by 03.12.2018 / 11:34
0
answers

Convert RTF to String through SQL?

Well, I have a small problem, I was asked to convert a text made from a RichTextBox (VB 6) to a normal string, but this RichTextBox also works for Chinese characters and is here that the problem exists. I'm already in 2 days, I could not do t...
asked by 07.12.2018 / 11:33
1
answer

Doubt with foreign key

To register the games of a football league the following tables have been defined: Time ( id int primary key, nome char(20), pontos int, nroVitorias, golsMarcados int, golsSofridos int ) Jogo ( idTime1 int,...
asked by 30.11.2018 / 19:48
0
answers

Add data from a sale in the table (PHP)

People,Ineedurgenthelp.IhaveajobtodeliverMondayanditonlylacksthatpartofsalesrecord.Itworkslikethis:Ihaveastockcontrolsystemandsales,whereIregistertheproductsandmakethesales.TheotherpartsarereadythoughI'mbreakingheadonthatpartofrecordingthesales...
asked by 30.11.2018 / 21:45
0
answers

How to sum the first 2 occurrences of a column using a key as a reference in SQLServer

Hello, I have the following table: create table events ( type int not null, value int not null, time datetime unique(type, time) ); Where in the same I have the following records: ------------------------------------------...
asked by 29.11.2018 / 20:13
0
answers

Date field with default value in the database

When I create a DataTimeField type field in Django, it has already been defined so that it contains the current date in this way: dt = models.DateTimeField(auto_now_add=True) or dt = models.DataTimeField(auto_now=True) But that way the...
asked by 04.12.2018 / 18:10
2
answers

How to print the result of a SELECT (php / sql) in a specific place in the HTML page?

Greetings, I have a database with a table of purchase requisitions. In my html there is a panel where the number of purchase requisitions registered will be displayed. I was able to SELECT right and print the results on a blank page. Bu...
asked by 05.12.2018 / 15:19
0
answers

Difficulty in doing Foreign key with two char fields in Mysql

I am not able to create a foreign key between two tables, whose type is CHAR : ALTER TABLE hardware ADD CONSTRAINT fk_INC_LOCALIDADE FOREIGN KEY ( INC_LOCALIDADE ) REFERENCES localidade (INC); The error is:    ALTER TABLE hardware...
asked by 11.12.2018 / 12:05
0
answers

SQL trigger Updates Stock

PRODUCT LIST create table LISTA_DE_PRODUTOS ( IDPRODUTO numeric identity, PRECO money null, DESIGNACAO varchar(50) null, ALCOOLICO bit...
asked by 11.12.2018 / 02:01