Questions tagged as 'query'

0
answers

Merge parent-child tables in postgresql

I hope you can help me with this. I have 3 tables: vehicle (father), car (son), motorcycle (son) with the following fields. Vehículo(id,marca,anio,precio) Carro(nro_puertas integer) (Heredada de vehículo) Moto(incluye_access boolean) (Heredada...
asked by 16.03.2018 / 07:08
0
answers

Return null data from a subquery

I am working with MySQL making a list of top 100 keywords associated with scientific articles. The subquery basically provides the top 100 keywords along with the number of times that appear globally . Now, what I want is to filter by countr...
asked by 10.03.2018 / 17:47
1
answer

because the error failed because of: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token?

I have the following query in oracle select NDATETIME, Case NREADERIDN WHEN 52730 THEN 'INDEPENDENCIA' WHEN 52731 THEN 'INDEPENDENCIA' WHEN 52734 THEN 'TRIANGULAR' WHEN 52735 THEN 'TRIANGULAR' WHEN 52737 THEN 'INDEPENDENCIA...
asked by 12.03.2018 / 23:45
2
answers

How to select an inner join with multiple rows?

I have a Query with which I try to bring several values with a single inner join, but the question is that it brings me the different values as rows, therefore I repeat data, what I want is to make a selection of each value that bring the inner...
asked by 15.02.2018 / 17:43
1
answer

Replace Mysql does not work

When I try to replace all records in a field, it indicates a syntax error which I do not understand, this is the query. UPDATE tabla SET campo=REPLACE(campo,'\.',''); And I get two alerts 1 - A new declaration was found but there is n...
asked by 14.02.2018 / 15:04
2
answers

How do I make an accountant come out as an object in my json?

This is my driver that I call it from a class called demand that I want to get the states counter for its id @SuppressWarnings({ "rawtypes", "unchecked" }) @CrossOrigin("http://localhost:8080") @RequestMapping(value = "counte...
asked by 02.02.2018 / 21:41
1
answer

Add SQL rows

Hi, I have the following problem, I want to add rows of the following query: SELECT AreaName,CASE WHEN datename(WEEKDAY,DateOpen)= 'Sunday' THEN DATEPART(MINUTE, CONVERT(Datetime,MTTA)) END Domingo, CASE WHEN datename(WEEKDAY...
asked by 26.01.2018 / 17:54
0
answers

Error creating FK on MySql

I get that error when creating an FK, this KEY already existed and it was deleted when updating the table and when trying to create it, it throws me that error.     
asked by 18.01.2018 / 16:33
0
answers

Problem when grouping data in query

I have 3 tables: "Clients" with id, client_code, c_id (client's CRM code), name, and cif. "Machines", with the fields id, id_maq (CRM code), install_date, duration, tariff_id, serial_num, customer_code, customer_id (crm code), cost_id and...
asked by 11.01.2018 / 20:07
0
answers

Change value 0 to 1 in sql using checkbox in php

I have a form with a checkbox and fields of an sql query like this: checkbox - registry data The checkbox must be checked or not depending on the value it has in the database. It is a tinyint field that I have put a conditional on loading...
asked by 27.12.2017 / 20:26