Questions tagged as 'sql'

1
answer

How do I check if my record in one column (FK) is present in other tables?

I want to delete a record, but sometimes oracle complains: SQL error: ORA-02292: integrity constraint (SGR20_HOMOLOG.TB_CONFIGURACAO_EXERCICIO_T436) violated - child record found 02292. 00000 - "integrity constraint (% s.% S) violated - chil...
asked by 11.03.2014 / 20:36
0
answers

How to allow duplicate value of a key in SQL?

I need the Process_Number and RecipeNumber keys to be able to receive values that already exist in the table. for example: Id = 1, Numero_Processo = 1, Numero_Revisao = 1 Id = 2, Numero_Processo = 1, Numero_Revisao = 2 Id = 2, Numero_Proce...
asked by 19.06.2018 / 17:02
4
answers

The WHERE clause order interferes with performance?

Recently I did tests on a database with a query using two clauses where AND. I noticed that there was a significant difference using clause A before B and vice versa. Intuitively, it would be faster to use FIRST the more restrictive criterion...
asked by 22.12.2014 / 19:01
0
answers

Problems in Sql using Google Api

Before asking this question I looked here and did not find the same problem. I use the Google Spreadsheet as my Database and use the sheetrock + sql library to access the spreadsheet. I can return the data but something happens in particular....
asked by 06.06.2018 / 16:00
0
answers

Get Directory and number in a string in an irregular expression

I have a table that has all the address in a single column, but it is irregular. Here are some of the following: BR 459 KM 153 RODOVIA ITAJUBA MF KM 05 Rodovia MG353 2Km 55 RUA 37 QUADRA 4 LOJA 611 E 1621 Rua 13 de Maio 71C RUA 106 Nº07 RUA...
asked by 14.05.2018 / 20:25
1
answer

Problems with SQL and cursor

I do not understand why but my SQL code is giving error in the FETCH line, namely: 'FETCH NEXT FROM c_cursor INTO @idC, @LIT, @LST, @LST, @LIT;' , and I do not understand the reason for this error. I'm trying to make a cursor to go through the (...
asked by 02.06.2018 / 19:10
2
answers

Query with Left Join without returning duplicate value

I have the table tableA and tableB . I'm making a select of all fields from both tables by joining them together with left Join select * from tableA left join tableB on tableA.id = tableB.id But the relationship is...
asked by 18.10.2018 / 22:05
1
answer

Error using ISDATE in CASE WHEN

Hello everyone. I'm running the query below and it is displaying the error: "Operand type clash: int is incompatible with date". My intent when performing this query is to validate if the ORIGINAL_ORIGINAL field is a valid date, and if so, va...
asked by 22.10.2018 / 21:40
1
answer

Query to get errors and hits from a student

I would like a query to get errors and hits from a particular student from the following table below:     
asked by 15.05.2018 / 22:15
1
answer

Form Ajax and PHP open dynamic list with SQL query

Friends, good afternoon! I need to edit a form that was already ready, including some new options. I do not know much about PHP, and I'm having a hard time getting the form's combobox to return a SQL query. This form was developed with PHP...
asked by 03.09.2018 / 19:28