Questions tagged as 'sql'

1
answer

How can I give privileges to SQL SERVER sessions?

I was investigating and I have a question. I know that to create a session is: CREATE LOGIN user WITH PASSWORD = 'pass'; And my question is: How do I give read and write privileges and assign a table to that user with SQL code?     
asked by 28.09.2016 / 01:23
1
answer

Doubt over IF SQL and check if a select returns records [closed]

In a table called pacientes I have a Juan , which is varchar (4) . My if has the following inconvenience Juan can be Pedro or José . That is, this name can vary many times I need a IF that...
asked by 24.09.2016 / 03:23
1
answer

Verifying if previous registration already exists (SQL server 2008 r2)

I have the following script with more than 20,000 records in each table: With registration dates from January to February 2018: INSERT Table_que_usare (Usuario, IDUnica, servidor) select Usuario, IDUnica, servidor from table1 With regist...
asked by 07.08.2018 / 00:06
1
answer

What do I do so that in a stored procedure I can save in two variables with INTO in front of a query that returns one or several columns?

I explain: It turns out that I have a procedure that establishes two integer parameters, which are then arranged to store each the result of a single value that comes from different columns one for each, the select that I have is some...
asked by 17.08.2018 / 21:11
1
answer

Error in jQuery, when sending FORM: Maximum call stack size exceeded

Uncaught RangeError: Maximum call stack size exceeded at xb (jquerymin.js:4) at xb (jquerymin.js:4) Hello, I try to send the following form, and I receive this error by console: <form id="form_comentarios" action="POST"> &l...
asked by 07.09.2018 / 17:22
2
answers

Search MySQl field created in the same query

Good morning. I have the following query: select p.id_alumno as id,('estudiante') as tipo, p.url_imagen, concat_ws(' ',p.nombre,p.paterno,p.materno) as nombre, e.nombre as empresa,concat_ws(' ',u.nombre,u.apellidos) as solicitante, p.f...
asked by 30.08.2018 / 20:17
1
answer

Insert data from EXCEL to a table in SQL SERVER

I have a sheet in Excel 2016 that contains several columns with information about my clients; the file path is "D: \ Clients.xlsx". Then I have a table "tb_clients" in the Database "bd_comercial" (SQL Server 2008 R2) with the same names, orde...
asked by 21.05.2018 / 00:00
1
answer

join 2 users through union and leave the result in a temporary table

I have 2 queries to different tables, which have the same structure, but different records. I can combine both selects with UNION, and I want this result to be recorded in a temporary table. Querys are simple Select * from tabla A union Sel...
asked by 10.05.2018 / 20:34
2
answers

How to merge multiple records into one using SQL SERVER?

I need this table: Be this: (edit it as an image using paint to show as an example) The data will always have the same 'serverName', DATE and TIME in common     
asked by 04.10.2018 / 18:48
1
answer

Can many Tablespaces share a single datafile between them?

I understand that a Tablespace can have many datafiles but my question is whether among the Tablespace they can share only one datafile. Thanks     
asked by 06.10.2018 / 20:30