Page 1 of 1

Cpc classification

Posted: Thu Jul 13, 2017 3:48 pm
by Tyna
Hey,
Can you tell me please if it is correct to put in my query: left (cpc_class_symbol,4) in ('y02B', 'y02c', 'y02e').
I would like to obtain all the patents with these CPC codes and all subcodes.
what is the difference if i put cpc_class_symbol in ('y02B', 'y02c', 'y02e')

Thank you from advance

Re: Cpc classification

Posted: Wed Jul 19, 2017 6:58 am
by mkracker
Hi,

CPC classification codes are always used on the group level, like 'Y02E 20/16', so they contain 11 or more characters. Your code sample

Code: Select all

cpc_class_symbol in ('y02B', 'y02c', 'y02e')
is equivalent to

Code: Select all

cpc_class_symbol = 'y02B' OR 
cpc_class_symbol = 'y02c' OR 
cpc_class_symbol = 'y02e'
Strings of different lengths (like length 11 compared with length 4) is always false, so your query will return nothing.

On the other hand, the SQL function LEFT, e. g. "left('Y02E 20/16',4)", returns the 4 leftmost characters, which are 'Y02E' in our example. So your condition

Code: Select all

left (cpc_class_symbol, 4) in ('y02B', 'y02c', 'y02e'). 
looks good.

Re: Cpc classification

Posted: Tue Aug 01, 2017 12:25 pm
by Tyna
Hi,
Thank you for your helpful answer.

Best regards