Questions tagged as 'sql'

1
answer

Problem with joins among database students subjects

I am studying the types of joins and doing exercises, I can do the inner joins without problems, but I have difficulty with the other variants such as the left join, in my example I have created a small and simple database. Data entered...
asked by 13.07.2016 / 05:03
3
answers

How to solve this MySQL query

List the name of the clients who have traveled in all the cars. I have 4 tables, auto, driver, client and trip, the only one with foreing key is trip that acquires the driver, client and travel primary That's how I did it but it's bad...
asked by 15.07.2018 / 23:43
1
answer

Commit tran in SQL

I have doubts that my SP is correct since I do not know if it should be used only once begin try and those instructions, apart it returns a 1 but does not do update : ALTER PROCEDURE [dbo].[SP_EliminarVariableFormula] @IdVaria...
asked by 21.05.2018 / 21:14
2
answers

How do I assign the select permission to a role in SQL SERVER?

I have the following activity and my code marks me wrong, can anyone tell me what I did wrong? --8.-Asignar el permiso Select a este rol grant select on database Prueba to role 'GranSelectRole'; Mark me an error in the "to" saying this:...
asked by 20.09.2018 / 05:57
1
answer

How to avoid having holidays

Hello, I have an application so that a user can take vacation days. I have a function that does not tell me neither weekend nor holidays. For example in Andalusia on March 29 is a holiday, if a user takes a vacation from March 28 to April 2, it...
asked by 23.03.2018 / 08:16
4
answers

Problem when relating 4 tables with left join

I have a problem with SQL. I want to make the list of 4 tables (user, appuserFuncitonRelation, organizations, GroupCommerce) where the organization is related to groupCOmmerce and appuserFunctionRelation is related to both and the other has the...
asked by 27.03.2018 / 14:23
1
answer

Comparison in several SQL tables

I need to perform a query in SQL validating the following: I have a parent table that is called elemento and has a field tipoelemento , and two child tables equipo_computo and equipo red , with the fields tipoequi...
asked by 27.12.2017 / 16:28
1
answer

How to pass DataGridView to Crystal Report?

I have a GridView in asp.net and I need to click on a print button to generate a report crystal reports with the data of GridView . So I have filled my GridView SqlConnection con = new SqlConnection(ConfigurationManager....
asked by 15.03.2018 / 17:16
1
answer

How to group a repeating record, showing all the different records associated with it?

In MySQL I have the following three tables: |Personas | ------------------- |dni_persona int | 1 |nombre_persona | Juan |Empresas | ------------------- |dni_empresa | 12345 54321 |nombre_empresa | cocaloca pipse...
asked by 25.08.2017 / 00:38
1
answer

Improve the results of a select with LIKE

If I make a query of the type: SELECT nombre FROM tabla WHERE nombre LIKE '%foo%' How could you sort / filter the result so that, for example, the results that most match " foo " are displayed first? For example, if you had: " f...
asked by 23.08.2017 / 00:14