Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Normalising Data
Message
From
28/11/2012 09:28:46
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01558244
Message ID:
01558249
Views:
44
>
>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 :)
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform