Results 1 to 3 of 3

Thread: special sql string for rollcall

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2018

    Question special sql string for rollcall


    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)


  2. #2
    King of sapila
    Join Date
    Oct 2006

    Re: special sql string for rollcall

    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.
    Slow as hell.

  3. #3
    Fanatic Member
    Join Date
    Feb 2013

    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....
    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


Click Here to Expand Forum to Full Width