Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RIght outer join Problems
Message
De
21/12/2005 16:14:48
 
 
À
21/12/2005 15:42:38
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01079896
Message ID:
01080023
Vues:
16
>I am not able to delete the duplicates from the table in SQL. I fiured that if I could generate a unique value for every records in the table that I would then be able to delete the duplicate records and then drop the column I added.
>
>I tried both of these.
>
>select lis_vol.*, RAND( (DATEPART(mm, GETDATE()) * 100000 )
> + (DATEPART(ss, GETDATE()) * 1000 )
> + DATEPART(ms, GETDATE()) ) as random from lis_vol
>
>select lis_vol.*, RAND() as random from lis_vol
>
>They both run so fast that a unique value is not generated. Maybe I will have to export the data to Excel or something.

speed is out of the game. SQL evaluate RAND() one time only, to put aside from the speed.

Question: have lis_vol a primary key ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform