Please help me to find simple mathod to get working hours

Please help me to find simple mathod to get  working hours .The following is my script
ardate is date argument  in afunction
id would be integer argument
Choose  case  dayname(ardate)
  case  'monday'
select mon_hrs
into:l_db_hrs from workhrs
where empid= :id;
  case  'tuesday'
select tue_hrs
into:l_db_hrs from workhrs
where empid= = :id;
  case  'wednesday'
select wed_hrs
into:l_db_hrs from workhrs
where empid= = :id;
 End  Choose
With Many Thanks
polachan

Hi polachan,
Since this is SQL Server forum, as other post, you need to describe your table structure, the data and expected results. Then it is appropriate and more experts will assist you in there.
According to your code message, it does not regards SQL Server T-SQL statement. We need to verify if there are two tables (workhrs and I_db_hrs), after checking the values of “ Monday”,”Tuesday”,”Wednesday” from the workhrs table, then copy the related working
hours into the new table (I_db_hrs),  right?
If yes, you can refer to the following T-SQL statement.
create table workhrs
(id int, workname varchar(20), ardate varchar(10), hrs int)
insert into workhrs
values
(1, 'A','monday',1),
(1, 'A','tuesday',3),
(1, 'A','wednesday',5),
(2, 'B','monday',1),
(2, 'B','tuesday',1),
(3, 'C','monday',1),
(3, 'C','wednesday',2)
select * from workhrs
select id, ardate, hrs into I_db_hrs from workhrs
select * from I_db_hrs order by ardate
---the result:
id ardate hrs
1 monday 1
2 monday 1
3 monday 1
2 tuesday 1
1 tuesday 3
1 wednesday 5
3 wednesday 2
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support

Similar Messages

  • Need driver for canon mg 5250 as scanner is not working with version 10.7. Can you please help me to find the driver so scanner works with WIFI?

    need driver for canon mg 5250 as scanner is not working with version 10.7. Lion. Can you please help me to find the driver so scanner works with WIFI?

    Try with the latest Apple driver package for Canon (released 15th Feb):
    http://support.apple.com/kb/DL899
    This solved my problem with the printing.

  • Please help me to find my iPad and iPhone 5C. I lost all of them last night. I set up icloud for my devices but i can't find them because they were not connect to the Internet. Please guide me other ways to find my "best friends".

    Dear Apple,
    Please help me to find my iPad Air 2 64 GB and iPhone 5C 8GB. They're in IOS 8.0 maybe...I lost all of them last night. I set up icloud for my devices but i can't find them because they were not connect to the Internet. Please guide me other ways to find my "best friends". They're very important to me. Many important files for my job in here and it has sentimental value to me. My boyfriend gave it for me so i don't want to lose them. And because i just lost my iPad Air last 3 month, and now i just bought iPad Air 2 two months ago. I'm so sad and lost. I want to catch the thief to the police so bad because they keep my bag and many other important things. I can not do anything without them. Please help me and contact me via my email or my phone. Thank you very much. Hope to receive your answer soon.

    Hey there thaovy309,
    Welcome to Apple Support Communities.
    The linked article below provides a lot of great information and suggestions that should address your concerns about your data and finding your lost or stolen iPhone 5c and iPad Air 2.
    If your iPhone, iPad, or iPod touch is lost or stolen - Apple Support
    Take care,
    -Jason

  • PLEASE HELP ME TO FIND THE SOLUTION REGARDING "LOGICAL SYSTEM CHANGED"

    HAI EVERYBODY,
    PLEASE HELP ME TO FIND THE SOLUTION REGARDING "LOGICAL SYSTEM CHANGED" during the material master replication by using middleware parameters.
    step1 : i have taken SRM client 810 and named it as CHINNISRM
    step2 : i  have taken r3 client 810 and named it as CHINNIR3
    step3: During material master replication i maintained tables like crmconsum,crmrfcpar,crmparoltp in   r3   and smofparsfa in srm client and filtered the objects and loaded the objects through r3ac3,r3ac1,r3as.
    step4 : And later i have checked in r3 queues to activate the objects,but i have seen a message like  "LOGICAL SYSTEM CHANGED:SEE 588701".according to the oss instructions i have checked in CRMPRLS table in se16 in R3 .there i found out there is one logical client  named with T90CLNT810.
    oss :588701
    Solution
    There are different cases in which different forms of processing are
    required or where several options exist:
    - The logical system name of an R/3 Backend client was changed in
    current operation. In this case, the data hangs in the outbound
    queues of the R/3 Backend system as specified under point 1 of
    the symptom. In this case, the logical system name must be
    changed back to the original value. Then the outbound queues
    can be reactivated. If no data was transferred to the EBP/CRM
    server before the change, also a correctioin of the check table
    is possible.
    - The same logical system name was used again in a new client of
    an R/3 Backend system that was linked to the EBP/CRM server. In
    this case, the data is in the inbound queue of the EBP/CRM
    server with the exception GUID_FOR_LOGSYS_CHANGED. In this
    case, the queue entries which have status SYSFAIL must be rejected, however, not the entire queues. If the new client of  the R/3 Backend system you have linked has exactly the same
    data as the old client and if it is meant to replace the old
    client (that is, this was deactivated), also a correction of
    the check tables is possible. In this case, the inbound queues
    can be reactivated after the correction.
    oss:765018
    1. If the situation in your system corresponds to the situation described
    under "Reason and Prerequisites" and if symptom 1 occurs, you can
    delete the table entry from table CRMPRLS table (there is just one
    entry). Since there is no maintenance dialog for this table and you
    cannot maintain it using transaction SE16, you must use a report to
    delete it. This report is attached to this note as correction
    instructions.
    Create the report ZZ_DELETE_CRMPRLS in your system and copy the source
    code from the correction instructions. You cannot implement this
    source code using transaction SNOTE.
    You can use the report in every plug-in or plug-in basis system, even
    if it is not specified in the validity section.
    After you have run the report, you can trigger existing queues again
    in transaction SMQ1.
    2. If the situation in your system corresponds to the situation described
    under "Reason and prerequisite" and if symptom 2 occurs, you can
    delete the entry from table CRMMLSGUID (there is just one entry).
    Since there is no maintenance entry for this table and you cannot
    maintain it using transaction SE16, you must use a report to delete
    it. This report is attached to this note as correction instructions.
    If they do not yet exist, add the following messages to message class SMOF in your logon language:
    Message Message short text
    303 User &1 is not allowed to change table &2.
    304 User &1 IS not allowed to display table &2.
    305 Logical system &1 was not found in table &2.
    306 System error! The current client was not
    found in table T000.
    Create the report ZZ_DELETE_CRMMLSGUID in your system and copy the
    source code from the correction instructions. You cannot implement
    this source code using transaction SNOTE.
    You can use the report for every release of the CRM system, even if it
    is not specified in the validity section. The only exceptions are CRM
    releases with Support Package versions that are too low such as CRM
    Release 3.0 with Support Package 12.
    After you have run the report, you can trigger existing queues again
    in transaction SMQ1 of the R/3 back-end system or transaction SMQ2 of
    the CRM system.
    so what should i do to do the replication.please suggest me .untill and unless i solve my problem i cant move to the further activity.i hope you people can solve my problem.thanks in advance.
    thanks and best regards,
    n.chakradhar

    Hi chakradhar,
    Did you find a solution to your issue? We are facing a similar issue and looking to figure out how this can be resolved.
    BR// 420

  • Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it. 
    Alex D
    Applications Engineer
    National Instruments

  • HT1937 I would like to help me. My iPhone was lost and stolen and I didn't have configured Find My iPhone. So I could n't find it. Please help me to find it or delete my information and photos. This is my serial No: DN*****TWD. Thank U

    I would like to help me. My iPhone was lost and stolen and I didn't have configured Find My iPhone. So I could n't find it. Please help me to find it or delete my information and photos. This is my serial No: DN*****TWD.  
    <Personal Information Edited by Host>

    If you didn't set up Find My iPhone, there's nothing we can do to help you. Sorry.

  • I need to swich from us store to saudi arabian store, please help me to find solution.

    i need to swich from us store to saudi arabian store, please help me to find solution.

    See  >  Change your iTunes Store country
    Here  >  http://support.apple.com/kb/HT1311

  • Please help me in finding link to downlaod oracle BI discover

    Please help me in finding link to downlaod oracle BI discover
    i didnot find discover in obiee so where can find
    Thanks in Advance

    Hi,
    Discoverer is part of BI Standard Edition. You can down load BI from here. You need the 2 CDs for Discoverer Plus and Viewer and the Tools CD for Discoverer Admin and Desktop.
    You should also apply the patches to go to the latest version. The LearnDiscoverer blog has details of the latest patches.
    Rod West

  • Why is my ipad doesnt have a software update?please help,i cannot find it.. :(

    why is my ipad doesnt have a software update?please help,i cannot find it..

    The ipad 1 (no camera) can't be updated beyond IOS 5.1.1.

  • Please help me to find out how to turn off the shuffle feature on my touch i-pod, Please help me to find out how to turn off the shuffle feature on my touch i-pod

    Please help me to find out how to turn off the shuffle feature on my I-pod nano ... THANK YOU!!!!!! :)

    Just figured it out :) Thanks though!!!

  • I lost my Touch I pod. Please help me to find it.

    Please help me to find my i pod.

    Is your iPod online or offline? If it's offline or physically turned off; no power. Your only option is to physically go look for it. If your online and you set up find my iPhone with iCloud you should be able use that to help you, BUT if you did not set this up before you lost the iPod, I believe your back to physically go look for it, sorry. Good luck.

  • Can anybody please help me to find out the link where small co.

    can anybody please help me to find out the link where small companies implementing saps.

    Hi,
         SAP is providing a solution to Small Scale Industries with SMB (Small and Midsize Business) Product for various industries. It's a Pre configured SAP Solution pertaining to a specific industry(like Pharma, Oil..etc) with which the implementation as well as the cost will also decreases.
    Regards,
      Jayaram...

  • Please help me to find out windows 7 home premium product key

    Please help me to find out windows 7 home premium product key .My windows product ID is 00359-OEM-XXXXXX-XXXX
    my pc have sticker but is damage ...only can see last is -RXWJ8-XXXXX

    Hi,
    Please don't disclose any product key information in here. This is public and open place to discuss Windows 7 problem. It's dangerous for any personal information.
    Also, since the Windows is brought with OEM computer, maybe you could try to contact the manufacturer for help.
    Karen Hu
    TechNet Community Support

  • My mobile phone is lost, please help me to find the serial number is: DNQKDBS8F8H4, my name is Yu Fan, thank you very much for this is my number: 15052995201

    My mobile phone is lost, please help me to find the serial number is: DNQKDBS8F8H4, my name is Yu Fan, thank you very much for this is my number: 15052995201

    We're not Apple here.  We're users.  We cannot locate your phone any more than you could locate ours.
    If you did not have find my phone activated on your device, there's no way to track it.

  • I am not sure that I deleted Iphoto, but Iphoto desapeared. I don't have original disc. Can you, please help me , to find it somewhere on my mac?

    I am not sure that I deleted Iphoto, but Iphoto desapeared. I don't have original disc. Can you, please help me , to find it somewhere on my mac?

    The iPhoto application should be in your applications folder
    If you have removed it and your computer came with restore disks then you will need them to reinstall. Or you can purchase a version on DVD or from the App Store. Apple my be able to reace missing restore disks for a nominal charge
    LN

Maybe you are looking for