Questions tagged as 'sql-server'

5
answers

Copy a word from a column to the end

I have several records in sql eg almedia,jose costa santos and I want to change the value to: jose costa santos almeida So I want to get the surname that is in the beginning (before the comma) and put it at the end, but I do not know h...
asked by 02.02.2016 / 12:05
2
answers

Check if SQL Server is installed C #

I am finalizing a C # application that contains a database in SQL Server. How can I tell if the user has the SQL Server 2012 Express Local DB installed? Can you check via registry on x86 and x64 ? Basically it would alert the us...
asked by 13.02.2016 / 04:07
3
answers

Identifying SQL Brothers

I've put this link as an example of where I want to go link I have the student table. Ihavethetablewiththesibsids Myproblemis,IneedtodoaselectinsuchawaythatIcanonlymakeonenameappearatatimeandproduceanIDtolinkthesiblings: WiththisquerySELEC...
asked by 18.08.2017 / 18:54
3
answers

SELECT on a table using NOT EXISTS SQL (SERVER 2012)

I'm trying to make a Select tb1 using Where NOT EXISTS (select* tb2) I'm trying to select the row in tb1 that does not exist in tb2 to INSERT later. However when doing test on select it is not returning the lines that do not exist in t...
asked by 14.06.2017 / 18:45
1
answer

How to give a SELECT in several databases at the same time?

I have several databases on my server and I need to perform a query to return some information from a table that exists on all of these other databases. How can I make a SELECT on multiple bases at the same time?     
asked by 28.01.2016 / 22:56
2
answers

Duplicate keys

** Improving the Post for a better understanding of what happened. Person, good afternoon. I created a 'customer' table in the sql server and put the email field as vachar (50), unique and accept null Why logic, there are not 2 emails equa...
asked by 08.09.2018 / 19:55
2
answers

Any ASP.NET MVC solution for SQL injection?

I have in the application a code that validates the data entry, adjusting according to what is needed, would this be considered a good or a bad option? public static string ValidaDados(string str) { //Função simples para evitar at...
asked by 14.02.2017 / 13:10
2
answers

Format output from select

I have a problem with formatting a column in gridview, this column receives three values from the concatenated database, the utlimo value can be null, if the value is null it does not have the last trace that separates the value 2 from the value...
asked by 03.09.2015 / 15:28
2
answers

SQL query filter

I have a field called emailMSG0 inside a table in the database. This field contains various information. Is there any possibility in SQL to filter what I want to get inside this emailMSG0 field? Bring just some information. If I...
asked by 19.05.2016 / 13:51
2
answers

How to do Update on 3 rows in a query

How can I make an update to change the value of 3 lines? I have a similar structure: Id | Nome | Ordinal 13 | Juizado Especial Cível | ª 14 | Juizado Especial Criminal | ª 15 | Juizad...
asked by 05.02.2018 / 13:41