Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grouping information, How?
Message
De
08/11/1999 14:14:17
 
 
À
05/11/1999 08:49:00
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00286144
Message ID:
00288585
Vues:
16
Thanks Michael
I prefer beaking the catcode too.

Gerardo

>Gerardo,
>
>Would something like this work for you?
>
>SELECT CatCategory, CatDescription FROM CatTable
>WHERE catcode LIKE '__000'
>
>And if so, you could do away with the CatCategory column by taking the first two characters of catcode:
>
>SELECT LEFT(catcode, 2) AS Category, CatDescription
>FROM cattable
>WHERE catcode LIKE '__000'
>
>The downside is that the queries are sensitive to the business rules that are used to construct catcode. In general, I would perfer breaking the catcode into a two columns like primary_cat and secondary_cat or something like that.
>
>-Mike
>
>>CatCod CatDescription CatCategory
>>--------------------------------------------------------
>>01000 Agriculture 01
>>01001 Agriculture - Plants 01
>>01002 Agriculture - Animals 01
>>02000 Automotives 02
>>02001 Automotives - parts 02
>>02002 Automotives - Dealers 02
>>03000 Travel 03
>>03001 Travel - Airplanes 03
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform