Questions tagged as 'sql'

1
answer

SQL query does not work when there are accents

I have in my database a category defined as TERRENO / ÁREAS that when doing the following SQL query does not return any results from the existing 18.    SELECT * FROM property WHERE 1 = 1 AND CATEGORY IN ('LAND / AREAS') This query alre...
asked by 06.10.2014 / 23:08
2
answers

Error in PROCEDURE [closed]

I'm new to creating PROCEDURE. I'm trying to create this PROCEDURE plus this error. DELIMITER // DROP PROCEDURE IF EXISTS 'P_lgs'; CREATE PROCEDURE 'P_lgs' ( idcod INT, dt VARCHAR(20), ip VARCHAR(20), msg VARCHAR(250), mail VARCHAR(250) ) BE...
asked by 15.06.2015 / 14:00
1
answer

Trigger for a Select

I would like to know if it is possible to execute a Trigger when a SELECT is performed in a certain table, for example: CREATE TABLE IF NOT EXISTS "Conversa" ( "idConversa" SERIAL NOT NULL, "idEmissorConversa" INT NOT NULL, "idReceptorCo...
asked by 11.10.2014 / 15:59
1
answer

how to add Media in the Wordpress Library programmatically?

Consider the situation where hundreds of .jpg files are already available in the wp-content/uploads/2014/09 directory by default and need them to appear in the Media Library ( link ) of the WordPress site. Is there any SQL scrip...
asked by 22.09.2014 / 15:18
2
answers

User Verification

I have a program that has 5 níveis de autorização , Administrador , Gerente , Operador , Usuário , and Convidado .   But for each level it gives a different access to the system. verification sketch: &l...
asked by 26.05.2014 / 16:25
1
answer

How to obtain via IN the records found and not found

I have a simple command SELECT MATRICULA FROM ALUNOS WHERE ID_ALUNO IN (1,2,3,4,5,6) I would like to know how to get a result like this in SQL: ID | STUDENT 1 | LUIZ 2 | MARIA 3 | 4 | JOHN 5 | CARLOS 6 | That is, bri...
asked by 07.11.2014 / 13:43
1
answer

C # Do select and display in a combobox

I'm creating an application in C # windows form and wanted to know how to do a select from a table and displayed a list of clients in a combobox.     
asked by 10.05.2014 / 15:33
2
answers

Paging Results in SQL Server 2000

I sometimes need to query SQL Server 2000 and paginate the results however there is only the TOP clause that limits the number of records returned without an offset. Other banks like MySQL or PostgreSQL have this and query would look like...
asked by 21.03.2014 / 14:29
2
answers

update in 2 tables with calculation and field update keeping the previous one

I am trying to do an update by taking the value of another table, but the data in the second table is not sent. By passing the ID of the card: <a href=index.php?pag=shopcomprar&id={$row['ID']} '>[COMPRAR]</a> And trying...
asked by 18.03.2014 / 18:23
1
answer

Update if the value does not exist

I have these two tables in the database (SQL Server) Banking Table ID CODIGO NOME 1 246 Banco ABC Brasil S.A. 2 075 Banco ABN AMRO S.A. 3 025 Banco Alfa S.A....
asked by 22.04.2014 / 16:17