Questions tagged as 'sql'

2
answers

assign radio value found in sql - Codeigniter

I want the user to load the data update page to see the data that he has entered in his record. I can see the data that is in type = text but not in type = radius. View: <?php foreach ($resultados_pesquisa as $linha) { $nome = $linha[...
asked by 14.05.2016 / 13:12
1
answer

Insert into does not return [closed]

I have the following table: QuerywithInsert    publicfunctionCadastrarArquivos($pdo,$arq_nome,$a_areaid,$u_userid){$ins=$pdo->prepare("INSERT INTO arq_arquivos(arq_nome, a_area_a_areaid, u_usuarios_u_useid) VALUES(:arq_nome, :a_areaid, :u_us...
asked by 19.03.2016 / 18:28
1
answer

I'm having trouble connecting to SQL with java

Well ... I did some classes, and it's time to connect to get a die in the bank; Okay. He had already connected with the DB, but when I did the class to fetch the data, it gets nullException, as if the database did not exist. Take out: public v...
asked by 22.03.2016 / 02:03
4
answers

Doubt on date in SQL

I'm setting up a database for a store to learn SQL. My goal is to have a movie return date. For this, I created the table with a column named "return" to store when the movie will return to the store, using the following format: create table a...
asked by 21.01.2016 / 16:30
1
answer

Bring value from a grouped record

Dear colleagues, I grabbed a query that I thought was simple but it's complicated! I have a database where I have all my NF per product incoming goods, I need to find the value of the product in the last entry of the year. I arrived easy o...
asked by 17.03.2016 / 14:19
1
answer

Conversion from Oracle to SQLServer

   Context: I currently work on a system that uses the
asked by 04.03.2016 / 18:21
1
answer

Decimal value with 5 decimal places in sql server

I am developing a (Asp.NET MVC 5.2.3.0, EF 6.1.3 e SQL Server 2012) application, the database has a table with the decimal(6, 5) field, when saving a value in this -2,56478 field, for example in the database it is -2,5600...
asked by 22.02.2016 / 21:04
1
answer

From CTE in SQL for relational algebra

How to pass a CTE in SQL to relational algebra, such as: with publicacao_cte (nome,nr_publicacoes) AS ( select candidato.nome, Count(1) as nr_publicacoes from candidato, cv, ficha_inscricao, publicacao_cv where candidato.bi = ficha...
asked by 20.11.2015 / 18:53
0
answers

Format date Mysql [closed]

I have a problem when passing a date to a select. Using the form below, select me normally returns the data: SELECT H.* FROM HORARIOS H WHERE NOT EXISTS ( SELECT * FROM RESERVAS R...
asked by 04.12.2015 / 11:52
0
answers

MySQL query on node ignoring difference condition

I have had a peculiar problem while changing my Node.JS server to certain MySQL queries. I have the following code that works normally in MySQL Workbench: SELECT id, nome FROM 'tabela' WHERE categoria <> 2; But in node-mysql the query...
asked by 12.11.2015 / 16:32