Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Normalising Data
Message
De
28/11/2012 11:03:13
 
 
À
28/11/2012 09:28:46
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01558244
Message ID:
01558256
Vues:
56
>>
>>INSERT INTO [Rates]
>>           ([rat_pk]
>>           ,[rat_name]
>>           ,[rat_type])
>>     (SELECT newid()
>>           ,[SpecialRate]
>>           ,[rat_type]
>>      FROM (SELECT DISTINCT SpecialRate
>>                          ,case when SpecialRate like 'Mail%' 
>>                                     then 2
>>                           case when SpecialRate like 'ZipX%' 
>>                                     then 3
>>                           else 1 end AS [rat_type]
>>            FROM [Weight Rates-Special Rates]) Test)
>>
>>NOT TESTED!
>
>
>Thanks! Good enough to get the brain going again :)


:-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform