Questions tagged as 'sql'

1
answer

Add value of a SET list in MySQL

I want to add values in a 'list' (values separated by ',' which will then be used the 'split' function) in mysql, I am using this code: UPDATE clans SET Admins = concat(Admins, ',', 'NomeDoJogador') WHERE Name = 'NomeDoClan' , but when I a...
asked by 17.01.2017 / 06:11
0
answers

Doubt in Binary Tree Mysql [duplicate]

Considering the tree below, I have a question. A B c D E F G H I J K So, I was wondering if there is any way to do a SELECT, where I bring all the IDS that are to the left of A. Be...
asked by 29.12.2016 / 12:08
1
answer

SQL - Select with possible concatenation

I created a query that concatenates my results. It is a table with names and which range (square) they are sorted. The table is named prompt_name and the fields are name and square : Select Main.Quadrado, Left(Main.Nome,Len(Main.Nome)-...
asked by 23.01.2017 / 18:12
1
answer

Return result of a select that is inside a loop

I'm trying for a few hours to get the result of a select that is inside a function in pgsql. I do not have much experience with sql. I researched a little but did not get much success. Here's my function for review: create or replace funct...
asked by 23.01.2017 / 14:03
0
answers

Streamline SQL Query with DataTables

The query below returns a DataTables with approximately 400 items in the Mysql database. The difficulty is to return these values more quickly. It currently takes an average of 70 seconds to display the list completely. It's a low...
asked by 08.12.2016 / 05:25
2
answers

Null value displaying zero MS Access

I need to set a field in Access to Null, through SQL, but after setting this field, it gets the value Zero and not Null. Due to a business rule, I need this field to be NULL and not Zero. The field is numeric.     
asked by 06.12.2016 / 20:35
0
answers

DATASTAGE ODBC query get current_timestamp

I'm doing a job in datastage and when I insert the exact ODBC query from the current timestamp, it always passes me to null when writing to the table. I have already used CURRENT_TIMESTAMP , (CURRENT_TIMESTAMP) , '#CURRENT_TIMESTA...
asked by 30.11.2016 / 10:30
1
answer

Problem with ComboBox - SystemDataRowView

I have a problem. My software has a order registration screen and there are some Combo Boxes that pull certain information according to what is selected in the Product field (Cake, Candy or Cupcake). They are 3 combobox: Cover, Type and Filling....
asked by 18.11.2016 / 12:07
0
answers

I have a very extensive query when I try to insert in the database it does not work, I do not know why

$result = $db->query(" SELECT RES.morada, RES.espaco, SUM(DATEDIFF(RES.data_fim, RES.data_inicio)*RES.tarifa) AS pago FROM ( SELECT A.morada AS morada, A.codigo AS espaco, A.data_inicio, O.da...
asked by 01.12.2016 / 22:38
0
answers

Trigger mysql - error?

Hello, this is the first time I'm using triggers and I do not know how to solve a bug I'm having and a problem I do not know how to do. I want to make a trigger for when an inserted date (start and end date) is superimposed between a date tha...
asked by 01.12.2016 / 22:01