Questions tagged as 'sql'

4
answers

How can I attach a PDF file to a DB record in SQL with C #?

The need I am having is to know if there is any possibility of attaching PDF files or any type of file to a DB record in SQL Server 2008 R2 from a C # application made with VS 2012.     
asked by 09.02.2016 / 23:41
1
answer

Alternative to SQLFiddle

The page link currently does not allow creating tables, who knows any alternative to this page? The issue has already been reported to the developer team of sqlfiddle, but it still has not been solved, for that reason I am now asking for an...
asked by 04.01.2016 / 17:44
2
answers

How to make a CASE WHEN from a Nvarchar Field that is sometimes Null or empty?

Well I have the following Query, it is a stored procedure for HANA STUDIO I have the Field A. "NumAtCard" which is of type nvarchar what happens is that many times the field will be empty or it will be null and I would like to know how to make...
asked by 09.11.2018 / 15:54
1
answer

Consult last access date Login MS SQL Server

To know the last access of a Login to a database in SQL Server; Perform the following query to obtain dates however the LOGINPROPERTY function does not contain the last login date of Login. SELECT dbp.name AS [nombreUsuarioBD],...
asked by 14.09.2017 / 17:11
1
answer

Relational data bases: problem when entering data

I'm trying to create a database where two tables have a relation to an intermediate table. The idea is simple; a table stores user records, their passwords, emails etc, while the other stores levels. (The levels belong to a kind of videogame...
asked by 02.04.2018 / 21:48
3
answers

Add total column and group by month in mysql

How do I add the total column and group by the column mes , but do not add me when the id_orden is repeated (218), and try to group them by month, and it looks like this: The sum of month 5 is 10 and the sum of month 1 gives 240, a...
asked by 17.05.2018 / 05:24
1
answer

Difference between database server and database engine

Good morning, maybe it can be a fairly trivial question, but the reality is that many people use it indifferently and I would like to know if they refer to exactly the same, or if there is a technical difference. As far as I understand, both...
asked by 10.08.2017 / 20:15
2
answers

how to make it a single line

I have this query SELECT 'presupuesto_annio_real'.'categoria', IF('clase_canal'.'canal' = 'constructor',sum('presupuesto_annio_real'.'cantidad'),0) as constructorCantidad, IF('clase_canal'.'canal' = 'distribuidor',sum('presupuesto_annio_...
asked by 19.09.2018 / 16:58
2
answers

Problem with FK in MySQL

I am somewhat new to the database design and I have the following doubt: I have created a bd called "newdb" in which I create two tables (student and subject) with the following columns: Student table Field Type Null...
asked by 14.09.2017 / 19:27
1
answer

Error 1215: MySQL foreign key can not be added

I am trying to make a Foreign Key to some tables that I have created but MySQL does not allow me, these are the tables: CREATE TABLE publicador(id_publicador INT NOT NULL PRIMARY KEY AUTO_INCREMENT UNIQUE, fecha_publica...
asked by 09.12.2016 / 05:25