Query Failure

  • Thread starter Thread starter Abay
  • Start date Start date
A

Abay

I'm pretty much a newbie & am struggling with a failure in a query to update
a "Yes/No" field .. here's the SQL Code:

UPDATE [test client] SET [test client].Dep_rec_ind = "Yes"
WHERE ((([test client].Dep_amt_rec)>0));

Dep_rec_ind is defined as a "yes/No" Field
Dep_amt_rec is a "Currency" Field

The Query correctly selects the five rows which fit the criteria but then
gives an error message stating the query failed "due to a type conversion
failure".

Any help would be much appreciated.

Maggic
 
Replace
"Yes"
with:
True

The word in quotes attempts to assign a piece of text to a yes/no field.
Assigning the value True or False should work, i.e.:
UPDATE [test client] SET [test client].Dep_rec_ind = True
WHERE ((([test client].Dep_amt_rec)>0));
 
Should have figured that out!

Many thanks,
Maggic


Allen Browne said:
Replace
"Yes"
with:
True

The word in quotes attempts to assign a piece of text to a yes/no field.
Assigning the value True or False should work, i.e.:
UPDATE [test client] SET [test client].Dep_rec_ind = True
WHERE ((([test client].Dep_amt_rec)>0));

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Abay said:
I'm pretty much a newbie & am struggling with a failure in a query to
update
a "Yes/No" field .. here's the SQL Code:

UPDATE [test client] SET [test client].Dep_rec_ind = "Yes"
WHERE ((([test client].Dep_amt_rec)>0));

Dep_rec_ind is defined as a "yes/No" Field
Dep_amt_rec is a "Currency" Field

The Query correctly selects the five rows which fit the criteria but then
gives an error message stating the query failed "due to a type conversion
failure".

Any help would be much appreciated.

Maggic
 
Back
Top