Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
anbari
Starting Member
2 Posts |
Posted - 2012-01-27 : 13:21:20
|
| In the distinct for several columns whether there is the possibility of data loss? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-27 : 13:33:49
|
| what does that mean?it gives you distinct combinations of values in those fieldsyou wont lose anything from the table but it just retrieves distinct from those which are present------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
anbari
Starting Member
2 Posts |
Posted - 2012-01-28 : 12:49:07
|
quote: Originally posted by visakh16 what does that mean?it gives you distinct combinations of values in those fieldsyou wont lose anything from the table but it just retrieves distinct from those which are present------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/If you have several fields and a field duplicate values ??will not show.On the field Put distinct and There is the potential loss of other fields.As well as the relationship between tablesUsually occurs in the data cleansing.for Example:SELECT distinct[PDC_ProducerName] ,[PDC_BL_CNYTP],[PDC_ID] ,[PDC_Code] FROM [Root1].[dbo].[TB_Producer] where [PDC_ProducerName]='chammed' PDC_ProducerName PDC_BL_CNYTP PDC_ID PDC_Codechammed 209 9592 NULLchammed 209 9599 NULLchammed 175 9600 NULLchammed 208 9661 NULLI want to do the same Duplicate name " PDC_ProducerName"in the previous database with different codes stored in the same On the other hand off the names of the loss of other codes that may be associated with another table"PDC_BL_CNYTP"Thanks for your help
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-28 : 17:50:11
|
| sorry didnt understand which other table you're talking about. You've not posted so we cant see what it contains and what you're trying to get out of it------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|