Questions tagged as 'sql'

2
answers

C # SqlException was unhandled error: 26 - Error Locating Server / Instance Specified

I have been developing since the beginning of December 2016 a project to register tool loan vouchers for my school and I have used an sql database to keep the record. I added a local sql database following the following youtube tutorial: "Ins...
asked by 15.03.2017 / 19:58
1
answer

Obtain an sql connection using entityManager

I would like to know if it is possible to establish a DB connection type sql.connection using entityManager , that is, I need to call a procedure stored in the database, usually making a connection to the database in where previousl...
asked by 22.02.2017 / 20:17
1
answer

SQL query error when executing

I am trying to make a query in SQL Server in which I do: Round(Convert(float,A)/(Convert(float,B),2) and you return this message:    The conversion of the nvarchar value '2968922618' overflowed an int column. The value of the denomin...
asked by 22.02.2017 / 16:17
3
answers

Group SQL query results by a field

I have a table like this: | ID | id_foreign | cosa | ------------------------------- | 1 | 1 | cosa1 | | 2 | 1 | cosa2 | | 3 | 2 | cosa1 | | 4 | 3 | cosa1 | | 5 | 4 | c...
asked by 10.02.2017 / 12:44
1
answer

Convert SqlDataReader in Generic List

I have a SqlDataReader in a method and I need to return it, the problem is that when closing the SQL connection the data of SqlDataReader disappears, to what kind of data should I be able to pass it to return it ?, this is my code static publi...
asked by 06.02.2017 / 16:37
1
answer

Make monthly report of sql data

How can I get monthly data for example from day 1 to 1 or if it is in the current month from day 1 to the current one. Having a table such that: +---------------------------------------+ | id | estado | fecha | +------+---...
asked by 13.02.2017 / 09:37
2
answers

Filter by dates

I need to be able to make a query that shows me the products that were not sold in a range of dates. The Database: The table: select p.ProductID,p.ProductName,p.CategoryID,o.OrderDate,DAY(o.OrderDate) as 'Dia Vendido',MONTH(o.Order...
asked by 09.06.2017 / 09:32
1
answer

Create table with UNION

I have this query in Access that I have to pass to SQL Server INSERT INTO Out_MTK ( Id_MTK, Fijo1, Fijo2) SELECT Aux_Mtk_Red_Familia.Expr1, Aux_Mtk_Red_Familia.Fijo1, Aux_Mtk_Red_Familia.Fijo2 FROM Aux_Mtk_Red_Familia The pro...
asked by 14.02.2017 / 16:27
1
answer

How to consult with JPQL or CriteriaBuilder?

I have three Classes: Client, Loan, Collector customers have many loans collectors have many loans a loan belongs only to a client and a collector, it must be the same for both between the clients and the loans there is a table that...
asked by 29.01.2017 / 21:08
1
answer

Why can not I see the sys objects? of SQL Server?

Good afternoon, I have a concern, I do not know why I can not see the views belonging to the "sys" schema, so the following error came up: ... when I made this query: SELECT * FROM master.sys.database_permissions AS dp JOIN sys....
asked by 27.01.2017 / 21:49