Questions tagged as 'sql'

2
answers

How can I improve the performance of the next query? ... it takes too long to get the result

When I run the following query, the results take a long time. If I execute the two queries separately, the result is returned immediately. How can I improve it? Select Carpeta, Estado from SCANAPP_JOB_SIMCE with(nolock) Where Nivel = '0M' and...
asked by 08.11.2018 / 14:26
2
answers

how to show queries of 2 tables in a single table with MySQL?

I have these tables Student 1. Id 2. Nombre 3. Apellido 4. documento --es numerico 5. Id_escuela --numerico pero enlaza a Escuela School 1. Id_escuela ---enlace 2. Nombre_escuela Here my question, I want that in a si...
asked by 15.11.2018 / 21:54
2
answers

How to execute sql statement that is stored in a string in C #

I have the following SQL string in a string to update tables from textBox. string actualizar = "update pelicula set nombre_pelicula = " + txtnombre.Text.Trim() + " , web_pelicula = " + txtweb.Text.Trim() + " , descripcion = " + txtdescripcion....
asked by 14.11.2018 / 01:01
1
answer

Send stored procedure result of the controller to the view

I need to send the result of my stored procedure from the controller to the view. This is on my controller: using (SqlConnection con = new SqlConnection("data source=DESKTOP-99IPRRD;initial catalog=RecursosHumanos;integrated security=True;M...
asked by 30.10.2018 / 00:29
1
answer

Add characters to a string in sql

I have a very simple string like the following    'kyo, 1, koko, yuyu' then I would like to add single quotes to each word to get something like    '' kyo ',' 1 ',' koko ',' yuyu '' Even if possible I would like to respect the whol...
asked by 13.09.2018 / 01:47
1
answer

Logic in MySQL Query only if 2 conditions are met

I have the following code: $query = "SELECT * FROM pedidos WHERE usuario = '$usua' AND status_pedido = 'ESPERANDO' "; $result = mysqli_query($db, $query); if ($result){ echo '<div class="alert alert-danger" role="alert"" >...
asked by 30.08.2018 / 15:17
1
answer

Show data with filter in SQL query

Cordial greeting, I am trying to show the data of an instant search table, the code works correctly, I had made the query in such a way that it looked for me in the whole table, until then everything is fine, but now I need to ask the query with...
asked by 23.04.2018 / 23:00
1
answer

SQL Numbers Rounded Decimals

In SQL for giving an example in some fields I get data like "300.38383" for giving an example and I only need the first 2 decimal places after the round point    What functions are there so that only the first 2 rounded decimals are thrown...
asked by 04.07.2018 / 04:54
2
answers

Assign a IS NOT NULL condition to a Variable?

Friends I have a query as follows WHERE bt.ProductoID= CASE WHEN @ProductoID IS NOT NULL THEN @ProductoID ELSE IS NOT NULL END AND (bt.talla= @talla AND bt.Año =@Año) The problem that I have is that I have to do a search procedure,...
asked by 27.06.2018 / 03:19
1
answer

MySQL Values of an INT

I'm doing some MySQL tasks and I have a question ... I have been testing and the maximum number that can be added is 2,147,483,647 in both ... Then my question is ... what is the point of giving it length of 2 and 6 .. I have sear...
asked by 13.04.2018 / 06:34