Questions tagged as 'sql'

1
answer

Illegal mix of collations (utf8_unicode_ci, IMPLICIT) and (utf8_spanish_ci, IMPLICIT) for operation '='

I am trying to perform an UPDATE involving two different databases using MySQL. The query I have is the following: UPDATE sm4rtuniversity.members SET chamilo_id = (SELECT cu.id FROM chamilo.user cu INNER JOIN sm4rtuniversity.members sm ON...
asked by 21.03.2018 / 20:41
1
answer

How to use a variable in the Transact SQL update function within a trigger?

What I want to achieve is to go through each column of a table and check if it has a change with the function update (colum), but apparently it takes the variable where I keep the column as a valid argument. DECLARE @field INT , @maxfie...
asked by 20.03.2018 / 18:07
1
answer

Join fields of own table in Access

I'm having a problem that brings me headlong. I have a TELEPHONE table in Access with the columns Prefix_provider and Prefix_client. I need (preferably with sets) to find Provider_Prefixes that are never Client_Prefix. Any ideas? This is what I...
asked by 06.03.2018 / 14:14
1
answer

Error in SP MYSQL

I have the following error:    #1064 - Algo está equivocado en su sintax cerca '' en la linea 6 I show code CREATE PROCEDURE spF_detalleVenta_one1(cod int) BEGIN SELECT d.CodigoVenta, d.CodigoProducto, p.Nombre, d.Cantidad, d.Des...
asked by 31.05.2018 / 02:21
1
answer

Insert data in 2 different tables

Good I need to insert data of a record of a user in 2 different ablas, the id in the table users is the primary key and in the table owners is the FK but when doing the query it does not record them register in the users table but not in the own...
asked by 13.03.2018 / 04:59
2
answers

Problem with LAST_INSERT_ID

I am trying to get the next number in a column called TARIMA , the problem is that% is not% co_ since it is apart from autoincremento general ID , try to use AI to get the next lastinsertid of the table but it do...
asked by 23.02.2018 / 10:13
1
answer

Convert varchar value to tinyint?

I have a value in a textbox (varchar) in a webform of asp .net and I need to compare it with a tinyint type value of sql. What would be the way? Thanks Greetings     
asked by 08.03.2018 / 17:29
1
answer

Query in Disorder PosgreSQL

How could I do a SQL query by inserting a string with words in any order? For example find a row that has in some column the following String: "my dog is called spike" inserting in a like something like "dog my llama spike" Let's see the foll...
asked by 27.02.2018 / 23:41
1
answer

Retrieve variable from a URL

I pass the value as follows: <td><a href="liberar.php?id='.$row["id"].'">Finalizar</a> </td> And the URL arrives in this way: 000.000.00.00/bitacora/liberar.php?id=11 id = 11 is value that I want to recover...
asked by 16.02.2018 / 00:44
1
answer

Go through a ResultSet of objects that have another object as an attribute

The problem is that I create objects of class Car that have as an attribute an object of class Motor, when going through the resulSet of the query I have printed the data I can not do it well. In the database there are saved 2...
asked by 04.04.2018 / 17:35