Questions tagged as 'sql'

1
answer

How to divide or separate a query? [closed]

I create a Virtual table (Fictional) SELECT TOP 1 ItemID INTO #Temp FROM PS_GameData.dbo.CharItems WHERE ItemID = 1001 INSERT INTO #temp VALUES((SELECT ItemID FROM #Temp)); SELECT ItemID FROM #Temp DROP Table #Temp How do I separate this qu...
asked by 09.02.2017 / 12:56
1
answer

can you help me generate a TRIGGER in BD ORACLE?

I have many doubts when creating TRIGGERS I have a table called delegations where I have the columns advance 1, advance 2 and advance 3 the only thing that I want that TRIGGER to do is that I register in another table "audit" the user that makes...
asked by 09.02.2017 / 17:18
2
answers

MySql nested query

I have to consult 4 tables of a database in mysql From 3 tables I need to take all the information with a where Of the fourth only take the last record that was entered in the column. I have the following code SELECT convenio.nit_Fuent...
asked by 12.08.2016 / 02:21
1
answer

Create a join with the results of stored procedures

Hello, I have two queries to return the result of two stored procedures DECLARE @return_value int EXEC @return_value = [dbo].[SP_TABLE_PRODUCTOS_ALMACEN] SELECT 'Return Value' = @return_value DECLARE @return_value1 int EXEC @return_value1...
asked by 08.03.2018 / 17:19
1
answer

COUNT in postgresql

In the example shown on the following link link , what should the query we do be like so that the result have 2 columns, the first being the 21 countries and the second being the number of clients in each country? Thank you very much in adva...
asked by 17.10.2018 / 11:37
1
answer

PostgreSQL porblema con clusters man pg_createcluster

I have a problem when starting the debian server on which throws me an alert by starting. No PostgresSQL clusters exist: see "man pg_createcluster" .. (warning)     
asked by 27.07.2018 / 18:49
1
answer

Doubt when creating a SELECT * FROM people from java [closed]

public void mostrar_personas() throws SQLException{ Connection co = null; PreparedStatement preparedStatement = null; String consulta = "SELECT * " + "FROM personas"; try {...
asked by 28.06.2017 / 14:34
1
answer

Concatenate Wheres in a Stored Procedures

Could you help me create a query through a Stored Procedure? to select Sales with: pClient (only when it is not null) pProduct (only when it is not null) pSeller (only when it is not null) List of Sales (p From, PHase, Customer,...
asked by 18.04.2018 / 17:56
1
answer

Call to a member function rowCount () on boolean-Php

Good friends, I am new here and I hope to ask this question well I'm trying to do a login based on roles, I have the roles in a separate table so I bring them using inner join in the query I just want you to enter by mail and password this is th...
asked by 15.06.2018 / 08:23
2
answers

SQL query to show customer and total products and costs

Indicate Sql query where you get the following columns total purchases, grouped by customer and totalized for the following Tables: Data: Tabla CLIENTE CAMPO TIPO --------------------------- DNI Char(10) Nomb...
asked by 19.06.2018 / 02:49