Questions tagged as 'sql'

1
answer

Can not I make this inquiry?

I want to add the values that are in VLR_TOTAL where NOMBRE equals Expansion and NOMBRE equals Mantenimiento. I have the following query: SELECT SUM(VLR_TOTAL) FROM bodega_moviles WHERE NOMBRE = Expans...
asked by 31.08.2017 / 16:52
1
answer

What is the difference between eager and lazy? [closed]

What is the difference between eager and lazy? when I use them an entity Manager retrieve the entities of a database?     
asked by 24.08.2017 / 16:57
2
answers

How can I do a Select and an Update in the same query?

I have 2 tables: Users [Id, UserType, Email, Password] Clients [Id, TypeUser, Email, Password, UltimaSesion] I have created a login query through the Email and password looking in both tables to know if it is a User of the company or a...
asked by 18.08.2017 / 02:43
2
answers

Get properties of an ASP.NET file Razor C #

Hello, I'm doing a module in ASP.NET with Razor and C # where I upload a file of any type to a database , along with other data. I need to get the properties of the file on the server side ("with C # "), in order to be able to append thes...
asked by 27.10.2017 / 19:16
3
answers

Add Cast in SQL SERVER

Hello friends I want to make a sum of a series of elements that "cast" to decimal , this is what I am trying to do. But he says    Incorrect syntax near 'sum'. select sum( SELECT CAST(em.sueldoDiario AS DECIMAL(18, 4)) ) from sysCPPues...
asked by 19.10.2018 / 18:03
4
answers

Consultation with LEFT JOIN Mysql

I have three tables with the following data: varieties ------------------------------------ id | variety | status | ------------------------------------ 1 | VS1 | 1 | -----------------------------------...
asked by 18.09.2017 / 18:55
1
answer

PSQLException: syntax error on or near "user"

I have this error when using PreparedStatements to insert a User into a table in Postgresql called " user ", this action is carried out by crushing a button with the help of a PostgresHelper: PostgresHelper client = new Pos...
asked by 17.10.2018 / 19:25
2
answers

Consecutive to INSERT

I have this query INSERT INTO [SI_Consecutivo] (SI_Num_Inventario, SI_Nombre, SI_Fecha_Creacion, SI_Estado, SI_Almacen, SI_Num_Conteo) VALUES (1, 'uno', GETDATE(), 0,'cdis', 1 + FLOOR(RAND() * 1 )) I execute it with a button in javascrip...
asked by 22.06.2017 / 22:04
1
answer

Error: "The conversion of the nvarchar value '92012156148' overflowed an int column"

What I am trying to do is to capture in a textbox the identification number of a person, save the value in a variable, look for it in the database and show the name in label. This is the code: SqlConnection conexion = new SqlConnection("ser...
asked by 24.07.2017 / 05:14
2
answers

Put two results together in the same table

I'm trying to get two different queries together in the same table: declare @semana nvarchar(10) set @semana=(select datepart(week,getdate())) select SUM(CANTIDAD) AS Qty1 from tbl_Entrada where dia=('Monday') and semana=@semana...
asked by 03.07.2017 / 22:51