Questions tagged as 'sql'

1
answer

SQL Server 2012 Query - Query

I'm having a hard time. In the query below, you're bringing it that way. Tarefa_Inclusao Tarefa 167909 167920 SELECT TarIDInclusao [Tarefa_Inclusao],tarid [Tarefa] FROM Tarefa WHERE TarID = 167920. In this query is a...
asked by 26.09.2017 / 16:02
1
answer

Syntax error: missing semicolon [closed]

The error message Syntax error: missing semicolon is appearing in my END IF, more specifically only the IF gets underlined with red: DELIMITER $ CREATE PROCEDURE cadastraEleitor(IN nome VARCHAR(100),dataNasc DATE) BEGIN IF ( (SELECT (year(...
asked by 03.09.2017 / 19:30
1
answer

Equivalent to sql function LEFT () in JPA

What is the equivalent function of LEFT () in JPA? I need to get only the first 6 characters of a field. The equivalent select in sql would be: select left(campo,6), count(*) qtd from tabela group by left(campo,6)     
asked by 11.08.2017 / 22:25
1
answer

Entity Framework vs SQL Injection (security?)

Hello! I'm a newbie in development so I'm sorry if the question is silly. If it is thank you link's with references so I can better inform myself. As much as I understand the concept and the use of SQL injection I can not have enough malice t...
asked by 11.09.2017 / 15:52
1
answer

Two tables returning a single result

select cliente.codcliente, cliente.dt_cadastro from cliente where cliente.codcliente in ('00000224', '00000170', '00061825', '01009838') order by cliente.codcliente selectnfsaidc.codcliente,nfsaidc.numnf,nfsaidc.dt_emissao,nfs...
asked by 20.10.2017 / 18:39
1
answer

Doubt in exercise query on sql

I have the following relationships: The statement of the exercise is: What is the average grade of teachers assigned by course discipline Geography in the first semester of 2013. Present the name of the teacher, discipline and the av...
asked by 20.10.2017 / 17:10
1
answer

Error making an insert in sql server with c # [closed]

I'm trying to make an insert into a table and I'm getting an error message. Error Image: Code:privatevoidetqmanual(){conex.Open();SqlCommandcomando;StringBuilderQuery=newStringBuilder();Query.Append(" SELECT...
asked by 03.08.2017 / 14:01
1
answer

Execute script file directly in PLSQL

I have arquivo.sql , which has thousands of lines of scripts, containing, creations, changes, etc. I need to run this file directly in PLSQL in SQL Window , and not can be via Command Window . Via Command Window ,...
asked by 19.07.2017 / 16:31
2
answers

Update table according to column quantity

The registration table was not modeled correctly, however I need to do an UPDATE per SQL to perform this import, following example: See that the children of Bomi Bulsara, need to be in [dependent_name1] and the other in [dependent_name2], I k...
asked by 24.07.2017 / 15:11
2
answers

Auto-Complete with the bank's values in text-type input

Good evening, I need a code that when typing in the input the user will see suggestions below that should be the values pulled from the bank. <input type="text" id="pesquisa" name="pesquisa">     
asked by 27.07.2017 / 03:22