December 29, 2005 at 8:43 am
How can I update a bit filed when I use a select statement, like
SELECT Acct FROM Emp WHERE Inactive = 0 AND
code = 5032 AND fileSent = 0
when i select the above statement I want to update filesent field to 1
December 29, 2005 at 8:55 am
You need to use an update statement in order to update
For the above result,
UPDATE emp
SET fileSent = 1
WHERE Inactive = 0
AND code = 5032
AND fileSent = 0
.. should do it.
/Kenneth
December 29, 2005 at 8:58 am
No,
whatI mean is when I select a record in my application, I want to make it as true in my bit filed. pls help.
December 29, 2005 at 9:04 am
Eh..?
You mean like 'how do I turn a tick in my box in the windowsform' type thing..?
Sorry, but I'm lost to what your problem is.
You need to explain more what you mean by 'application' and what 'bit field' is in this case.
/Kenneth
December 29, 2005 at 10:45 am
you would need to do it in 2 steps. You cant SELECT and UPDATE at the same time.
******************
Dinakar Nethi
Life is short. Enjoy it.
******************
December 29, 2005 at 11:16 am
Probably the best way would be to create a stored procedure that SELECTs the data you want and then UPDATEs the bit. Then have your application run the stored procedure.
-SQLBill
December 30, 2005 at 2:25 am
I think we need a more generic explanation in simple words to what the real problem is - that is, what is the purpose - instead of the specifics of 'how to do x on y'..?
/Kenneth
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply