It may happen to find in some data sources more than one occurence of a data type inside the same field, separated by a special char.
But in many cases that char may be not so special and be misguiding when trasposing the field.
Let's take as example Thomson SDC database, where in the alliance name you find the alliance participants names separated by the / char.
Obviously the / char may also be integral part of some participant name; so we need to count the occurrence of the / char in order to compare it to the number of partipants indicated in the same record in order to do futher cleaning, if needed.
So I wrote a small DBA function called CHARCOUNT, and I'm posting it here
Function charcount(inputstring As String, findstring As String)
' return the number of occurrences of findstring in inputstring
Dim a$, b$
Dim c, i As Integer
a$ = inputstring
b$ = findstring
c = 0
For i = 1 To Len(a$) - Len(b$) + 1
If Mid(a$, i, Len(b$)) = b$ Then
c = c + 1
End If
Next
charcount = c
End Function
Function charcount(inputstring As String, findstring As String)
' return the number of occurrences of findstring in inputstring
Dim a$, b$
Dim c, i As Integer
a$ = inputstring
b$ = findstring
c = 0
For i = 1 To Len(a$) - Len(b$) + 1
If Mid(a$, i, Len(b$)) = b$ Then
c = c + 1
End If
Next
charcount = c
End Function
academic patenting
(4)
algorithms
(2)
anvur
(1)
APE-INV
(3)
applicants
(10)
applications
(11)
ascii
(1)
bibliometrics
(7)
bocconi
(2)
bug
(1)
china
(2)
citations
(11)
claims
(3)
concordance
(7)
conference
(8)
CPCs
(2)
curiosities
(1)
data quality
(12)
data recovery
(1)
database
(26)
datamining
(5)
disk
(1)
download
(1)
dump
(1)
ecla
(1)
entity resolution
(4)
EP register
(7)
epo
(15)
equivalents
(1)
espacenet
(2)
ethnicity
(2)
examination
(3)
excel
(3)
free
(2)
function
(1)
GDPR
(1)
gender
(1)
geocoding
(6)
github
(1)
icons
(1)
indicators
(1)
inpadoc
(9)
inventors
(21)
IPC
(21)
IPC35
(4)
job offers
(1)
KITeS
(3)
legal status
(16)
levenshtein
(1)
line breaks
(1)
linked open data
(1)
match
(1)
mobility
(1)
mysql
(23)
nace
(2)
national patents data
(6)
NBER
(1)
news
(1)
NPL
(7)
NUTS3
(6)
OHIM
(1)
openoffice
(1)
orbis
(1)
orcid
(1)
OS
(1)
OST
(2)
password recover
(1)
patent attorneys
(1)
patent data
(2)
patent family
(17)
patent ownership
(3)
patent status
(3)
patent value
(1)
patents
(49)
patentsview
(3)
patstat
(145)
person_id
(13)
priorities
(5)
python
(2)
reclassification
(8)
renewals
(1)
replace
(2)
scientific articles
(2)
scopus
(1)
semantic analysis
(2)
sipo
(3)
sql
(6)
strings
(4)
tool
(9)
trademarks
(2)
triadic patents
(2)
UDF
(1)
USPC
(1)
USPTO
(12)
VBA
(1)
vista
(1)
VM
(1)
webscraping
(2)
WIPO
(10)
workshops
(1)
Wos
(1)
xp
(1)
No comments:
Post a Comment