Questions tagged as 'sql'

1
answer

How to insert an image in MySQL?

I would like to add images to the table, nothing too complex. I would like to add the directory if possible This bank will not have an interface I would like to see the image by select, but I do not think that is possible. What do you...
asked by 25.05.2014 / 21:14
1
answer

Creating Trigger to change status as soon as deleting employee

I'm creating a trigger that when I delete an employee, it changes the status from 1 (active) to 0 (inactive), then save this change to a table (public employees) to access if need be, however, I'm having problems. As soon as I try to create the...
asked by 25.05.2014 / 20:00
2
answers

How do I create a function that returns the lowest expiration date between batches of a given product?

How do I create a function that returns the lowest expiration date between batches of a given product? Dry my SQL code: create database Exemplo; use Exemplo; create table produto (codProduto integer not null, nomeProduto varchar(50) not n...
asked by 26.11.2014 / 18:21
1
answer

Concatenation of Records via FOR XML PATH - SQL SERVER

Good afternoon dear, I have the following problem: I'm developing a Query where I need to check which documents have been delivered by the student, these documents that are in the pre_matricula_doc table and have the following structure:...
asked by 11.12.2018 / 19:27
0
answers

Client report in MYSQL [closed]

Good evening, gentlemen, how are you? I'm facing a problem and I'm not able to resolve it. Below is an example of the structure of my database: IneedtomakeascriptinMYSQLthatselectspeoplewhomeetthefollowingconditions:1-PESSOA_ENDERECO.UF="...
asked by 13.12.2018 / 22:08
1
answer

How to import MDB file read and write in SQL

I'm trying to import an MDB file, read this file and write to SQL. I am already able to import the file and read, I just can not even get this data and write to SQL. If you notice the code I even managed to show the data in a List. Here is...
asked by 07.02.2014 / 12:33
0
answers

How to Relate a Table with Another Table where the field to relate is an XML

I'm having a SQL Server database from a system that has been discontinued. In this database, there is a MOVIMENTACAO table and a EQUIPAMENTO table, where you would set a N:N relationship. The problem is that instead of ha...
asked by 27.11.2018 / 14:22
1
answer

Update with SET giving error

I have several UPDATE with pretty much the same code as this: UPDATE cliente SET Email = '[email protected]' WHERE idCliente = 0000; But some give this error:    Data truncation: Data too long for column 'Email' at...
asked by 10.08.2018 / 03:30
1
answer

Query returns value of another user

I'm not able to compare the code (from the logged in professional) with the contracted codigoprofessional (which must be the same as the logged in professional) in the sql query and this causes the query to return a value from another profession...
asked by 10.11.2018 / 22:05
0
answers

doubts with linq to entities

What would be the query in linq to entities: SELECT COUNT(cont) qtde_resp , pergunta , resposta FROM pesq_respostas WHERE id_pesquisa = 9 AND Tipo IN ('Intervalo', 'SimNao') GROUP BY pergunta...
asked by 06.12.2018 / 18:45