buscar y contar un caracter en una tabla de neodbpro - Forum

Forum Navigation
You need to log in to create posts and topics.

buscar y contar un caracter en una tabla de neodbpro

Hola a todos, necesito buscar y contar caracteres distintos en una tabla y no se con que comando o función realizar, si me pueden ayudar.

 

Uploaded files:
  • You need to login to have access to uploads.

En excel se puede realizar, pude conectar a visualneo win con la sugerencia de ustedes, pero no se como visualizarlo

Buenos días Olga:

Si me cuentas un poco de qué va tu aplicación a lo mejor puedo ayudarte. Veo la foto de la tabla pero no me da información sobre lo que quieres hacer.

Creo que puedes acceder a mi  email, pero yo no he podido acceder al tuyo.

Espero noticias

Francisco Javier

@olga-beatriz-rojas

For example, one field (column) of the table. A special variable is used [ID.Table. $ RecCount]
https://neodbprohelp.visualneo.com/SpecialVariables.html

You can repeat this code for other columns using a loop.

dbpFieldToVar "ID" "TableName" "FIELD" "[Field]" "Delimiter=#;SkipBlanks=Yes;NoDuplicates=Yes;DelimiterInContext=Leave"
StrParse "[Field]" "#" "[Array]" "[Count]"
Loop "1" "[Count]" "[i]"
dbpQuery "ID" "TableName" "FIELD = [#34][Array[i]][#34]"
SetVar "[Sum_[Array[i]]]" "[ID.TableName.$RecCount]"
EndLoop
AlertBox "" "finish!"

See the result in the debugger in variables starting with the prefix "Sum_"

P.S.: So that the code does not affect the appearance of the table, you can make a blind copy of it and search in it.

 

@olga-beatriz-rojas

Here's another way:

dbpFieldToVar "ID" "TableName" "FIELD" "[Field]" "Delimiter=#;SkipBlanks=Yes;NoDuplicates=No;DelimiterInContext=Leave"
StrParse "[Field]" "#" "[Array]" "[Count]"
Loop "1" "[Count]" "[i]"
IfEx "[Array[i]] <> [#34][#34] AND [Array[i]] <> [Tmp]"
SetVar "[Tmp]" "[Array[i]]"
Loop "1" "[Count]" "[j]"
SearchStr "[Tmp]" "[Array[j]]" "[ResultSearch]" ""
If "[ResultSearch]" "<>" "0"
SetVar "[Sum_[Array[i]]]" "[Sum_[Array[i]]]+1"
EndIF
EndLoop
EndIF
EndLoop
AlertBox "" "finish!"

See the result in the debugger in variables starting with the prefix "Sum_"

Open chat
1
Do you need more info?
Hi, do you have any doubt?