Questions tagged as 'sql-server'

3
answers

SELECT between two dates

I am trying to do a SELECT that brings me all the records that are between two dates. However, I want to ignore the time (hours, minutes, seconds, etc ...). For example, I have a record that has 2016-11-14 11:47:56.207 , but I send...
asked by 15.11.2016 / 16:43
2
answers

How can I auto-increment an alphanumeric field with idendity

CREATE TABLE RESPONSABLE( COD_RES CHAR(6) INDENTITY(¿?) PRIMARY KEY, NOM_RES VARCHAR(25) NOT NULL, APEPAT_RES VARCHAR(25) NOT NULL, APEMAT_RES VARCHAR(25) NOT NULL ) GO INSERT INTO RESPONSABLE VALUES('RES001', 'Pedro', 'Abanto', 'Mendo...
asked by 19.11.2016 / 23:44
1
answer

SQL Error 18456 when connecting to the server

I'm having trouble connecting to "SQL Sever Authentication." When I installed the program in the Database Engine Configuration part I selected mixed authentication mode, this created me an administrator "CRONOPIO \ Lucas (Lucas)" but when w...
asked by 30.10.2016 / 03:34
1
answer

Problem with the Index Primary Key identity they give huge jumps in tables.

In some occasions the database has given me jump we say that of going in 200,000 until 250,000 or even greater. Some idea of how I can do a log search, to determine the problem, some recommendations of possible causes or information that will he...
asked by 06.10.2016 / 18:53
2
answers

Disadvantages with Store Procedure [closed]

I'm doing an SP to perform a specific search with parameters, but it brings me the following error. How to solve it?    Msg 137, Level 15, State 2, Procedure spPantallaTasa, Line 6   Must declare the scalar variable "@aseguradora".       M...
asked by 20.10.2016 / 17:08
2
answers

Selection from several tables

I have this query that works well var rest = (from de in se.DeliveryConfiguration join re in se.restaurant on de.Restaurantid equals re.RestaurantID where (de.Position.Distance(geografi)/1000) < de.Distance...
asked by 27.09.2016 / 20:04
2
answers

Problem with UTF_8

Good morning, my problem is this, Php sends me the following Warning    Warning: utf8_decode () expects parameter 1 to be string, object given in. I have already reviewed my code and I have declared the characterSet in this mode "Chara...
asked by 25.08.2016 / 18:56
1
answer

Remove 0 from date result

I make this command to bring the date in a YYYY / MM / DD format: DECLARE @SomeExampleDate DATETIME; SELECT @SomeExampleDate = '2016/08/20'; SELECT STUFF(REPLACE('/'+CONVERT(CHAR(10),@SomeExampleDate,102), '.', '/'),1,1,'') But I want that...
asked by 20.08.2016 / 21:24
2
answers

How can I take a data from a DB and add it to another DateTime data in C #?

My question is this: I am using Visual Studio 2015 , and I am programming in C # for Windows Forms , the case that is I have a variable that is stored in a database of SQL Server 2008 , and the data that is there is of type int . What...
asked by 08.11.2016 / 20:37
3
answers

Clause Count (*) within a select

I have the following SQL query. What I do not know how to do is that the count (*), returns one more column, with the total number of records. The current query throws me errors, the count (*) is between
asked by 08.11.2016 / 00:04