Questions tagged as 'sql'

2
answers

Using "If" inside triggers

I have created a trigger to collect an entered value, relate it to another table and change it. That value can be quite peculiar, so I look for it in two fields and also concatenating it: create or replace TRIGGER "INTER_AGENTE" BEFORE INSERT...
asked by 11.05.2016 / 14:19
3
answers

Insert journal in SQL Server with data from another table in another server

I have to do a SQL Server 'job' scheduled for every day at 10 in the morning. The Work would be based on dump the data of a table of a database of a server in other 2 tables (with operations of by means) in another database of another server....
asked by 11.05.2016 / 10:25
2
answers

Reservations Classrooms with different time slots

the server must be able to reserve a classroom for 30 minutes, 1 hour or 1 hour and a half. The database: describes users; 'id','int(11)','NO','PRI',NULL,'auto_increment' 'username','varchar(64)','NO','',NULL,'' 'email','varchar(64)','NO...
asked by 13.05.2016 / 21:52
2
answers

Failed to query in firebird with fdb in python 3

I try to make a query in a database using Firebird, this is my code: import fdb import os ruta = 'localhost:C:/Users/Beto/Documents/Proyectos python/Ruby/sama.fdb' try: con = fdb.connect( dsn = ruta, user = 'sysdba', password...
asked by 09.05.2016 / 05:36
3
answers

How can I group by day and transpose output of a query in postgresql

I have a problem, I have tried to create a query that adds up the total values of a sensor grouped by day. I have tried a thousand ways and I can not, someone can help me? A small example of the data I have: Day value cod_sensor hour 06/12...
asked by 16.06.2016 / 05:45
1
answer

sql server subqueries 2016

It is necessary to know the name of the students whose average grade of programming of the second year is higher than that of the program. Here I enclose my query: select nombre from alumno innner join matricula on (alumno.#a=matricula.#a...
asked by 14.06.2016 / 19:22
0
answers

Overflow of SqlDateTime. It must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM

Good morning: I am using c # with crystal report I am doing a report with date parameters, the question when I execute the stored procedure in c # I get the error already mentioned in the title , I would like to know what my error would be....
asked by 31.12.2018 / 02:11
1
answer

Perform a left join and assign the value of a column conditioned by a field

Good afternoon, I have 2 tables and I'm doing left join of T1 with T2 to extract the client code. The problem is that there are 2 client codes for the same (RUC) in some cases (this because of the client's condition, which i...
asked by 04.04.2017 / 19:14
0
answers

Add column in an MDX for SSRS

I need this MDX query, add a column with Provincial values. select non empty STRTOSET(@Organizacion,CONSTRAINED) on rows, --Parametro para SSRS { [Measures].[Adeuda Informar] } on columns FROM [Modelo] This would be the result I nee...
asked by 17.12.2018 / 18:05
1
answer

Nest several tables to show records with the most recent date

I have a question with a query, I need to make a query that shows me the most recent date of the registration of a price of a product that has a record of several prices with different dates, I just want to obtain the most recent date for each p...
asked by 20.12.2018 / 19:08