INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

update Hour and Half Hour in a column

update Hour and Half Hour in a column

(OP)
Hi All,

I want to add 2 columns: Hr and Half_Hr and update these column.

Table B: Hours
Hr, 	Half_Hr, Time_Start,  	Time_End
0,	0.1,	12:00:00 AM,	12:30:59 AM
0,	0.2,	12:31:00 AM,	12:59:59 AM
1,	1.1,	1:00:00 AM,	1:30:59 AM
1,	1.2,	1:31:00 AM,	1:59:59 AM
4,	4.1,	4:00:00 AM,	4:30:59 AM
4,	4.2,	4:31:00 AM,	4:59:59 AM
5,	5.1,	5:00:00 AM,	5:30:59 AM
5,	5.2,	5:31:00 AM,	5:59:59 AM
13,	13.1,	1:00:00 PM,	1:30:59 PM
13,     13.2,	1:31:00 PM,	1:59:59 PM
23,	23.1,	11:00:00 PM,	11:30:59 PM
23,	23.2,	11:31:00 PM,	11:59:59 PM
 

Table A: Transaction_Data
Item No, TDate, 	TTime, 	      Qty_Sold	Hr Half_hr
1,	 1-1-2015,       01:05:00 AM,	     5,
1,	 1-1-2015,       01:15:00 AM,	     7,
1,	 1-1-2015,       01:05:00 AM,	     5,
1,	 1-1-2015,       11:21:02 AM,	     7,	!	
1,	 1-1-2015,       11:58:33 AM,	     4,	!	
1,	 1-1-2015,       12:59:24 PM,        3,!
1,	 1-1-2015,       1:12:56 PM,         2, !  
1,	 1-1-2015,       1:44:16 PM,         1,!
1,	 1-2-2015,       01:54:54 PM,	     5,	!
1,	 1-2-2015,       01:59:16 PM,	     9, !
1,	 1-2-2015,       02:08:29 PM,	     4, !
1,	 1-2-2015,       02:39:35 PM,	     6,	!
1,	 1-2-2015,       3:48:14 PM,	     3,	! 
1,	 1-2-2015,       12:59:24 PM,        10,! 
1,	 1-2-2015,       11:32:17 AM,        11,!
1,	 1-2-2015,       1:10:25 PM,         2, ! 
 
Comma is only added for reference/conversion purpose.

Transaction data will check table B and updated column Hr and Half_Hr

Below query misses value in Hr marked as ?

CODE

SELECT tbl_A.TTime, (select hrs from tbl_B.Hr where (tbl_A.TTime between tbl_B.Time_Start And  tbl_B.Time_End) FROM tbl_A); 
Is there way to update the column using Access SQL?

Appreciate your help.

Thks,
TechIT

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close