SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

pnasz
Yak Posting Veteran

97 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

madhivanan
Premature Yak Congratulator

India
22744 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')

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.03 seconds. Powered By: Snitz Forums 2000