Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Can this SQL bee written?

Author  Topic 

MikeB
Constraint Violating Yak Guru

387 Posts

Posted - 2003-02-05 : 17:31:23
Can this be done?

I want an SQL Statement (for access 97) that can accomplish the following:

if there are no records in tbl where id_field = some value
insert new record set id_field = some value and quantity = some value
else
update quantity = some value where id_field = somevalue

Any ideas?

Mike B

KnooKie
Aged Yak Warrior

623 Posts

Posted - 2003-02-10 : 06:07:17
You can achieve this easily using a recordset and some VBA code IF....THEN....ELSE. Is this different to your needs ??

if i find the time i will post the code

===========
Paul
Go to Top of Page
   

- Advertisement -