Questions tagged as 'sql'

1
answer

SQL SERVER. Boolean field of an alphabetically ordered list

I have a table of people with various fields such as country, city, name, years ... What I already have is a query that, from each country and each city, brings out all the people who live there, arranged alphabetically. So now what I want is...
asked by 13.02.2018 / 18:23
1
answer

Revoke a specific query in PostgreSQL

Well the question is this, A User may indicate in a query the name of the patients who DO NOT have an associated card, but another user will not be able to make THIS query. Can you revoke that permission? because the easiest thing would be...
asked by 10.04.2016 / 06:49
3
answers

ORACLE - Insert from a Select

someone helps me solve a problem I have (beats me that is layer 8 :)), well look, if I do this sql works normal: insert into USR_SISTEMAS VALUES ('16469', '2','3') but if the data I want to bring a select as: insert into USR_SISTEMAS (SIS...
asked by 17.03.2017 / 00:45
3
answers

Error in MySQL query

When I try to run, the next query does not throw anything at me. someone could advise me, thanks. SELECT * FROM bd.tabla WHERE interv='15seg' IF(interv='15seg' AND fecha_hora='2016-08-02 00:00:00' AND fecha_hora >= '2016-08-1...
asked by 18.08.2016 / 22:29
1
answer

Cast Error of a Query in Spring

PROBLEM WHEN MAKING THE CASE OF A QUERY OF SQL TO A MAPEED TABLE, TO BE ABLE TO SHOW THE RESULT OF MY CONSULTATION IN A TABLE IN FRONT END. @Transactional("txsManagerSHOP") @RequestMapping(value = "getShopTable", method = RequestMeth...
asked by 08.05.2017 / 15:55
1
answer

Create an array in PL / SQL of MySQL

I am trying to create an array in MySQL as it is done in Oracle for a procedure ( procedure ), but I can not get it. With this code I am trying: # .... Código .... # DECLARE type array_letras IS VARRAY(6) OF VARCHAR(1); letra array...
asked by 23.04.2016 / 17:52
3
answers

Query two records in the same SQL Server table

I would like you to resolve this doubt. I want to make a query of a user table, but I want to do it so that I can display two results, since I want to compare the information of two users. When I make a normal query it would be like this:...
asked by 05.07.2017 / 23:43
1
answer

Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean given

I have a problem with the following code to print the contents of a database: $k = $_POST['key']; $consulta = 'SELECT * FROM ltr WHERE letter_key= $k'; $ejecutar= $conexion->query($consulta); while ($row = mysqli_fetch_assoc($ejecutar)) {...
asked by 01.08.2017 / 13:47
3
answers

how to start Primary key from a predetermined number?

Greetings, I'm in the installation of my degree project, it's a web system it should be installed in the cloud, but as the institution for which the project is carried out does not have an internet service and has several offices scattered throu...
asked by 14.09.2017 / 13:54
2
answers

QUERY SQL - Separate String

I am working with some queries and the need has arisen to have to stay with only a part of a field, that is, I have a field that has a final extension similar to this 13123243534.Consumo and at the same time other values in that Same fiel...
asked by 09.08.2017 / 14:52