"missing keyword"

Julia Kurakula 41 Reputation points
2023-11-08T15:16:56.0566667+00:00
Below is the code snippet for the user to show the standard hours= 40. But it's not shows this errror""missing keyword" *Action: Error at Line: 1 Column: 36'. Please help me edit the below code in such a way that it meets the given paramenters :-

select nvl(sum(labor_time),0) into l_vccan_009_hours
        from ets.ts_header h, ets.ts_lines l, ets.ts_line_time lt, ets.project p, ets.std_time_off_tasks o, ets.hr_people hp
        where h.ts_end_date = l.ts_end_date
        and h.ts_header_id = l.ts_header_id
        and l.ts_end_date = lt.ts_end_date
        and l.ts_line_id = lt.ts_line_id
        and p.project = l.project
        and h.ts_end_date = p_end_date
        and h.pers_id = p_person
        and (l.pay_type = 'R'
        or l.pay_type = 'N')
        and hp.paygroup in('C08', 'CEX', 'C44', 'NE', 'CJV', 'CWK')
        and o.project_type = p.project_type
        and o.compensated_flag = 0
        and o.phase = ets.get_task_segment(l.task, 1);

	select standard_hours into l_vccan_009_standard_hours
	from ets.hr_people hp 
	where hp.pers_id = p_person;
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,055 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 103.2K Reputation points MVP
    2023-11-08T22:48:34.59+00:00

    You have tagged this question SQL Server, but the error message does not likely anything from SQL Server. Furthermore, I notice the function nvl, this is not a function in SQL Server. With help of Google I found that this is an Oracle function. It may be the same as isnull in SQL Server.

    As for your list of requirement, we generally don't like to help with class assignments and similar here. We can help with specific aspects of your problem, but it would be wrong to write the code for you - then you would not learn anything.

    0 comments No comments