Questions tagged as 'sql'

1
answer

can you help me with this sql exercise?

Increase the price by 10% of products whose value is less than 100,000 create table producto( cod_producto int primary key, desc_producto varchar(20), precio_producto int ); insert into producto values (100,'Televisor Led',198000); ins...
asked by 15.11.2017 / 23:01
0
answers

perform update if a Query generates an error in the stored procedure

I have the following stored procedure that executes several queries to different tables CREATE PROCEDURE "informix".pr_ventasVsSaldos () This is executed for client database which handle a lot of data. Sometimes because of the volume of dat...
asked by 14.09.2017 / 12:43
0
answers

"Same" consultations, different results

There are hidden data to be sensitive. I've been thinking about it for a few hours now. I have a stored procedure for navigation (in development) and another for printing a Grid. What is my problem ?! That gives me different results !...
asked by 14.09.2017 / 07:40
2
answers

Consult sql with 4 dates and verify that the dates do not cross?

I have a table with these fields We want to bring the id's of cars that are available in a range of dates that I receive from two inputs that would be when they want to take the car and when they want to return it. This dates I compare wit...
asked by 08.09.2017 / 17:25
3
answers

Trigger Oracle with sysdate

I have a trigger in a simple database, what I want that trigger to do is generate an id with characters and numbers, but it does not work. I hope you can help me, I thank you very much.     
asked by 26.09.2017 / 01:11
1
answer

SQL Server - Insert record block to a table with data from other tables

Good morning, I hope you can help me since I am just beginning to apply in what is SQL Server, I am working in a system of worksheet and I wanted to know how to insert in a table (Template.dbf) some data of the table (worker.dbf) plus some other...
asked by 01.09.2017 / 15:44
1
answer

character set mismatch COALESCE

Hi, I have a problem with this query, it tells me the error ORA-00932: inconsistent datatypes: expected NCHAR got NUMBER 00932. 00000 - "inconsistent datatypes: expected %s got %s" *Cause: *Action: Error en la línea: 54, columna: 43 I...
asked by 03.09.2017 / 01:20
0
answers

Efficient SQL query

I have a table called numbers, in this series are phone numbers for example 5255, 'Mexico CDMX' 5233, 'Mexico Guadalajara' 5281, 'Mexico Monterrey' I have an sp that receives a complete number example 525578547854, the sp should tell me tha...
asked by 25.09.2017 / 17:13
1
answer

sql query from vb6 to oracle

I need to insert an insert from VB6 to an Oracle database, I changed the procedure, according to the help they already gave me, respecting the Oracle syntax. but now I get Now I get the error "invalid column name", could you help me with some id...
asked by 30.08.2017 / 12:49
0
answers

It is possible to calculate the average in the availability column

I would like to know if it is possible to add the availability and divide it by the number of teams to obtain the average of availability (Availability) The Query is as follows: DECLARE @StartDate DateTime DECLARE @EndDate DateTime SET @Sta...
asked by 29.08.2017 / 20:08