How should i write a pcr for this requirement?
Dear Friends,
Can any tell me whether we can write a pcr in such a way that if the person resigns the company on any day after 15th his full absence quota(for that month) should be accrued.
if yes can you tell me
what are the key decision parameters i have to use in writing the pcr.
waiting for you kind reply.
Regards,
Sai Prasad.
Hai Prasad,
I can give you the logic, cannot write exact rules.
While genegarting absence quota
- Check for termination action using OUTWPMASSN
- If yes
Check for Action year current year. (HRS=YSAY, HRS?CURYR)
- If its equal to 0
Check for current month (HRS=YSAO, HRS?CURMO)
- if its equal to 0
check for current day (HRS=YSAA, HRS?CURDY
- if its >=15
generate quota
- Exit
(Note: for this logic you have to generate monthly quota)
With regards
Shyam V
Similar Messages
-
How should i write a query for this?
Hi i give the follwing query to implement the result,
IT will gives you the result of one country machines information like Total machines failed machines and success machines of their count
Countyr Name CountryCode Total Machines Failed Machines and Succes machines and their perentage
IT ITALY
1000 20
980 98%
like these i want to display the 16 countyr machines information all country information in one palce like table format
i will give you the query to the below here it is the combination of powershell code also used here with sql code.
Code as Country
Name as Country
And below i mentioned OU in bold every where i will put the country code according to the country
like OU=FR
Select
'FR' as 'Code',
'FRANCE' as 'Name',
(select COUNT(*) from ADComputersInfo where
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
(select COUNT(*) from ADComputersInfo where
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations_Indus,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
(select COUNT(*) from ADComputersInfo where
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Servers,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
(select COUNT(*) from ADComputersInfo where
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations_Indus,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Servers,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
(select count(distinct(cn)) from ADComputersInfo where
(ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations_Indus,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Servers,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com')
and cn in (select name0 from v_R_System)
(select count(distinct(cn)) from ADComputersInfo where
(ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations_Indus,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Servers,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com')
and cn not in (select name0 from v_R_System)
select count(distinct(cn)) from ADComputersInfo where
(ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations_Indus,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Servers,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com')
and cn in (select name0 from v_R_System where Client0 =1 and Obsolete0 =0)
select count(distinct(cn)) from ADComputersInfo where
(ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Workstations_Indus,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com'
or
ObjectPath like 'LDAP://eur.gad.schneider-electric.com/CN=%,OU=Servers,OU=FR,OU=Countries,DC=eur,DC=gad,DC=schneider-electric,DC=com')
and cn not in (select name0 from v_R_System where Client0 =1 and Obsolete0 =0)
So here i pass the County code and country name and OU=FR(assigned country code )
so hw we can all these 3 values in all the query can give me the r8 query for this . And i will get the all 16 country information
Ineed exact query hw we can implement..........................................
I might be excepting lot from our side guys...
Thanks !
AdvancedHi
Can you simple post sample data + desired result? Always state what version you are using..
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to write a PCR for this ?
Hi SAP-HR Experts .
Dear friends , My Company Requires a specific requiremnt that at the date of any Employee's
B'day his one day salary should get doubled and he is entitled to get one leave on his B'day .
I do not know how to write a PCR for this ?
May some Body tell me how to meet this requirement Please .
tell me please step by step how to go through ...
It will be great help for me .
Best regards : rajneeeshI think you can make it with something like this:
Write a PCR in schema, you can call the rule with "actio";
000860 ACTIO 9BIR AR Birthday
Rule 9BIR
9BIR Rule for Birthday
NUM=FG C Set " F (fixed indicator for deadline calculation); G (Birth date from infotype 0002);C (complete months)
NUM/12 División " Number of completed months divided by 12
NUMV0O2L Off.Lng en arg.var. " the last two places of the number are entered in the variable argument.
" if the rest is not 00, there is nothing to do
00 " if the rest is 00
ZERO= N AmtNumRteZeit = 0 "
AMT= 1002 Set " wagetype of salary
AMT/TKDIVI División " divides the amount by Partial Period Parameter Whole Month
ADDWTI1002 Input table " accumulates into 1002
Example: an employee with birthday 01.01.1977 in IT0002
Payrroll in january 08
wagetype 1002 before rule 9BIR:
3 1002 Salario Bas01 30,33 30,00 909,90
Rule 9BIR
NUM=FG C Set; NUM= 372
NUM/12 ; 372/12= 31 rest=00
AMT=1002 ; AMT= 909,90
AMT/TKDIVI ; 909,90/31= 29,35
ADDWTI1002 ; 909,90 + 29,35= 939,25
wagetype 1002 before rule 9BIR:
3 1002 Salario Bas01 30,33 30,00 939,25
Hope this helps. Manuel -
Please help me to write a function for this requirement!
Hi,
I have created a stored procedure which accepts 2 input parameters (param1 & param2 ) and its output is 'Score'
Eg:
Exec uspScorecalculation StudentID,DeptID
output: 85
Now, My requirement is , I want to populate this value as one of the columns in a 'Select' statement.
Can you please give me some input like how can i write a funtion to retrieve this score from the procedure and use it in the select statement?
I assume, the funciton should pass the two parameters into the stored procedure 'uspScorecalculation' and retreives the Score.
Can you please help me on this?
thanks!>> I have created a stored procedure which accepts 2 input parameters (param1 & param2 ) and its output is 'Score' <<
We have no idea from this posting what this procedure does. No code. No spec. Only a vague, useless narrative.
We do not put that silly “usp_” prefix on a proc name; this is one version of tibbling. When we wrote in FORTRAN I and II, we had to put “fn_” on user functions name. A procedure uses a “<verb>_<object>” format. Have you read ISO-11179 Standards
or any book on data modeling?
EXEC Calculate_Something_Score student_id, dept_id;
>> Now, My requirement is, I want to populate this value as one of the columns in a 'SELECT' statement. <<
Populate a column? We do not do that in a declarative language like SQL. The row with that column comes into existence all at once, and all the rows in the table come into existence all at once. This is a set-oriented language.
>> Can you please give me some input like how can I write a function to retrieve this score from the procedure and use it in the SELECT statement? <<
NO! An SQL programmer will take the body of the procedure and replace the parameters with column names. It will be part of a SELECT statement and not a function call. We hate UDFs and other procedural constructs.
Please post the code and DDL, if you want help. Your failure and rudeness in not following Netiquette only hurt yourself. Your mindset is still locking into 1960's FORTRAN, not SQL.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
How can i write sql query for this result ?
Hello Dear,
Here is the script first.
CREATE TABLE ACC_TEST(
AD_ID NUMBER,
AD_NAME VARCHAR2(50),
AD_SPM_ID NUMBER);
/data are
Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (136,'Saleh Ahmed',129);
Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (142,'Hamidur Rahman',136);
Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (124,'Jasim Uddin',null);
INSERT INTO ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) VALUES (129,'Sazib',124);I Need The Following Result When I Pass A Value Of Ad_Id. For Example I Pass 142 Then Result Should Be
Select Ad_Id,Ad_Name
From..
where ad_id=142
Ad_Id Ad_Name
136 Saleh Ahmed
129 Sazib
124 Jasim Uddin
If I Pass Ad_Id=136 Then Result Should Be
Ad_Id Ad_Name
129 Sazib
124 Jasim Uddin
If I Pass Ad_Id=129 Then Result Should Be
Ad_Id Ad_Name
124 Jasim Uddin Database 10G XE
Any help will be helpfulHi,
HamidHelal wrote:
WoW ! you acutely got my point. How did you understand that ? lLuck guess. Guessing is usually not the best way to solve problems. It's usually faster and more reliable to say exactly what you want, as well as give an example.
ittle bit more i want to know, if i want to restrict the output not more then 2, what would be sql ?Now you're not even giviing an example!
Maybe you want something like this:
SELECT ad_id
, ad_name
FROM acc_test
WHERE LEVEL BETWEEN 2 AND 3 -- Changed
START WITH ad_id = :target_ad_id
CONNECT BY ad_id = PRIOR ad_spm_id
;which will show jsut the parent and the grandparent of the given row.
I do work with forms developer very much. Sql knowledge is as oracle sql book(cerfitication 9i). But this type of sql isn't available there.
where can i learn this type of sql ? Different sql then ordinary ?Certification is a different topic entirely.
There are books and web sites dealing with more advanced techniques. Sorry, I don't know any well enough to recommend them. Some authors (such as Tom Kyte) are consistently good.
Here are a couple of sites that explain CONNECT BY queries:
http://www.adp-gmbh.ch/ora/sql/connect_by.html
http://www.oradev.com/connect_by.jsp -
How can I write the loop for this?
public void currentConnectedPlayers (String[ ] connectedPLayers)
//connectedPlayers contains the names of players connected to the server.
//Display the list of connected players, but SELF is not included in the display list
how will I be able to identify "self" within the loop, in order to exclude myself from beig listed....but in coding... i should use "this" instead of
"self"
shoudlnt I?!Never "this" is not a string it is a class, only if it extends String Class,
Since the users are stored in a String array, we need to know what is the information you put in that array is it name, id .
>
otherwise got error -
How can I write a query for this table?
Dear friends
I have a table with the following structur and data
ID Name Value
1 book 100
2 book 200
3 car 25
4 car 35
5 book 300
now I would like write a query with following out put
Name value
book 100 , 200 , 300
car 25 , 35
(with , Separator) (my oracle version is 10g)
thanksTry this,
SQL> WITH t AS(SELECT 'book' NAME, 100 VALUE FROM dual UNION ALL
2 SELECT 'book', 200 FROM dual UNION ALL
3 SELECT 'car', 25 FROM dual UNION ALL
4 SELECT 'car', 35 FROM dual UNION ALL
5 SELECT 'book', 300 FROM dual)
6 SELECT NAME, LTRIM (MAX (SYS_CONNECT_BY_PATH (VALUE, ',')), ',') VALUE
7 FROM (SELECT NAME, VALUE, ROW_NUMBER () OVER (PARTITION BY NAME ORDER BY VALUE) rn FROM t)
8 START WITH rn = 1
9 CONNECT BY PRIOR rn + 1 = rn
10 AND PRIOR NAME = NAME
11 GROUP BY NAME;
NAME VALUE
book 100,200,300
car 25,35
2 rows selected.
SQL> G. -
How can I write a query for this?
I have a table as below ,
room.........date.............inventory
A..............01/01.................5
A..............01/02.................5
A..............01/03.................5
A..............01/05.................5
A..............01/06.................5
A..............01/07.................8
I want the output as below
room.....begin_date........end_date......inventory
A............01/01.................01/03..........5
A............01/05.................01/06..........5
A............01/07.................01/07..........8
Is there any suggestion?
Thanks
nullwith x as
(select 'A' room, to_date ('01/01/2007', 'mm/dd/yyyy') d, 5 i from dual union all
select 'A' room, to_date ('01/02/2007', 'mm/dd/yyyy') d, 5 i from dual union all
select 'A' room, to_date ('01/03/2007', 'mm/dd/yyyy') d, 7 i from dual union all
select 'A' room, to_date ('01/04/2007', 'mm/dd/yyyy') d, 7 i from dual union all
select 'A' room, to_date ('01/05/2007', 'mm/dd/yyyy') d, 5 i from dual union all
select 'A' room, to_date ('01/06/2007', 'mm/dd/yyyy') d, 5 i from dual
select min (d)
, max (d)
, min (i)
from (
select room
, d
, i
, max (g) over (order by d) mg
from
(select room
, d
, i
, case when lead (i) over (partition by grp order by d) = i
then rownum
end g
from (
select room
, d
, i
, d - rownum grp
from x
order by d
group by mg -
How to create a generic SP for this requirment
Hi all,
i have a requirment like .....i have 10 sp's (sp1,sp2,sp3.....sp10) in a package named as 'generic_pkg'.
procedure sp1 (abc IN varchar2,
parameter IN varchar2,
sp_out1 OUT varchar2);
procedure sp2 (xyz IN varchar2,
parameter IN varchar2,
sp_out1 OUT varchar2,
sp_out2 OUT varchar2);
procedure sp3 (pqr IN varchar2,
parameter IN varchar2,
sp_out1 OUT varchar2,
sp_out2 OUT varchar2,
sp_out3 OUT varchar2);
procedure sp10 (pqr IN varchar2,
parameter IN varchar2,
sp_out1 OUT varchar2,
sp_out2 OUT varchar2,
sp_out3 OUT varchar2,
sp_out4 OUT varchar2,
sp_out5 OUT varchar2,
sp_out6 OUT varchar2,
sp_out7 OUT varchar2,
sp_out8 OUT varchar2,
sp_out9 OUT varchar2,
sp_out10 OUT varchar2);
now i want to create a new SP. the new sp is having input parameters as
procedure new_sp (sp_name IN varchar2,
parameter IN varchar2,
sp_output OUT varchar2);
now i will get sp name as input parameter and i have to check whether that sp is there on generic_pkg package or not.
if sp found , then i have to call that sp and have to return output.
the new_sp should be generic(i.e the new_sp should compatable to call any sp in the package 'generic_pkg'). my doubt is all the 10 sp's are having same inputs, but different no of outputs. How can i make new_sp as a generic sp?
procedure new_sp (sp_name IN varchar2,
parameter IN varchar2,
sp_output OUT varchar2); ---- ? how to handle?
please anybody can guid me with example....
thanks in advance.....
Edited by: user9041629 on Sep 7, 2010 6:01 AMYour 'requirement' of being able to submit a procedure name as parameter will result in using dynamic SQL all over the place.
Consequently you violate the very reason why PL/SQL was invented: to diminish parsing
I pray you don't have any customers who are going to buy this 'product'. They are not to be envied.
I pray also you have a good lawyer.
Sybrand Bakker
Senior Oracle DBA -
How to use time series functions for this requirement
we are on OBIEE 11g (11.1.1.5)
Any pointers and links are really helpful.
I have a requirement where YTD sales are displayed in a column. We wan to compare that number to what that number was last year at the same time. Tried to use TODATE, AGO and it did not work.
|| used for column seperation below.
ProductGroup || YTD Sales Rev||YTD Sales Rev 1 Year Ago||YTD Sales Rev 2 Years Ago
Climate Solutions || 1.7 mil (1/1/2011 - 7/1/2011) || 1.45 mil (1/1/2010 - 7/1/2010) || 1.15 mil (1/1/2009 - 7/1/2009)
Thanks in advance
kris
Edited by: user566193 on Aug 10, 2011 6:06 PMKris,
Basically you want to combine the 2 time series functions here i.e. TODATE & AGO.
Here you go..
You can create first a YTD logical column in BMM say YTD Sales Rev..Then create another logical column with calculation as AGO(YTD Sales Rev, YEARDIM, 1) or AGO(YTD Sales Rev, MONTHDIM, 12).
Similarly, you create other measures...OBIEE 11g has time series function in Answers as well but I'd say try to create using RPD as you to calculate 1 logical column based on another. Better to push it on RPD side.
Hope this helps -
How to write Select statement for this codition
I need to check whether SGTXT contains BELNR value.
SGTXT is a text field and It should be matched with BELNR
How to write select statement for this.
Select AUGBL AUGDT into t_BSAD
from BSAD
where SGTXT should have the given BELNR Value.
Plz note : Here I cannot give as SGTXT = BELNR as coz BELNR have only 10 digits.Hi,
data temp(12).
concatenate '%' belnr '%' into temp.
Select AUGBL AUGDT into t_BSAD
from BSAD
where SGTXT like temp.
If belnr is having multiple values,just create a internal table as follows.
types : begin of ty,
belnr....
temp(12),
end of ty.
data itab_ type standard table of ty.
data wa type ty.
loop at itab into wa.
concatenate '%' wa-belnr '%' into wa-temp.
modify itab from wa index sy-tabix transporting temp.
endloop.
Change your select statement accordingly.
Kindly reward poits if it helps. -
How to write complex sql for this
Hi ALL,
I have a requirement like this
I have 5 tables which i have to join to get the result
but there no join column to 2 other table.
I want to get all the applications using cobal,running on UNIX.
How to write the query for this
1.APP
APP_i DESC
1 Accounts
2 Payments
3 order transfer
4 Order processing
2.Techgy
techid techdesc
1 cobal
2 Java
3.APP_Techgy
APP_I Techid
1 1
2 1
3 1
4 2
4.Pltfrm
pltfmid pltfrmdesc
1 Windows NT
2 UNIX
5.APP_Pltfrm
APP_I pltfrmid
1 1
2 1
3 2
4 2
ouput must be
APP_i Desc techDESC pltfrmdesc
3 ordertranfer Cobal UNIX
Thanks in advanceThis ('descr' in place of 'desc')?
SQL> select a.app_i, a.descr, t.techdesc, p.pltfrmdesc
from app_techgy atc,
app a,
techgy t,
app_pltfrm ap,
pltfrm p
where atc.techid = t.techid
and atc.app_i = a.app_i
and atc.app_i = ap.app_i
and ap.pltfrmid = p.pltfmid
order by a.app_i
APP_I DESCR TECHDESC PLTFRMDESC
1 accounts cobal windows nt
2 payments cobal windows nt
3 order transfer cobal unix
4 order processing java unix
4 rows selected. -
How can I write HTML code in this forums
Sorry but I didn't know where to post this thread.....
How can I write HTML code in this forums?Hello,
Every piece of code in your post should be wrapped with the forum tags [ code] and [ /code], without the blanks.
In case of the <a> tag, that is not enough. In this case, you have several options. The most elegant one is to use the entity name for the less-then sign - & lt; - without any spaces. Other options is to add a space between the less-then and the ‘a’ character (and make a note of it) or change the less-then character with a left bracket one.
When posting code, you should always use the forum preview option, just to make sure the forum software “understood” your code correctly.
Hope this helps,
Arie. -
How can we write the code for opening the command prompt and closing the
how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)
rakeshsikha wrote:
how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)? -
HT201991 How does one write a review for an app?
I would like to write a review for an app I bought from the App Store.
"Locate the item that you would like to write a review for."
Where? In the App Store via the internet (e.g. on my iMac), OR via the App Store button on my iPad Mini?
"Click "Write a Review" in the Customer Reviews section."
How? I could find no active link associated with the Customer Reviews section once I had located the item for which I wanted to write a review.
So the question remains "How does one write a review for an app?" … and, so far as things stand, the instructions provided in the page <http://support.apple.com/kb/ht3928> are, as far as I can tell useless. Certainly, the Apple website and associated instructions have become, for this long-time user, more akin to Microsoft Windows in their impenetrable lack of intuitive, user-friendly ccharacter.
Oh yeh. To add to my 'disgruntledness' … How come there is no iPad Mini option in the Product drop down below?
Where is Steve Jobs when you need him?!I have been having this issue for months, now--at least 3-4. I updated my credit card info on my account, thinking maybe that would do it, but NOPE--can't review a single thing I've ever purchased in iTunes--not from my iPhone 5, PC or iPad 2. Ridiculous, at this point...just remove the ability to review at all, if this is how it's going to be. SO frustrating.
Maybe you are looking for
-
ITunes gift cards for movies on AppleTV?
Hi, guys. I got a couple iTunes gift cards that I have been accumulating. Can I use these to buy movies on my AppleTV for purchase or rent? Thanks for any help.
-
Photo has packet loss. Can I improve the image with Aperature?
I received a poor quality family photo (hard copy). Almost like "packet loss" on TV whereby the image edges are muted and/or missing. I wanted to enlarge the 3 X 5 inch photo but if the quality is poor at this resolution, I know enlarging will just m
-
How to parse my datas into decimals
Hi all, i've been trying to convert my data from exponential form into decimal how should i go about doing it? eventually, i will want to average out the data points(current) i got into a single value. Is there a better way to do so instead changing
-
MobileMe was upgraded to iCloud. How do I find iCloud? I have OS7.10.2 I feel really dumb but it seems like my stuff has disappeared.
-
How can I open a local folder using flash builder or AS3?
I need to open a local folder get the zip file and unzip it. I know that i cannot open a folder using flash builder, i did it using air app. now i do not know how do i integrate it with my flex program. Please help me with this issue. Thanks