Questions tagged as 'sql-server'

1
answer

SQL Server 2012 / BCP crashing - unexpected EOF

I want to upload some data files from the Ministry of Education (Microdata of the Census of Higher Education 2012) in my SQL Server 2012 Express. The data is in fixed column files generated by some program written in Fortran. I created a...
asked by 10.08.2015 / 18:03
2
answers

Login screen acting incoherent

I installed a login screen where the user must enter login and password with the following code: procedure TFMLogin.Img_confClick(Sender: TObject); var verif: boolean; begin FMHome.ADOLogin.SQL.add('Select * from "login" where "usuario" = :us...
asked by 27.11.2015 / 19:05
1
answer

DBGRID does not output result

I have a table that has data registered in SQLServer , but in the application they do not appear in dbgrid . DATASOURCdo dbgrid -> UDM.DSPecas_ordem_servico When you open the form: procedure TFMHome.lbl_BuscosClick(Sender:...
asked by 24.11.2015 / 15:50
3
answers

Return the difference between the last two records [closed]

What I need to do is in this image. How do I do it? This is the query I made and it is coming empty and I do not know why. SELECT event_type, value from teste t1 Where exists (select event_type, value from test...
asked by 29.06.2015 / 21:04
1
answer

How to do counter in "blocks" in Sql Server

I would like to know how a counter would look in an SQL query for the following situation: I have the columns matricula, date and time worked where I would like to create another column with the counter where would be a sequence only in the z...
asked by 19.06.2015 / 19:13
1
answer

SQL Server joining tables with null

I have the following tables: Responsavel | Filho Id Nome | Id Nome ResponsavelId 1 Ana | 1 Aninha 1 2 Maria | 2 Ana Júlia 1 3...
asked by 04.08.2015 / 16:31
1
answer

Reset to self-increment

I have a problem with my base fingers. I have the sending code as auto increment but whenever I delete a sending code the value does not reset or is not restarted is always increasing. I wanted to know how to reset the number ... for example...
asked by 23.05.2015 / 16:22
1
answer

SqlServer 2012 - Column '' in table '' is of a type that is invalid for use as a key column in an index

After seeing this error when creating a NONCLUSTERED index I wondered if it would really be necessary to create this index in the following scenario: I have a table with 11 columns, a column I store a URL, ie it is a column nvarchar(300)...
asked by 14.05.2015 / 22:59
1
answer

XML for temporary table records

Last week I I asked Here about how put each XML tag in a column of the database. Now I came across a situation next to it but with a plus, my XML comes from the database, and sometimes it will not come just 1 record, but more than one. In t...
asked by 15.10.2015 / 20:52
2
answers

Update with select in temp table

Galera, I need to create a temporary table with 2 fields (codProduct and codBarra), and with these temporary table records, I need to update on my main table. How do I update with select in temporary table?     
asked by 11.06.2015 / 14:15