-
Jan 9th, 2019, 10:40 AM
#1
Thread Starter
Junior Member
special sql string for rollcall
Hello
the personels who works in oil rig, 14 days work. and 14 days rest.
some of personels are Fixed and some of personels are not Fixed (Offset, or Alternative. I do not know what the English equivalent is)
i wants to design a database for rollcall (Attendance).
it is necessary to save records of personels who are not Fixed. but the fixed personels should not be saved in daily rollcall db.
because it Leads to exacerbation (Expanded). only the daily record of personels who are not Fixed must be saved in db.
now how can i get a sql string for data of a personels who are Fixed.
i have 2 tables.
first table have specifications of personels.(Fields: name, family, personelCode, FixedOrNot)
and secode have record of rollcall..(Fields: personelCode, DateOfWork, RigName)
Thanks
-
Jan 10th, 2019, 09:22 AM
#2
Re: special sql string for rollcall
Code:
Select * from personels P inner join
----Or left join, depends if it has a personelCode---
rollcall R on P.personelCode = R.personelCode
where P.FixedOrNot = 'Fixed' ---- or FixedOrNot = True or FixedOrNot = 1 , depends of your column definition.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jan 25th, 2019, 05:22 AM
#3
Fanatic Member
Re: special sql string for rollcall
well the program communicating with the DB can specify if they are fixed or not........ otherwise how can you tell????
if u cannot modify the program then find out what data it is sending and use that in the query to decide if a table needs updating or not using the WHERE clause....
Yes!!!
Working from home is so much better than working in an office...
Nothing can beat the combined stress of getting your work done on time whilst
1. one toddler keeps pressing your AVR's power button
2. one baby keeps crying for milk
3. one child keeps running in and out of the house screaming and shouting
4. one wife keeps nagging you to stop playing on the pc and do some real work.. house chores
5. working at 1 O'clock in the morning because nobody is awake at that time
6. being grossly underpaid for all your hard work
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|