var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: need help with sql
I need some help.
I am trying to delete records from a table where an in-use flag is set to the number zero (integer format in the table).
I am using these lines:
SQL = "delete from parts_category_tbl where still_in_use = 0"
But when I run it, I get an "Enter parameter value box" with "still_in_use" parameter. If I enter a number, a warning message that I am about to delete all the records appears.
Can somebody help please?
Check your spelling and character placement. That is usually my problem when I see the Parameter box. also, although probably not necessary, you might want to go ahead and say
SQL = "delete from [parts_category_tbl] where [parts_category_tbl].[still_in_use] = 0"
try it in the query builder, then check out your SQL. That might help.
A few minutes after posting (after around 30 minutes trying to figure out what was wrong!!!) dioscovered that I was using the wrong table!!!
Obviously the field still_in_use was not there!
SQL = "delete from parts_category_tbl where parts_category_tbl.still_in_use = 0;"
It that doesn't work try not to use "_" in your table/field names instead make them:
MS may stop after the first "_"; it's how they name procedures ie. "procName_click".
underscores in table and column names are just fine
Last edited by r937; 08-30-04 at 18:20.
Try opening the table as an attachment and delete the record.
If it won't delete there is something wrong with the definition.
I.e. No unique index
Null fields where nulls are not allowed.