Rebol Talk Forum  |  REBOL Discussions  |  REBOL Sand Box  |  RebDB  |  Topic: Accessing fields in an update statement
Pages: [1] Print
Author Topic: Accessing fields in an update statement  (Read 422 times)
GedB
Newbie
*
Offline Offline

Posts: 26


View Profile WWW
Accessing fields in an update statement
« on: January 26, 2004, 06:18:06 PM »

How would I access the fields in an update statement.

Say, for example, I wanted to set all Saleries to 30,000 for programmers I would  write

Code:
db-update/where employees Salery 30000 [Job = "Programmer"]

However, what if I wanted to increase all saleries by 10%?

This doesn't work:

Code:
db-update/where employees Salery [Salery * .10] [Job = "Programmer"]
Logged
Ashley
Newbie
*
Offline Offline

Posts: 37


View Profile
Accessing fields in an update statement
« Reply #1 on: January 26, 2004, 07:12:05 PM »

RebDB does not currently support expressions in either the set or select clause, so neither of the following is currently possible:
Code:
db-update/where Employees Salary [Salary * 1.1] [Job = "Programmer"]
or:
Code:
db-select/where [Salary * 1.1] Employees [Job = "Programmer"]
I need to add this to the doco as a limitation.
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Sand Box  |  RebDB  |  Topic: Accessing fields in an update statement
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 20, 2008, 04:35:44 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2190 Posts in 579 Topics by 1632 Members
Latest Member: Apodeptackked

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc