Query regarding SQL logs
I'm currently working on database forensics, if I do some manual changes in the database through some sql queries there no entry in the logs to prove...
Can anyone suggest me some tools that can give the desired result. (i.e. pulled the log of all manual queries)
PS I am using SQL Server 2005
Any help would be appreciated
Thank you.
Hello
Your question is beyond the scope of this community.
Please repost your question in the SQL Server TechNet Forums.
https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer
See you soon.
Tags: Windows
Similar Questions
-
How export (unload) result of the query without running query on sql developer
Hello
I want to know how export (unload) result of the query without running query on sql developer.
I know this way.
1. execution of query
2. click on "Download" on the results tab
http://i.stack.imgur.com/CQ4Qb.jpg
Is he available unload a query result before the race?No, but you can do this ask the developer SQL change however, for other users can vote and add weight to the possible future implementation.
Kind regards
K. -
I have some problem in my query to sql server. If I press f5 to run it opens to record dialogue area nd do not run (I don't get successful... orders etc). Please help me
Hello
SQL Server is not supported in these forums. I suggest that you ask your question again in one of the forums dedicated to Microsoft for him here:
http://social.technet.microsoft.com/Forums/en-us/category/sqlserver .
Thank you. :)
-
Error message when I run delete the query in SQL Server 2008.
Error message when I run delete the query in SQL Server 2008 SP3.
Error message:
MSG 0, level 11, State 0, line 0
A serious error occurred on the current command. The results, if any, should be discarded.I never got any problem since 5 years.
Please let me know what is the cause of the problem.
You can get a response better/faster if repost you your question in the instances of SQL Server dedicated from Microsoft here:
http://social.technet.microsoft.com/Forums/en-us/category/sqlserver .
Thank you. :)
(I'm sorry, but I can't move this thread for you because the two forums are working on separate platforms)
-
the variable name of database query to SQL Server using the Oracle database link
Hi all
I have an ApEx 4.1 application running on x 64 (11.2.0.1) 11g on Windows Server 2008 x 64, and I have a few points of data integration with SQL (2005 and 2008) server that I need to create. I have configured the database with dg4odbc link and it works perfectly... I can run queries on the SQL Server database without any problem using the database link.
However, there is a scenario where the SQL Server database name is dynamic, and I need to generate on the fly in a PL/SQL block and then use it in a query dynamic SQL (all this in the ApEx). It of wherever I meet problems... when I asked the default database that is based on the ODBC connection and I don't have to specify the name of the database, no problem. But when I need access to one of the several other databases by default, I received the error "invalid table.
It works well:* (note that 'fv' is the name of my database link)
v_query1: = "select 'Release Date' from dbo." Schedules@FV where dbo. Annexes. "" SchedID "=: calendar";
EXECUTE IMMEDIATE v_query1 in rel_date using the grid.
I then take this rel_date variable, convert a varchar2 (rel_date_char), then use it as the name of the database in the following query...
_ It returns an error(error ORA-00903: invalid table name)
v_query2: = "select"PARTNO": rel_date_char.dbo.ProdDetails@fv where 'SchedID' =: calendar and"UnitID"=: unit"
and 'MasterKey' =: master and "ParentKey" =: parent';
EXECUTE IMMEDIATE v_query2 in part_number using planning, master, parent unit;
I also tried using all of the following conditions without result:
"select"PARTNO"of" | : rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
"select"PARTNO"of" | rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
"select"PARTNO"of" | @rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
"select"PARTNO"in @rel_date_char.dbo.ProdDetails @fv where 'SchedID'..."
Is it possible to do it in PL/SQL?
Thanks for any help!
-Ian C.
Published by: 946532 on July 15, 2012 19:45Just did a test using passthrough:
SQL > set serveroutput on
SQL > declare
2 val varchar2 (100);
3 c whole;
4 whole nr;
5. start
c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, "select count (*) from EMP");
8 LOOP
9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
10 output when nr = 0;
11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
12 dbms_output.put_line (val);
13 end of loop;
14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
15 end;
16.
24576PL/SQL procedure successfully completed.
SQL > declare
2 val varchar2 (100);
3 c whole;
4 whole nr;
5. start
c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' select count (*) from dbo.) EMP');
8 LOOP
9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
10 output when nr = 0;
11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
12 dbms_output.put_line (val);
13 end of loop;
14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
15 end;
16.
24576PL/SQL procedure successfully completed.
So all 3 ways work for me.
Published by: kgronau on July 23, 2012 10:08
Now, using the variables to make the selection:
SQL > declare
2 val varchar2 (100);
3 c whole;
4 whole nr;
5 tabname varchar2 (20): = 'EMP ';
6 ownr varchar2 (20): = "dbo."
7 dbname varchar2 (20): = "door";
Start 8
c: 9 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
10 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' SELECT count (*) FROM ': dbname: '.) ' || ownr | '.'|| tabname | ") ;
11 LOOP
12 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
13 when the exit nr = 0;
14 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
15 dbms_output.put_line (val);
16 end loop;
17 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
18 end;
19.
24576PL/SQL procedure successfully completed.
=> instead of executing the statement using the "execute Immediate" we use the PASTHROUGH package to pass the statement to SQL Server.
Published by: kgronau on July 23, 2012 10:10
-
11g - how do I enable sql logging
Hi, experts,
I can't find how to activate the SQL logging (in nqquery.log)
How to configure?Hi user,
You can do this with the administration tool. Open the administration tool, and then open your repository in online mode. Go to the manage--> identity. Double-click the user that you want to be able to see queries and the level 2 loggin increse.
I hope this helps.
J. -.
-
A query regarding the creation of shared objects.
Hello
I have a query regarding the creation of shared objects.
I saw an example where the author is creatining Shared Object as shown
below:
SharedObj = null;
sharedObj = SharedObject.getLocal ("myTasks");and there is nothing related to the word "myTasks" anywhere in the Application.
Can someone please let me know what this word "myTasks" mean here?
Thanks in advance.
Hello
With a shared object, it will create one if it does not exist, then "myTasks" becomes the name of the shared object or if it exists it will load all the objects that are in the shared object.
Here is a simple example that uses the sharedobjects to store the connection information.
http://gumbo.flashhub.NET/login/
David
-
Different output for the same query in SQL Server and Oracle
I have two tables table1 and table2
-table1 has two columns c1 int and varchar c2. There are no constraints added in it. It contains data as shown below
C1 c2
-------------------
d 6
5 d
102 g
6%
f 103
5.
501 j
1 g
601 n
2 m
-table2 has only a single column c1 int. There is no added in constraints. It contains data as shown below
C1
----
6
1
4
3
2
now when I run below, given the query in sql server and oracle it gives me different results
Select *.
FROM table1
table2 on table2.c1 = table1.c1 inner join (SELECT ROW_NUMBER() (any ORDER by ASC c1) AS c1 from table2)
output of SQL server
------------------------
C1 c2 c1
--------------------------------
1 g 1
2 m 2
3 h 3
4 g 4
5 d 5
release of Oracle
----------------------
C1 C2 C1
---------------------------------
5 d 5
4 g 4
3 h 3
1 g 1
2 m 2
If you notice the first column in the two outputs. It is sorted in sql server and no oracle.
Why he behaves differently in oracle? Is there a way I can fix this problem in oracle?
Thank you
JigsIt is NOT a behavior "differently" in Oracle; you did not specify just an order that you expect of your results, so you'll get output in what order the fantasies of the database showing (ie. no guaranteed order). It is an artifact of the way the database chooses to collect the data and databases (or same sets of data within the same database) can and will most likely behave differently.
Same SQL Server will not be guaranteed to always get your data in an orderly manner if you exclude the order by clause, even if you think that there always display the data in an orderly manner.
Your solution is to add an order by clause, in the TWO databases, to force the order of the data output.
-
How to know the execution time of query in sql plus
Hello
I want to know the duration of execution of query in sql more accompanied by statistics
I say time is set on;
Set autotrace on;
Select * view where usr_id = "abcd";
If the result is 300 lines it scrolls up until all the rows are retrieved and finally gives me the run time in 40 seconds, or 1 minute... (it is after all records scrolls)
but when I run it in Toad he gives 350 milli seconds...
I want to see the execution time in sql how to proceed
client and database server 11g is g 10
concerning
REDAIn sqlplus you can do set autotrace traces to suppress the display of the selected lines.
John
-
How to convert the hierarchical query of SQL Server (CTE) to Oracle?
How to convert the hierarchical query of SQL Server (CTE) to Oracle?
WITH cte (col1, col2) AS
(
SELECT col1, col2
FROM dbo. [tb1]
WHERE col1 = 12
UNION ALL
SELECT c.col1, c.col2
FROM dbo. [tb1] AS c INNER JOIN cte AS p ON c.col2 = p.col1
)
DELETE one
FROM dbo. [tb1] AS an INNER JOIN b cte
ON a.col1 = b.col1Hello
Something like this maybe:DELETE FROM dbo.tb1 a WHERE EXISTS ( SELECT 1 FROM dbo.tb1 b WHERE a.co11 = b.col1 AND a.col2 = b.col2 START WITH b.col1 = 12 CONNECT BY b.col2 = PRIOR b.col1)
Although you need to do here is to check that CONNECT it BY SELECT, returns records you wait first, then the DELETION should work too.
-
Cannot query a view in PL/SQL package but it can query in SQL * more
Hello
Logged on as a user, I can query the table DBA_SEGMENTS, but I can't question via a slider or select from a PL/SQL package.
I get the following error message:
LINE/COL ERROR
-------- -----------------------------------------------------------------
28/4 PL/SQL: statement ignored
33/5 PL/SQL: ORA-00942: table or view does not exist
28 select
29 count(*)
30 in
31 n
32 of
33 dba_segments;
Can someone explain to me what is the missing privilege that I need?Thank you in advance.
Kind regards.
It seems that you have granted to dba_segments by role.
To use this object in pl/sql or sp, you need directly.
Ask your dba to grant:
SQL > grant select on dba_segments to your_user;
Mustafa DOGANAY
-
Hello.
3 guests ESXi 5.1.0 1463097 in a cluster.
MS SQL 2008 R2 server (SQL Server 10.50.2500) on a Standard VM MS Windows 2008 R2 server.
VIM_SQLEXP instance name
Name of the comic: VIM_VCDB.
Recovery mode: Simple
DB 1 MB, unrestricted growth. Current database size: 3887MB
Log growth of 10%, limited to 4 GB maximum size after shrink this morning BUT 2MB
Every morning the logfile has run nearly full but the VMware VirtualCenter Server service runs and I can start the vSphere Client. I know not if I do not shrink the log, the service will stop later today or tomorrow.
I studied and followed
Determine where growth occurs in the VMware vCenter Server (1028356) database.
SQL Server recovery mode affect the Transaction log space required (1001046)
Troubleshooting of transaction logs on a Microsoft SQL database server (1003980)
but I do not see any table more than many. I see that VPX_EVENT has increased about 28 MB at night, but nothing else seems alarming.
Any ideas what it could be?
Best regards
Peter Lageri Rasch
Denmark
Hello
Some time ago I had a similar situation as you.
I recommend you to check this carefully, it might be useful:
Troubleshooting when the vcenter db transaction log is full (MS SQL server 2005 express)
Best regards
Pablo
-
Query in sql server from Oracle 9.2
Hello
How can I connect and run the query to Oracle without using other products (DG4MSQL, etc)?
using 9.2.08Hello
I say it is 'free' because Dg4ODBC is included in your license of RDBMS and simply provide a third party ODBC driver.
See this note-Gateway and connectivity generic licensing considerations (Doc ID 232482.1)
You must install and configure in an ORACLE_HOME on a machine somewhere then you can use the links in the database to connect to and select databases non-Oracle.
Take a look at these notes depending on the platform that you plan to use-How DG4ODBC Setup on Linux x 86 32 bit (Doc ID 466228.1)
How to set up DG4ODBC on 64 bit OS Unix (Linux, Solaris, AIX, HP - UX Itanium) to connect to Oracle databases Post Install (Doc ID 561033.1)
How the installer DG4ODBC (gateway for ODBC Oracle database) on Windows 32 bits (Doc ID 466225.1)
How the installer DG4ODBC (gateway for ODBC Oracle database) on 64-bit Windows operating systems (Doc ID 1266572.1)As I said in my previous update if SQL * Server is your non-Oracle database then a stand-alone installation on Windows is the best option in order to use the Microsoft ODBC driver, although there is now a Linux x 86-64 bit available MS ODBC.
Please read carefully the notes that I called because they should have the information you need.
Kind regards
Mike -
I have the following table, named student: -.
NAME
--------------------
one
b
c
d
Now, I stumbled upon a clause connect by but I can't understand how it works. I know this has something to do with the treelike structures. But when I issued the following query:
Select * student connect you prior name > name;
-the following report was produced: -.
NAME
--------------------
one
b
one
c
one
b
one
d
one
b
one
NAME
--------------------
c
one
b
one
15 selected lines.
I really don't understand how it works. Help, please.
Thanks in advance
Published by: user11930797 on April 27, 2010 05:02
Published by: user11930797 on April 27, 2010 05:03
Published by: user11930797 on April 27, 2010 05:04Maybe it help if you choose the level and the full path, like this:
SQL> with student as 2 ( select 'a' name from dual union all 3 select 'b' from dual union all 4 select 'c' from dual union all 5 select 'd' from dual 6 ) 7 select name 8 , level 9 , sys_connect_by_path(name,' --> ') scbp 10 from student 11 connect by prior name > name 12 / N LEVEL SCBP - ---------- -------------------------------------------------- a 1 --> a b 1 --> b a 2 --> b --> a c 1 --> c a 2 --> c --> a b 2 --> c --> b a 3 --> c --> b --> a d 1 --> d a 2 --> d --> a b 2 --> d --> b a 3 --> d --> b --> a c 2 --> d --> c a 3 --> d --> c --> a b 3 --> d --> c --> b a 4 --> d --> c --> b --> a 15 rows selected.
Now, it shows that you generate 4 trees. One for each record, because there is no clause "begins by" specified. And then the tree is constructed using the clause "previous name > name", hence this exit.
I hope this helps.
Kind regards
Rob. -
In Oracle XE limitations regarding SQL
Hi all,
Is that there is no limitation in queries SQL Oracle XE?
Because I run a SQL query in Oracle Standard Edition which is clothed with results while I'm not able to run the same query against the Oracle XE with the same table structure and data.
In Oracle XE, it runs the error as ERROR at line 31:
ORA-00904: "EMP". "" EMPLOYEE_CODE ": invalid identifier
My query is
SELECT "EMP". "" EMPLOYEE_CODE, "
"EMP". "" NAME, "
"EMP". "' BIRTH_DATE ',.
"EMP". "" FH_NAME, "
"EMP". "" JOINING_DATE, "
"EMP". "" DESIGNATION. "
"EMP". "" PAN_NO, "
"DEPT". "" DESCRIPTION. "
"EMP". "" DIVISION_CODE, "
"DIV". "" DESCRIPTION. "
"LOC". "" DESCRIPTION. "
"EMP". "" PF_NO, "
"EMP". "" ESI_NO, "
"EMP". "" CURRENT_STATUS, "
"L"." CL_BALANCE,"
"L"." EL_BALANCE,"
"L"." ML_BALANCE,"
"A"." ATTENDED_DAYS,"
"A"." PUBLIC_HOLIDAYS,"
"A"." WEEKLY_HOLIDAYS,"
(SELECT SUM (CASE WHEN "LEAVE". "" LEAVE_CODE "="CL"AND"EXIT".". CASUAL_LEAVE END OF LEAVE_DAYS") LEAVE WHERE PERIOD = 88 AND EMPLOYEE_CODE = EMP. EMPLOYEE_CODE) AS CASUAL_LEAVE,
(SELECT SUM (CASE WHEN "LEAVE". "" LEAVE_CODE "= 'EL' AND 'EXIT'." EARNED_LEAVE END OF LEAVE_DAYS") LEAVE WHERE PERIOD = 88 AND EMPLOYEE_CODE = EMP. EMPLOYEE_CODE) AS EARNED_LEAVE,
"SICK_LEAVE,"
"ON_DUTY,"
"ESI_LEAVE,"
(SELECT SUM (CASE WHEN "LEAVE". "" LEAVE_CODE "="LP"AND THEN"EXIT".". LOSS_OF_PAY_DAYS END OF LEAVE_DAYS") LEAVE WHERE PERIOD = 88 AND EMPLOYEE_CODE = EMP. EMPLOYEE_CODE) AS LOSS_OF_PAY_DAYS,
'PAID_DAYS', 'DIV '. "" ADDRESS2 "| " '||" """DIV"."" ADDRESS3"AS THE ADDRESS,
(SELECT PLATE OF)
SELECT A.EMPLOYEE_CODE, SUM (A.AMOUNT) AS AMOUNT OF PAYROLL A, B PAY_ELEMENT
WHERE A.PAY_ELEMENT_CODE = B.PAY_ELEMENT_CODE AND
A.PERIOD = 88 AND A.EMPLOYEE_CODE = EMP. EMPLOYEE_CODE AND B.PAY_ELEMENT_TYPE = 'E'
AND B.PAY_ELEMENT_CODE NOT IN ('FC')
A.EMPLOYEE_CODE GROUP
UNION
SELECT A.EMPLOYEE_CODE, AMOUNT OF FOOD_COUPON A, PAY_ELEMENT B
WHERE EMPLOYEE_CODE = EMP. EMPLOYEE_CODE
AND B.PAY_ELEMENT_CODE = A.PAY_ELEMENT_CODE
AND B.PAY_ELEMENT_TYPE = 'E'
AND PERIOD = 88) D
WHERE EMPLOYEE_CODE = EMP. EMPLOYEE_CODE) AS REMUNERATION.
(SELECT PLATE OF)
SELECT A.EMPLOYEE_CODE, SUM (A.AMOUNT) AS AMOUNT OF PAYROLL A, B PAY_ELEMENT
WHERE A.PAY_ELEMENT_CODE = B.PAY_ELEMENT_CODE AND
A.PERIOD = 88 AND A.EMPLOYEE_CODE = EMP. EMPLOYEE_CODE AND B.PAY_ELEMENT_TYPE = A '
AND B.PAY_ELEMENT_CODE NOT IN ('CDF')
A.EMPLOYEE_CODE GROUP
UNION
SELECT A.EMPLOYEE_CODE, AMOUNT OF FOOD_COUPON A, PAY_ELEMENT B
WHERE EMPLOYEE_CODE = EMP. EMPLOYEE_CODE
AND B.PAY_ELEMENT_CODE = A.PAY_ELEMENT_CODE
AND B.PAY_ELEMENT_TYPE = A '
AND PERIOD = 88) D
WHERE EMPLOYEE_CODE = EMP. EMPLOYEE_CODE) AS DEDUCTIONS.
NVL ((SELECT AMOUNT OF COMPENSATION WHERE PAY_ELEMENT_CODE = 'LICENSE' AND EMPLOYEE_CODE = EMP. (EMPLOYEE_CODE), 0) AS BASIC,.
NVL ((SÉLECTIONNEZ MONTANT PAYE WHERE PAY_ELEMENT_CODE = 'HRA' AND EMPLOYEE_CODE = EMP.)) (EMPLOYEE_CODE), 0) AS HRA,.
NVL ((SELECT AMOUNT OF COMPENSATION WHERE PAY_ELEMENT_CODE = 'SP2' AND EMPLOYEE_CODE = EMP. (EMPLOYEE_CODE), 0) AS SPECIALPAY2,
NVL ((SELECT NVL(AMOUNT,0) WHERE PAY_ELEMENT_CODE = 'OA' AND EMPLOYEE_CODE = EMP COMPENSATION. (EMPLOYEE_CODE), 0) AS OTHERALLOW,
NVL ((SELECT AMOUNT OF COMPENSATION WHERE PAY_ELEMENT_CODE = 'TA' AND EMPLOYEE_CODE = EMP. (EMPLOYEE_CODE), 0) AS TRANSALLOW,
NVL ((SELECT AMOUNT OF COMPENSATION WHERE PAY_ELEMENT_CODE = 'FC' AND EMPLOYEE_CODE = EMP. (EMPLOYEE_CODE), 0) AS FOODCOUPONS
"EMPLOYEE" "EMP",.
"DEPARTMENT" "DEPT"
'DIVISION', 'DIV ',.
'LOCATION' 'LOC ',.
"LEAVE_BALANCE" 'L ',.
'PAY. '
"PRESENCES", "A".
WHERE ("EMP". "" DEPARTMENT_CODE "="DEPT ". (' "DEPARTMENT_CODE") and
("EMP". "" DIVISION_CODE "="DEPT ". (' "DIVISION_CODE") and
("EMP". "" DIVISION_CODE "="DIV ". (' "DIVISION_CODE") and
("EMP". "" LOCATION_CODE "="LOC ". (' "LOCATION_CODE") and
("EMP". "' EMPLOYEE_CODE ' = 'L '. (' "EMPLOYEE_CODE") and
("DIV". "' DIVISION_CODE ' = 'L '. (' "DIVISION_CODE") and
( "L"." EMPLOYEE_CODE"="PAYROLL. " (' "EMPLOYEE_CODE") and
("PAYROLL". "' DIVISION_CODE ' = 'L '. (' "DIVISION_CODE") and
(("EMP". ("' CURRENT_STATUS ' = 'C') AND
("PAYROLL". ("" PAY_ELEMENT_CODE "="BSC") AND
("PAYROLL". ("' PERIOD ' = 88) AND
("EMP". ' EMPLOYEE_CODE '= 'A'. (' "EMPLOYEE_CODE") AND
("A"." PERIOD "(=88))"
/
The above query returs ranks in Standard edition but get the error in XE with the same table structure and data.
Kindly help me in this regard
Delphine KI'm not sure if it works in normal 10.2 but as I see you have leave the comparison "employee_code = emp.employee_code" inside the view on the "D" line for where condition outside the view inline (lines 49 and 69 in the reformatted below statement):
SQL> get t1 1 SELECT "EMP"."EMPLOYEE_CODE", 2 "EMP"."NAME", 3 "EMP"."BIRTH_DATE", 4 "EMP"."FH_NAME", 5 "EMP"."JOINING_DATE", 6 "EMP"."DESIGNATION", 7 "EMP"."PAN_NO", 8 "DEPT"."DESCRIPTION", 9 "EMP"."DIVISION_CODE", 10 "DIV"."DESCRIPTION", 11 "LOC"."DESCRIPTION", 12 "EMP"."PF_NO", 13 "EMP"."ESI_NO", 14 "EMP"."CURRENT_STATUS", 15 "L"."CL_BALANCE", 16 "L"."EL_BALANCE", 17 "L"."ML_BALANCE" , 18 "A"."ATTENDED_DAYS", 19 "A"."PUBLIC_HOLIDAYS", 20 "A"."WEEKLY_HOLIDAYS", 21 (SELECT SUM(CASE WHEN "LEAVE"."LEAVE_CODE"='CL' THEN "LEAVE"."LEAVE_DAYS" END ) CASUAL_LEAVE 22 FROM LEAVE WHERE PERIOD=88 AND EMPLOYEE_CODE=EMP.EMPLOYEE_CODE) AS CASUAL_LEAVE, 23 (SELECT SUM(CASE WHEN "LEAVE"."LEAVE_CODE"='EL' THEN "LEAVE"."LEAVE_DAYS" END) EARNED_LEAVE 24 FROM LEAVE WHERE PERIOD=88 AND EMPLOYEE_CODE=EMP.EMPLOYEE_CODE) AS EARNED_LEAVE, 25 "SICK_LEAVE", 26 "ON_DUTY", 27 "ESI_LEAVE", 28 (SELECT SUM(CASE WHEN "LEAVE"."LEAVE_CODE"='LP' THEN "LEAVE"."LEAVE_DAYS" END) LOSS_OF_PAY_DAYS 29 FROM LEAVE WHERE PERIOD=88 AND EMPLOYEE_CODE=EMP.EMPLOYEE_CODE) AS LOSS_OF_PAY_DAYS, 30 "PAID_DAYS", 31 "DIV"."ADDRESS2"||' '||"DIV"."ADDRESS3" AS ADDRESS, 32 (SELECT SUM(AMOUNT) 33 FROM (SELECT A.EMPLOYEE_CODE, SUM(A.AMOUNT) AS AMOUNT 34 FROM PAYROLL A, 35 PAY_ELEMENT B 36 WHERE A.PAY_ELEMENT_CODE=B.PAY_ELEMENT_CODE 37 AND A.PERIOD= 88 AND B.PAY_ELEMENT_TYPE='E' 38 AND B.PAY_ELEMENT_CODE NOT IN('FC') 39 GROUP BY A.EMPLOYEE_CODE 40 UNION 41 SELECT A.EMPLOYEE_CODE, AMOUNT 42 FROM FOOD_COUPON A, 43 PAY_ELEMENT B 44 WHERE B.PAY_ELEMENT_CODE=A.PAY_ELEMENT_CODE 45 AND B.PAY_ELEMENT_TYPE='E' 46 AND PERIOD=88 47 )D 48 WHERE EMPLOYEE_CODE=EMP.EMPLOYEE_CODE 49 and employee_code = emp.employee_code 50 ) AS EARNINGS, 51 (SELECT SUM(AMOUNT) 52 FROM (SELECT A.EMPLOYEE_CODE, SUM(A.AMOUNT) AS AMOUNT 53 FROM PAYROLL A, 54 PAY_ELEMENT B 55 WHERE A.PAY_ELEMENT_CODE=B.PAY_ELEMENT_CODE 56 AND A.PERIOD= 88 57 AND B.PAY_ELEMENT_TYPE='D' 58 AND B.PAY_ELEMENT_CODE NOT IN('FCD') 59 GROUP BY A.EMPLOYEE_CODE 60 UNION 61 SELECT A.EMPLOYEE_CODE, AMOUNT 62 FROM FOOD_COUPON A, 63 PAY_ELEMENT B 64 WHERE B.PAY_ELEMENT_CODE=A.PAY_ELEMENT_CODE 65 AND B.PAY_ELEMENT_TYPE='D' 66 AND PERIOD=88 67 )D 68 WHERE EMPLOYEE_CODE=EMP.EMPLOYEE_CODE 69 and employee_code = emp.employee_code) AS DEDUCTIONS, 70 NVL((SELECT AMOUNT 71 FROM PAY 72 WHERE PAY_ELEMENT_CODE='BSC' 73 AND EMPLOYEE_CODE=EMP.EMPLOYEE_CODE),0)AS BASIC, 74 NVL((SELECT AMOUNT 75 FROM PAY 76 WHERE PAY_ELEMENT_CODE='HRA' 77 AND EMPLOYEE_CODE=EMP.EMPLOYEE_CODE),0)AS HRA, 78 NVL((SELECT AMOUNT 79 FROM PAY 80 WHERE PAY_ELEMENT_CODE='SP2' 81 AND EMPLOYEE_CODE=EMP.EMPLOYEE_CODE),0)AS SPECIALPAY2, 82 NVL((SELECT NVL(AMOUNT,0) 83 FROM PAY 84 WHERE PAY_ELEMENT_CODE='OA' 85 AND EMPLOYEE_CODE=EMP.EMPLOYEE_CODE),0)AS OTHERALLOW, 86 NVL((SELECT AMOUNT 87 FROM PAY 88 WHERE PAY_ELEMENT_CODE='TA' 89 AND EMPLOYEE_CODE=EMP.EMPLOYEE_CODE),0)AS TRANSALLOW, 90 NVL((SELECT AMOUNT 91 FROM PAY 92 WHERE PAY_ELEMENT_CODE='FC' 93 AND EMPLOYEE_CODE=EMP.EMPLOYEE_CODE),0)AS FOODCOUPONS 94 FROM "EMPLOYEE" "EMP", 95 "DEPARTMENT" "DEPT", 96 "DIVISION" "DIV", 97 "LOCATION" "LOC", 98 "LEAVE_BALANCE" "L", 99 "PAYROLL" , 100 "ATTENDANCE" "A" 101 WHERE ( "EMP"."DEPARTMENT_CODE" = "DEPT"."DEPARTMENT_CODE" ) and 102 ( "EMP"."DIVISION_CODE" = "DEPT"."DIVISION_CODE" ) and 103 ( "EMP"."DIVISION_CODE" = "DIV"."DIVISION_CODE" ) and 104 ( "EMP"."LOCATION_CODE" = "LOC"."LOCATION_CODE" ) and 105 ( "EMP"."EMPLOYEE_CODE" = "L"."EMPLOYEE_CODE" ) and 106 ( "DIV"."DIVISION_CODE" = "L"."DIVISION_CODE" ) and 107 ( "L"."EMPLOYEE_CODE" = "PAYROLL"."EMPLOYEE_CODE" ) and 108 ( "PAYROLL"."DIVISION_CODE" = "L"."DIVISION_CODE" ) and 109 ( ( "EMP"."CURRENT_STATUS" = 'C' ) AND 110 ( "PAYROLL"."PAY_ELEMENT_CODE" = 'BSC' ) AND 111 ( "PAYROLL"."PERIOD" = 88) AND 112 ("EMP"."EMPLOYEE_CODE"="A"."EMPLOYEE_CODE") AND 113 ("A"."PERIOD"=88) 114* ) 115 / no rows selected SQL>
Maybe you are looking for
-
Good day! I hope that ALL have a nice time. HP Pavilion G60-458DX Compaq Presario CQ50z-100 Compaq CQ50-139WM I have a G60-458DX with a bad screen. I think it's the backlight because it grayed out in front of me, but I can still see what is happening
-
Error starting after installing sp2
I am running Windows vista Home premium. After I installed sp2 and restarted my computer windows trys to configure updates get to 100% in step 3, and then restarts the computer and recurrence everywhere. I tried the Startup Repair running, System Res
-
How to make a video background to a fluid grid presentation in DW CS6?
I have the full video backgrounds successfully placed in an ordinary web page, but cannot get a video to run as a complete history on a checkerboard to fluid. I searched this forum and the web without success.Anyone have any suggestions for a source
-
How to enable SSH on vROps?
HelloWhen I tried to connect through the console, it seems that disabled ctrl + alt + delete. How can I enable SSH on vROps?Kind regardsRamazan
-
Recently updated for all CC 2015.I get Adobe applications in After Effects, this error message whenever I try to use AE comp linked first.System information:ASUS GL551JM laptopIntel Core i7-4710HQ 2.5 GHz (Turbo at 3.5 GHz).1 TB 7200 RPM harddrive /