Skip to main content
edited body; edited title
Source Link
marc_s
  • 759.6k
  • 185
  • 1.4k
  • 1.5k

how How to remove duplicates in mssqlSQL Server

I have data looks like this:

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          25
001        ABC     1-16    156         25
002        DEF     2-5     478         16
002        DEF     2-5     356         16

I am trying to let Freightfreight cost only show once in my table, the result would look like:

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          0
001        ABC     1-16    156         0
002        DEF     2-5     478         16
002        DEF     2-5     356         0

Please help me with this

how to remove duplicates in mssql

I have data looks like this:

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          25
001        ABC     1-16    156         25
002        DEF     2-5     478         16
002        DEF     2-5     356         16

I am trying to let Freight cost only show once in my table, the result would look like:

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          0
001        ABC     1-16    156         0
002        DEF     2-5     478         16
002        DEF     2-5     356         0

Please help me with this

How to remove duplicates in SQL Server

I have data looks like this:

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          25
001        ABC     1-16    156         25
002        DEF     2-5     478         16
002        DEF     2-5     356         16

I am trying to let freight cost only show once in my table, the result would look like:

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          0
001        ABC     1-16    156         0
002        DEF     2-5     478         16
002        DEF     2-5     356         0

Please help me with this

added 48 characters in body
Source Link
Pரதீப்
  • 94.1k
  • 21
  • 144
  • 179

I have data looks like this:

Order No. Name Date Unit Price Freight 001 ABC 1-16 232 25 001 ABC 1-16 55 25 001 ABC 1-16 156 25 002 DEF 2-5 478 16 002 DEF 2-5 356 16

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          25
001        ABC     1-16    156         25
002        DEF     2-5     478         16
002        DEF     2-5     356         16

I am trying to let Freight cost only show once in my table, the result would look like:

Order No. Name Date Unit Price Freight 001 ABC 1-16 232 25 001 ABC 1-16 55 0 001 ABC 1-16 156 0 002 DEF 2-5 478 16 002 DEF 2-5 356 0

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          0
001        ABC     1-16    156         0
002        DEF     2-5     478         16
002        DEF     2-5     356         0

Please help me with this

I have data looks like this:

Order No. Name Date Unit Price Freight 001 ABC 1-16 232 25 001 ABC 1-16 55 25 001 ABC 1-16 156 25 002 DEF 2-5 478 16 002 DEF 2-5 356 16

I am trying to let Freight cost only show once in my table, the result would look like:

Order No. Name Date Unit Price Freight 001 ABC 1-16 232 25 001 ABC 1-16 55 0 001 ABC 1-16 156 0 002 DEF 2-5 478 16 002 DEF 2-5 356 0

Please help me with this

I have data looks like this:

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          25
001        ABC     1-16    156         25
002        DEF     2-5     478         16
002        DEF     2-5     356         16

I am trying to let Freight cost only show once in my table, the result would look like:

Order No.  Name    Date   Unit Price  Freight
001        ABC     1-16    232         25
001        ABC     1-16    55          0
001        ABC     1-16    156         0
002        DEF     2-5     478         16
002        DEF     2-5     356         0

Please help me with this

Source Link

how to remove duplicates in mssql

I have data looks like this:

Order No. Name Date Unit Price Freight 001 ABC 1-16 232 25 001 ABC 1-16 55 25 001 ABC 1-16 156 25 002 DEF 2-5 478 16 002 DEF 2-5 356 16

I am trying to let Freight cost only show once in my table, the result would look like:

Order No. Name Date Unit Price Freight 001 ABC 1-16 232 25 001 ABC 1-16 55 0 001 ABC 1-16 156 0 002 DEF 2-5 478 16 002 DEF 2-5 356 0

Please help me with this