MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 2nd, 2004, 03:09 AM
nrasool nrasool is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 nrasool User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Updating a field in MS2000 table using SQL query

Hi there

Please could some of you sql guru help me with the following issue. I am learning sql in Access and want to do the following

I have created 2 tables in Access
[Table] BoatTable
[Table] BookingTable

My table look like the following

[BoatTable] Table
BoatId BoatName PricePerDay
1 SEA STAR £120.00
2 BLACK THUNDER £150.00
3 SEA CRUSH £200.00
4 CRYSTAL £225.00
5 BLUE WAVE £250.00
6 QUEEN OF THE SEA £290.00

[BookingTable]
BookingId BoatId Duration Total
B001 6 2 £0.00
B002 3 4 £0.00
B003 2 3 £0.00
B004 4 2 £0.00
B005 2 4 £0.00
B006 1 5 £0.00
B007 4 3 £0.00
B008 6 2 £0.00
B009 3 4 £0.00
B010 5 5 £0.00


Boatid is the relationship between BoatTable and BookingTable. I want to update BookingTable.Total field, so i have done a query like the following;

[Field] Update BookingTable.Total = (BookingTable.Duration * BoatTable.PricePerDay)

However, for the query i need to reference the boat id

Please could someone kindly tell me how to fill in Total in Bookingtable to be Price per day times number of days with referencing the boatID

Many thanks for your time

Kind Regards

Nadeem

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Updating a field in MS2000 table using SQL query


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway