Questions tagged as 'sql'

1
answer

How can I import a dump file (database) from mysql to sql server 2014?

I have some dump files from mysql and I need to import them to Sql server 2014, does anyone know how I can do it? Thanks in advance     
asked by 18.09.2018 / 14:02
1
answer

Insert files (images, videos, documents, pdf, docs, excel, impress ...) in a DB with php mysql with BLOB

I'm trying to make a form that, insert an image file in the DB. But do not insert anything, because it will be? HTML: <form method="POST" action="" id="form_chat_do" enctype="multipart/form-data"> <table id="botones_chat_do...
asked by 16.09.2018 / 16:59
2
answers

ERROR SUBCONSULTA RETURNS MORE THAN ONE VALUE

Hello, I need help with this topic, in the work they have left me a project, to enter users through an excel file and that by selecting a user already registered in the database all their permissions pass to the new users, my problem is when I w...
asked by 16.09.2018 / 17:04
1
answer

Join result of two queries in SQL Server without repeating records

Dear ones have a good day, my question is as follows. I want to join the results of two queries that coincide in columns and data type, as a first option I came up with a UNION, my first query is the following: SELECT T1.ArrivalDate AS...
asked by 15.09.2018 / 19:16
1
answer

How to assign a primary key composed as a foreign key in another table with MySQL?

What happens is that I have a primary key composed in a table and that key must be foreign in another table. Could someone help me please? Example: CREATE TABLE 'detallehorario' ( 'Id_Grupo' int(11) NOT NULL, 'Dia' varchar(15) COLLATE l...
asked by 22.09.2018 / 05:06
0
answers

how can I set a distinct to the result of a select that contains another distinct?

This query gives me repeated data, and I want to give a distinct to the result of it. help me please, thanks in advance. SELECT DISTINCT c.*, IF (c.code = 'FF', "INICIO" , "-") AS PARTIDA, IF(re.code_enlace = 'FF', CONCAT("INVITADO DE ",...
asked by 22.09.2018 / 00:38
0
answers

how can I make a trigger for 2 tables?

I'm thinking about making triggers that save when there is insert in 2 tables, I mean I have this table: --- tbl_cliente --- Cod_Cli mail password First name Surname age birth date and I have this other table --- tbl_adm...
asked by 09.10.2018 / 16:59
0
answers

How to save a trigger of a table A in scheme A in another table B of scheme B?

I need to save some data in a Bitacora table when I update the Salary attribute, the detail is that the Bitacora table is in a DA user and the Salary attribute belongs to the Employee table which is in the AD user, then I show the trigger that I...
asked by 15.09.2018 / 02:53
1
answer

stored procedure within a function

I need to execute the stored procedure within the function by sending only an ID that is the primary key to update a field in the table.     
asked by 13.09.2018 / 22:41
0
answers

Prevent a foreach from doing a duplicate INSERT INTO

I have the following code: <?php function entregar_pedido(){ global $db; $id_pedido = ($_GET['id']); $user = ($_GET['user']); //$lote = $_REQUEST['lote']; $lote = "1 1111 1111 1111 1111 1111111111111111 2 2222 2222 22...
asked by 22.09.2018 / 19:51