All Questions
41 questions
-1
votes
1
answer
122
views
Parsing First Name and Last Name
I am using SQL Server 2008 for this. I am trying to parse first name and last name separately from a column that contains a full name value. After parsing, I would like to store that value in a ...
-2
votes
1
answer
85
views
SQL Server Duplicate
I need to find duplicates in a table named lead, which contains around 100k records. The duplicates have similar values in the company column, such as:
The goal is to retain only the latest leadid (...
1
vote
1
answer
230
views
How to add a trigger to delete duplicates in table
Hi I have a table like this below:
[dbo].[table1](
[predictions] [int] NULL,
[timestamp] [datetime] NULL,
[train1] [int] NULL,
[train2] [int] NULL)
I'm inserting data into this table ...
0
votes
1
answer
85
views
Input selected row and ignore duplicate row
I have a problem that I need to insert a selected row from the table to another table based on last_update data or last_transaction_product. last_update is the data updated from the table, and ...
1
vote
1
answer
732
views
Get Duplicate records from a table on combination of Multiple Columns and show 'Y' for Duplicate and 'N' for Single records
I need to find duplicate records from a table on combination of Multiple Columns and show 'Y' for duplicate records along with other columns in a gridView.
To Illustrate :
Table A:
ID, Col1 , Col2, ...
1
vote
2
answers
107
views
Improve SQL Query to find redundant data
the following shows my sample dataset
PatientID PatientName
XXX-037070002 Riger, Jens^Wicki
XXX-037070002 Riger^Wicki
XXX-10052 Weier,Nicole^Peggy
XXX-10052 Weier,Nicole^...
0
votes
3
answers
49
views
Duplicate Rows in SQL Server 2008
I have below view with one Column, "PositionDate".
I want to add a new column, "Currency" with Values "SEK", "EUR", "DKK" for every row.
Result should be 3 rows / positiondate with one Currency per ...
2
votes
2
answers
77
views
How to duplicate all values in a table SQL Sever 2008, with unique Identification
I have a table called table123, with about 80 rows. It includes the columns 'ID', 'First_Name', 'Surname', 'Job_Title', 'Salary' and 'Address'.
I have created a new table called table987, which is an ...
0
votes
1
answer
29
views
I need to group 2 rows two 1 and concatenate values of one column in SQL SERVER 2008
so this is the situation,i have this table with multiple records but a few records have the same values with only one column being different
ID NAME SELCODE RANGE
111 DANIEL 123123 YES
111 ...
0
votes
2
answers
3k
views
Effective way to delete duplicate rows from millions of records
I am looking to find an effective way to delete duplicated records from my database. First, I used a stored procedure that uses joins and such, which caused the query to execute very slow. Now, I am ...
2
votes
2
answers
72
views
Adding values based on duplicated data
it's my first post and I hope everything will be clear for you. I've got table such as:
client ; cost
Paula ; 100
Paula ; 50
Jacob ; 300
Paula ; 120
I want to add another column "client2" where ...
0
votes
2
answers
66
views
Removing Duplicates With Exception
In the image below, you will notice that there are multiple instances where DetailID is the same, however the EES_Base_Commission is 0 or 0.2.
What I'm trying to do is filter out of my result set ...
1
vote
3
answers
481
views
Remove duplicate rows query result except for one in Microsoft SQL Server?
How would I delete all duplicate month from a Microsoft SQL Server Table?
For example, with the following syntax I just created:
SELECT * FROM Cash WHERE Id = '2' AND TransactionDate between '...
0
votes
3
answers
102
views
How to remove duplicate entries? SQL Server 2008
Apologies if this question has already been asked, but i'm pulling my hair out!
I have two tables, abbreviated to KI and UG. KI contains a list of people and their photos, UG contains another list of ...
15
votes
6
answers
71k
views
Prevent duplicates across multiple executions of copying records back into source table while changing one column
I want to select CustomerID, OrderTypeID, and LoanNumber from tblOrder and insert it with a new OrderTypeID but same CustomerID and LoanNumber.
My query does that but it duplicates the values, every ...