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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 data from one table to another
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

101 Posts

Posted - 10/26/2010 :  08:50:50  Show Profile  Reply with Quote
I have a table test1 with folowing fields

empno| ND_Code first_in first_out TH_Code first_in1 first_out1
0134 9 8.00 18.00 0 0.00 0.00

i have another table test2 with

empno | Date |macin | macout | empin | empout

0314 | 10/10/2010 | 08:30 | 15:30

i want to insert into this table (test2) first_in and first_out from test1 table for (empin and empout) if day is sat-wed otherwise i want to insert
firstin1 and firstout1 from test1 table into (empin and empout) of test2

Premature Yak Congratulator

22864 Posts

Posted - 10/27/2010 :  04:15:14  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
Hint :

where datename(weekday,getdate()) in ('saturday','sunday','monday','tuesday','wednesday')


Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000