Questions tagged as 'sql'

2
answers

Insert Error in a Linked Server

I have the following problem, I am running a script that makes an export of a SQL Server 2012 server to another SQL Server that is tied by a Linked Server, the script is as follows: INSERT INTO [192.168.10.82].[INTERFAZ_IQWARE].[dbo].[T_FACTUR...
asked by 03.05.2018 / 18:12
1
answer

SQL Server sum and distinct - Add once with repeated records

I have this table of expenses and I need to add the Total column. The problem is that the table takes into account the products, and when making the sum I added several times the total of a note (because in the same note there were seve...
asked by 24.04.2018 / 21:48
1
answer

Change values within an SQL query

I have a car chart that has a status field. I want that at the time of doing the SQL query if its status is ==1 I get the text "on hold". If the status is a 2 that spells "en route", and so on (they are numbers from 1 to 4).     
asked by 29.05.2018 / 21:05
1
answer

how to do a join without duplicating records [closed]

Good afternoon, how could I get the following result from the image: in sql server since I have 3 tables of which 2 inherit from a main one, but when doing a join between these tables I double the value     
asked by 29.03.2018 / 16:12
1
answer

Add Unit of Measure To Register In TextBox

Hello good afternoon apologize, there will be some way of when entering the data in a textbox you add the unit of measure you want automatically. Example: In a texbox where the weight of a person is recorded, write "22" and at the time of wri...
asked by 27.03.2018 / 21:57
1
answer

Insert in a table only when the registration does not exist

I have a table in MySql and in it I want to enter data from another table located in a different database, the data is inserted correctly if I execute the following query: INSERT INTO courses_members (course_id, user_id, added, validity, a...
asked by 28.03.2018 / 17:47
2
answers

Exercise in PL / SQL

Encode a procedure that receives as parameters a department number, an amount and a percentage and that raises the salary to all the employees of the department indicated in the call. The increase will be the percentage or amount indicated in th...
asked by 07.04.2018 / 17:42
1
answer

Join SQL columns data

In the following example: Could you merge the genre into a single column? For example: podcast = 1, Genre = Music, Fiction. podcast = 2, Genre = Art, Videogames, Politics.     
asked by 21.05.2018 / 20:36
1
answer

Problem when running a View in SQL Server

I have a problem executing a view statement in SQL Server. The problem is that when I make a relation with another table to add another field to the query, it does not return anything to me. With this statement, it returns all fields except one:...
asked by 18.04.2018 / 08:40
2
answers

What is the difference between making an INNER JOIN with ON and with Where? [duplicate]

I want to combine 2 tables with a INNER JOIN but I find 2 different syntaxes where they are placed like this:    INNER JOIN table_2 ON table_1_ID = table_2_ID and the other in this way, changing only where    INNER JOIN table_2...
asked by 18.04.2018 / 19:35