what could be the error? / cual puede ser el error? - Forum

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

what could be the error? / cual puede ser el error?

@mishem,@vadim,@rcohen@rcohen

Tengo una base de datos socios.mdb
tiene una tabla que es cobradores
Quiero eliminar todos los registros de la columna codigo que coincidan con el numero de legajo 1

intento asi...
que es lo que estoy haciendo mal?

ENGLISH
I have a database socios.mdb
has a table that is cobradores
I want to delete all the records in the code column that match file number 1

I try like this...
What am I doing wrong?

DBPEXECSQL "socios" "DELETE FROM cobradores WHERE codigo = "1" ""

no se me ocurre otra forma porque usando el comando de eliminar registro normal me eliminaria solo el registro actual coincidence y yo necesito eliminar
todos los que tengan ese legajo....

I can't think of any other way because using the normal delete record command would delete only the current matching record and I need to delete
everyone who has that file....

@mishem,@vadim,@rcohen@rcohen

Hi  @joferar333

I'm sorry but it's been a lot of years since I messed with Database applications.   With that said, I'm thinking you would need to issue a Query to bring up all matching records and THEN issue a delete command.

Sorry I couldn't be of more help...

Gaev has reacted to this post.
Gaev

@joferar333

Is the Code field defined asText (String, Char etc.) or Numeric (Integer, BigInt etc.) ?

If it is defined as Text, take a look at the help file example here ...
https://neodbprohelp.visualneo.com/AdvancedSQL.html#dbpExecSQL

dbpExecSQL "AddrBook" "SELECT * FROM Contacts WHERE State = 'NY'" "Temp1"

... you need to use single quotes when inside a double quotes parameter ...

D

BPEXECSQL "partners" "DELETE FROM collectors WHERE code = '1' " ""

If it is a numeric field ...

DBPEXECSQL "partners" "DELETE FROM collectors WHERE code = 1" ""

Can't stress enough ...

1) as posted by @rcohen, why take the difficult route when NeoDBPro has commands to do the same ?

2) when stumped, READ THE HELP FILE before posting for Help on this Forum

luishp and alangonzalez91 have reacted to this post.
luishpalangonzalez91