Expression Executing in sql
Dear All,
We are facing one issue in SQL Function. We are unable write function to get calculated value.
We have one table, which has three columns.
PayHead Amount Action
Basic 5000
HRA 2000 Add
CCA 300 Subtract
Attendance 3 Multiply
Now we need Execute Expression for another PayHead, which is dependant on this table will be
PF = Basic+HRA-CCA*Attendance.
So please help me , how can i do this one in function. Here we will have that above expression in PF Master also.
Looks like you are storing the data in the wrong format. I see Basic/HRA etc are attributes of some Employee's salary. Where is the EmployeeID Stored?
One of the example of such data would be like following.
EmployeeID
Basic
HRA
CCA
Attendance
1
5000
2000
300
3
2
5000
2000
300
3
3
5000
2000
300
3
Then calculation would be simple.
As others suggested, look at your equation as well.
Please specify your SQL Server version while posting questions
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Similar Messages
-
How to operate multiple querys using DB Adapter and 'Execute Custom SQL'
I have a requirment that I need to create database adapter in your BPEL process with 'Execute Custom SQL' to operate multiple query in DB in one atomic
here are the details:
inbound request:
<ns1:Query_bpelProcessRequest>
<ns1:input>
<ns1:ItemDetail>
<ns1:ItemID>1123DDDS</ns1:ItemID>
</ns1:ItemDetail>
<ns1:ItemDetail>
<ns1:ItemID>1126EWWA</ns1:ItemID>
</ns1:ItemDetail>
<ns1:ItemDetail>
<ns1:ItemID>11208FSAA</ns1:ItemID>
</ns1:ItemDetail>
</ns1:input>
</ns1:Query_bpelProcessRequest>
I use for-each fuction in XSLT to mapping the all ItemID value:
<xsl:template match="/">
<xsl:for-each select="/tns:Query_bpelProcessRequest/tns:input/tns:ItemDetail">
<ns1:QueryFromDB_Input>
<ns1:ItemID>
<xsl:value-of select="tns:ItemID"/>
</ns1:ItemID>
</ns1:QueryFromDB_Input>
</xsl:for-each>
</xsl:template>
and in DB Adapter I use the 'Execute Custom SQL' to query the CONTENT value according the ItemID value:
select distinct CONTENT from agile.item where ITEM_NUMBER=’<ItemID>’
However, in the result, It only query the first item value for <ns1:ItemID>1123DDDS</ns1:ItemID>
<<QueryFromDB_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_Input_msg">
<QueryFromDB_Input xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
<ns1:ItemID>1123DDDS</ns1:ItemID>
</QueryFromDB_Input>
</part></QueryFromDB_InputVariable>
<QueryFromDB_OutputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_OutputCollection">
<QueryFromDB_OutputCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
<QueryFromDB_Output>
<ITEM_NUMBER>1123DDDS</ITEM_NUMBER>
<CONTENT >SJIFESSFFJ</CONTENT >
</QueryFromDB_Output>
</QueryFromDB_OutputCollection>
</part></QueryFromDB_OutputVariable>
the other two querys are not operated.
what can I do to operate multiple querys??
ThanksHi Rod,
I are using while loop and assign array inputvalue to the inputvarable of DBadapter now, but actually it doesn't work.
Throw expection
<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>XPath query string returns multiple nodes.
According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"] should not return multipe nodes.
Please check the BPEL source at line number "89" and verify the part and xpath query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"].
Possible reasons behind this problems are: some xml elements has maxOccurs > 1 or the xml data is invalid according to XML Schema.
To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain administration page.
</summary>
</part></selectionFailure>
my inbound XSD:
<element name="ItemsQuery_bpelProcessRequest">
<complexType>
<sequence>
<element name="input" type="tns:inputType"/>
</sequence>
</complexType>
</element>
<complexType name="inputType">
<sequence>
<element name="inputDetail" minOccurs="0" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="ProductID" type="string" minOccurs="0"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="ItemsQuery_bpelProcessResponse">
<complexType>
<sequence>
<element name="result" type="tns:outputType"/>
</sequence>
</complexType>
</element>
<complexType name="outputType">
<sequence>
<element name="ItemOutput" minOccurs="0" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="item_id" type="string" minOccurs="0"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
DB Adapter XSD:
<xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="QueryItem_Input" type="QueryItem_Input"/>
<xs:complexType name="QueryFrom_Input">
<xs:sequence>
<xs:element name="ProductID" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
<xs:element name="QueryItem_OutputCollection" type="QueryItem_OutputCollection"/>
<xs:complexType name="QueryItem_OutputCollection">
<xs:sequence>
<xs:element name="QueryItem_Output" type="QueryItem_Output" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="QueryItem_Output">
<xs:sequence>
<xs:element name="item_id" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
the bpel assign:
<assign name="Initial_Index">
<copy>
<from expression="0"/>
<to variable="ItemIndex"/>
</copy>
</assign>
<while name="While_1"
condition="bpws:getVariableData('ItemIndex')<ora:countNodes('inputVariable','payload','/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID)">
<sequence name="Sequence_1">
<assign name="Assign_QueryInput">
<copy>
<from variable="inputVariable" part="payload"
query='/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID{bpws:getVariableData('ItemIndex')}'/>
<to variable="QueryItem_InputVariable"
part="QueryItem_nput_msg"
query="/ns2:QueryItem_Input/ns2:ProductID"/>
</copy>
</assign>
<invoke name="Invoke_QueryDB" partnerLink="QueryItem"
portType="ns1:QueryItem_ptt"
operation="QueryItem_PSFT"
inputVariable="QueryItem_InputVariable"
outputVariable="QueryItem_OutputVariable"/>
<assign name="Assign_Output">
<copy>
<from variable="QueryItem_OutputVariable"
part="QueryItem_OutputCollection"
query="/ns2:QueryItem_OutputCollection/ns2:QueryItem_Output/ns2:item_id"/>
<to variable="outputVariable" part="payload"
query='/client:ItemsQuery_bpelProcessResponse/client:result/client:ItemOutput/client:item_id{bpws:getVariableData('ItemIndex')}'/>
</copy>
<copy>
<from expression="bpws:getVariableData('ItemIndex')+1"/>
<to variable="ItemIndex"/>
</copy>
</assign>
</sequence>
</while>
I use {} instead of [] for array, because [] seams not reveal in this message board
seems I can't assign array values to the DB inputvalue, Are there any solutions for this ?
I still haven't found any way for operating multiple querys using DB Adapter.
Thanks
Edited by: user1065212 on 07-Jan-2010 19:39
Edited by: user1065212 on 07-Jan-2010 19:41
Edited by: user1065212 on 07-Jan-2010 19:44
Edited by: user1065212 on 07-Jan-2010 19:45 -
XSU and CURSOR expression in the sql query
Platform: oracle 8.X on ibm aix and java client code from
windows NT.
JDBC DRIVER: JDBC Oracle thin driver version 1.2.
when i execute a Sql satement with Cursor expression from the
java client code with XSU it returns an XML DOM But if the
CURSOR EXPRESSION IN THE SQL QUERY RETURNS EMPTY ROWS i get
back an error node with "ORA-01001 Invalid Cursor" error
message.i had aslo set the setNullAttributes(true) property
on oraclexmlquery.
Interestingly, if i exceute the same query in the SQL plus
it returns the column names with no rows.
is there any way where i can get xml document with table
structure, when there are no rows instead of ORA error message.Ok.
I assume that you have for one activity several asset PNR and for one asset several activity.
The factPNR is on this way a real bridge table. It's a way to be able to design a many-to-many relationship.
Have a look here for more detail on how to build a many-to-many relationship :
http://gerardnico.com/wiki/dw/data_quality/relationships#many-to-many
Therefore I assume that you want this design :
DimActivity -< FactActivity >- < FactPNR >- DimPNR and you will have :
DimActivity -< FactActivity >- < BridgeTable >- DimPNR How to build your bridge table ?
In the physical layer, :
* create a new table BridgeActivityPNR, open it and select "statement"
* enter your sql statement
SELECT DISTINCT A.ROW_WID ACTIVIDAD_WID, B.ROW_WID ASSET_WID
FROM W_ACTIVITY_F A,
W_ASSET_D B,
W_SRVREQ_D C,
X_S_CMPT_MTRC_F D,
X_S_ASSET_FEA_D E
WHERE A.X_SRA_SR_ID=C.INTEGRATION_ID AND
C.X_VLG_FLIGHT_ID=D.X_ROW_ID AND
D.X_ROW_ID=E.X_CM_ID AND
E.X_ASSET_ID=B.X_ROW_ID* add two columns in the column tab : ACTIVIDAD_WID and ASSET_WID
* create the physical join with the table FactActivity and DimPNR
* drag and drop in the business model your table BridgeActivityPNR
* in the BMM, create the complex join like this :
DimActivity -< FactActivity >- < BridgeTable >- DimPNR * open your logical bridge table and check the bridge table option.
And you are done if I didn't forget anything.
A complete example here :
http://gerardnico.com/wiki/dat/obiee/obiee_bridge_table -
Execute t-sql before retrieving report data
Hi,
Is there a way to execute t-sql, with the connection from within the report, before the report retrieves it's data?
I need this to initialize the connection's context_info.
After searching the web I have found a solution to my problem which is instead of using a View, use a stored procedure which takes care of initializing the context_info and return the result of the view.
Is there any other solution using crystal reports XI (sp none)?Download the service Pack or upgrade to CR XI R2 ( 11.5 ) for free and use your XI keycode to install it.
Only other way would be to possibly use a SQL Expression, it may work. Only one data source can be used if using an expression.
Thank you
Don -
Security context issue when executing a SQL command in SQLCMD
Simplified core issue below:
I have myscript.sql that has:
SELECT name FROM Sys.Databases
GO
USE mydatabase
GO
EXEC mystoredprocedure 'myparameter'
GO
When I open cmd.exe and use:
SQLCMD -S localhost\myinstance -i script.sql
It executes fine.
When I open cmd.exe in C# using the Process class and execute the same command I get the following error:
name
master
tempdb
model
msdb
mydatabase
(5 rows affected)
Msg 916, Level 14, State 1, Server localhost\myinstance, Line 1
The server principal "NT AUTHORITY\SYSTEM" is not able to access the database "mydatabase" under the current security context.
Msg 2812, Level 16, State 62, Server localhost\myinstance, Line 1
Could not find stored procedure 'mystoredprocedure'.
And now the detailed explaination:
I created an MSI which installs my custom application.
During the bootstrap process, SQL Server 2012 Express is installed using the following parameters:
/INSTANCEID="SQLEXPRESS"
/ACTION="Install"
/FEATURES=SQLEngine,Replication
/HELP="False"
/INDICATEPROGRESS="False"
/Q="True"
/QS="False"
/ROLE="AllFeatures_WithDefaults"
/ENU="True"
/ERRORREPORTING="False"
/SQMREPORTING=0
/INSTANCENAME="SQLEXPRESS"
/AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
/AGTSVCSTARTUPTYPE="Disabled"
/ISSVCSTARTUPTYPE="Automatic"
/ISSVCACCOUNT="NT AUTHORITY\NetworkService"
/ASSVCSTARTUPTYPE="Automatic"
/ASCOLLATION="Latin1_General_CI_AS"
/ASDATADIR="Data"
/ASBACKUPDIR="Backup"
/ASTEMPDIR="Temp"
/ASCONFIGDIR="Config"
/ASPROVIDERMSOLAP="1"
/SQLSVCSTARTUPTYPE="Automatic"
/FILESTREAMLEVEL="0"
/ENABLERANU="True"
/SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
/SQLSVCACCOUNT="NT Authority\Network Service"
/SECURITYMODE="SQL"
/ADDCURRENTUSERASSQLADMIN="True"
/RSSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
/RSSVCSTARTUPTYPE="Automatic"
/RSINSTALLMODE="FilesOnlyMode"
/HIDECONSOLE
/IACCEPTSQLSERVERLICENSETERMS
/SAPWD="***************"
The MSI then executes an Installer class DLL written in C# which restores a database to the SqlExpress instance.
When the restore is completed, the Installer class then uses the Process class to launch CMD.exe and execute the SQL script using SQLCMD.
Process vProcess = new Process();
ProcessStartInfo vStartInfo = new ProcessStartInfo("cmd.exe");
vStartInfo.Arguments = "/c set path=%path%;" + Context.Parameters["TargetDir"] + "\\; && sqlcmd -S LocalHost\\myinstance -i myscript.sql";
vProcess.StartInfo = vStartInfo;
vProcess.Start();
vProcess.WaitForExit(30000);
This is where I get the error mentioned above.
However if I execute the same command manually by opening CMD.exe from the RUN command, it executes perfectly.
I can not use -U or -P to supply a user / password, I MUST use integrated security.
Additional info:
Previously SQL Server 2008 Express has been in use for the bootstrapper, and this issue did not occur.
The database the MSI restores is also built from SQL Server 2008. (Will be built from 2012 in the future.)
Installation is performed on an account with administrative rights.
Running the installer AS Administrator does not fix the issue.
Any help would be greatly appreciated, as well please let me know if additional info is required.
Thank youI'm having a similar issue where I'm using a batch file to execute commands to a group of servers. I can use the batch commands when updating MyDatabase but get the security context error when I try to update MyDatabase with a join to TheirDatabase except
on servers where I am sysadmin. Like I said, I can update MyDatabase as long as I don't join to TheirDatabase.
Update A
Set A.CCMCoderStaffSID = IsNull(B.StaffSID, -1)
From MyDatabase.[R_Encounter].[VejdPfcsLinkageDataF19610x5] A
Left Join ThierDatabase.Staff.Staff B on
A.Sta3n = B.Sta3n and A.[CCMCoderF200IEN]= B.StaffIEN
Error:
Msg 916, Level 14, State 1, Server R04PHIDWH58, Line 1
The server principal "MyDomain\ME" is not able to access the database "TheirDatabase" under the current security context.
Line from batch:
sqlcmd -S Server54 -d MyDatabase -i D:\ETLDevelopment\R04\Me\querytools\%RAWTablesScript% -o D:\ETLDevelopment\R04\Me\UpdateSIDV1.txt -
Execute all SQL code as individual Oracle user, not APEX_PUBLIC_USER
Is it possible to get APEX to execute SQL code as the user's existing Oracle database user instead of APEX_PUBLIC_USER?
Besides having all of the security already defined for each of the existing users at the database level, the existing application also handles generating audit trails with triggers that pull the username executing the SQL instead of accepting passed values. At the moment APEX_PUBLIC_USER is plastered everywhere as the user that generated the changes.rcy_evdriver wrote:
Is it possible to get APEX to execute SQL code as the user's existing Oracle database user instead of APEX_PUBLIC_USER? No. See:
{message:id=926724}
{message:id=1224601}
{message:id=1606515}
Application Express and parsing of SQL
Besides having all of the security already defined for each of the existing users at the database level, the existing application also handles generating audit trails with triggers that pull the username executing the SQL instead of accepting passed values. At the moment APEX_PUBLIC_USER is plastered everywhere as the user that generated the changes.Using DAD Credentials Verification will cause the database user to be returned by the <tt>USER</tt> pseudo-column. (However just because you can do this, it doesn't mean you should.)
{message:id=9680421}
Why are you asking this? +"At the moment APEX_PUBLIC_USER is plastered everywhere as the user that generated the changes"+ indicates that it might be a bit late to be making fundamental discoveries about APEX and database security? -
Execute PL/SQL upon click of a button
I am using APEX 4.0 in Oracle 11g Express edition.
I want to execute some PL/SQL code upon click of a button, I read in other threads that I can edit the button's action to 'Defined by Dynamic Action'. However, when I create a button, I do not get 'Defined By Dynamic Action' as an action choice.
Is this only valid for APEX 4.1? If so, is there a way I can do this?Hello,
After clicking the button, do you want to submit the page and execute PL/SQL or you want to execute with submitting the page?
With Submit:
Create page process -
Type - PL/SQL anonymous block
Process Point - On Submit - After Computations and Validations
Conditions - When Button Pressed (Process After Submit When this Button is Pressed) select your button.
Without Submit:
Create a Advanced Dynamic Action
Event - Click
Selection Type - jQuery Selector
jQuery Selector - <Selector to select your button> (for e.g. #BUTTON_123 where BUTTON_123 is ID of your button)
Next >>
Action - Execute PL/SQL
PL/SQL Code - Put your PL/SQL Code here
Page Items to Submit - Typically List of pages items you want to access in PL/SQL code
Hope it helps.
Regards,
Hari -
Execute PL/SQL statement on rendered report column only (APEX 4.02)
Hello,
i have a classic report which selects approx. 100.000 rows. For one of the columns in the sql i am executing
a rather complex PL/SQL function which generates additional html. This function slows down the query
by a tremendous amount (over one hour for the select, without this function it's 30 seconds) so i don't
want to execute it for each selected row but for the rendered ones only (15 per page).
Is it possible to do so in a report?Steven Mark wrote:
So if APEX does not give us the option to execute PL/SQL scripts on actually rendered columns onlyI have long thought that this is a major limitation of APEX. We know from Marc's post Re: Reports/Tabular Form and number of executions of a Lov Query that built-in column display operations are only performed for the rows rendered on the current page. However, there are many requirements (even relatively simple ones like row-level conditional display) that are impossible to meet using the built-in Display As/LOV, HTML Expression, Tabular Form Element, and Column Link display options. The alternatives are inefficient (context switching to user-defined functions) or poor practice (losing the separation of concerns by generating HTML/links in report queries).
The ability to call user-defined functions at the same rendering point as built-in column display operations, and to apply row-level conditions to built-in display options are long overdue enhancements. -
Error while executing a sql query for select
HI All,
ORA-01652: unable to extend temp segment by 128 in tablespace PSTEMP i'm getting this error while i'm executing the sql query for selecting the data.I am having 44GB of temp space, while executing the below query my temp space is getting full, Expert please let us know how the issue can be resolved..
1. I dont want to increase the temp space
2. I need to tune the query, please provide your recomendations.
insert /*+APPEND*/ into CST_DSA.HIERARCHY_MISMATCHES
(REPORT_NUM,REPORT_TYPE,REPORT_DESC,GAP,CARRIED_ITEMS,CARRIED_ITEM_TYPE,NO_OF_ROUTE_OF_CARRIED_ITEM,CARRIED_ITEM_ROUTE_NO,CARRIER_ITEMS,CARRIER_ITEM_TYPE,CARRIED_ITEM_PROTECTION_TYPE,SOURCE_SYSTEM)
select
REPORTNUMBER,REPORTTYPE,REPORTDESCRIPTION ,NULL,
carried_items,carried_item_type,no_of_route_of_carried_item,carried_item_route_no,carrier_items,
carrier_item_type,carried_item_protection_type,'PACS'
from
(select distinct
c.REPORTNUMBER,c.REPORTTYPE,c.REPORTDESCRIPTION ,NULL,
a.carried_items,a.carried_item_type,a.no_of_route_of_carried_item,a.carried_item_route_no,a.carrier_items,
a.carrier_item_type,a.carried_item_protection_type,'PACS'
from CST_ASIR.HIERARCHY_asir a,CST_DSA.M_PB_CIRCUIT_ROUTING b ,CST_DSA.REPORT_METADATA c
where a.carrier_item_type in('Connection') and a.carried_item_type in('Service')
AND a.carrier_items=b.mux
and c.REPORTNUMBER=(case
when a.carrier_item_type in ('ServicePackage','Service','Connection') then 10
else 20
end)
and a.carrier_items not in (select carried_items from CST_ASIR.HIERARCHY_asir where carried_item_type in('Connection') ))A
where not exists
(select *
from CST_DSA.HIERARCHY_MISMATCHES B where
A.REPORTNUMBER=B.REPORT_NUM and
A.REPORTTYPE=B.REPORT_TYPE and
A.REPORTDESCRIPTION=B.REPORT_DESC and
A.CARRIED_ITEMS=B.CARRIED_ITEMS and
A.CARRIED_ITEM_TYPE=B.CARRIED_ITEM_TYPE and
A.NO_OF_ROUTE_OF_CARRIED_ITEM=B.NO_OF_ROUTE_OF_CARRIED_ITEM and
A.CARRIED_ITEM_ROUTE_NO=B.CARRIED_ITEM_ROUTE_NO and
A.CARRIER_ITEMS=B.CARRIER_ITEMS and
A.CARRIER_ITEM_TYPE=B.CARRIER_ITEM_TYPE and
A.CARRIED_ITEM_PROTECTION_TYPE=B.CARRIED_ITEM_PROTECTION_TYPE
AND B.SOURCE_SYSTEM='PACS'
Explain Plan
==========
Plan
INSERT STATEMENT ALL_ROWSCost: 129 Bytes: 1,103 Cardinality: 1
20 LOAD AS SELECT CST_DSA.HIERARCHY_MISMATCHES
19 PX COORDINATOR
18 PX SEND QC (RANDOM) PARALLEL_TO_SERIAL SYS.:TQ10002 :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1
17 NESTED LOOPS PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1
15 HASH JOIN RIGHT ANTI NA PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,098 Cardinality: 1
4 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 63 Bytes: 359,283 Cardinality: 15,621
3 PX SEND BROADCAST PARALLEL_TO_PARALLEL SYS.:TQ10001 :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621
2 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621
1 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621
14 NESTED LOOPS ANTI PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 40,256,600 Cardinality: 37,448
11 HASH JOIN PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 6,366,160 Cardinality: 37,448
8 BUFFER SORT PARALLEL_COMBINED_WITH_CHILD :Q1002
7 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 1 Bytes: 214 Cardinality: 2
6 PX SEND BROADCAST PARALLEL_FROM_SERIAL SYS.:TQ10000 Cost: 1 Bytes: 214 Cardinality: 2
5 INDEX FULL SCAN INDEX CST_DSA.IDX$$_06EF0005 Cost: 1 Bytes: 214 Cardinality: 2
10 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448
9 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448
13 TABLE ACCESS BY INDEX ROWID TABLE PARALLEL_COMBINED_WITH_PARENT CST_DSA.HIERARCHY_MISMATCHES :Q1002Cost: 0 Bytes: 905 Cardinality: 1
12 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT SYS.HIERARCHY_MISMATCHES_IDX3 :Q1002Cost: 0 Cardinality: 1
16 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT CST_DSA.IDX$$_06EF0001 :Q1002Cost: 1 Bytes: 5 Cardinality: 1 -
SQL error 3113 occurred when executing EXEC SQL.
Hi,
We are facing one typical problem, One background is failing regularly with
below dump. as we now got all notes giving information, if database restarted
taking backup, these type of failures occur, but our database is only down for backup once in a week, but it is failing with frequenly.
in this two servers are located in different place, in this job tries to connect
another server to get material statistics.
It is giving some error message in sm21 with
SQL error 3113 occurred when executing EXEC SQL.
work procees in reconnect mode.
all notes saying these types of dump occur when database restared, but this dump
even though database is up.
below is short dump, please can anyone help me from this problem.
ABAP runtime errors DBIF_DSQL2_SQL_ERROR
Occurred on 08.01.2007 at 00:30:28
>> Short dump has not been completely stored. It is too big.
SQL error 3113 occurred when executing EXEC SQL.
What happened?
The error occurred in the current database connection "AZ1".
What can you do?
Note the actions and input that caused the error.
Inform your SAP system administrator.
You can print out this message by choosing "Print". Transaction ST22
allows you to display and manage termination messages, including keeping
them beyond their normal deletion date.
Error analysis
How to correct the error
Database error text........: "ORA-03113: end-of-file on communication channel#"
Triggering SQL statement...: "select mara.groes, mara.brgew, mara.ntgew,
mara.gewei, mara.volum, mara.voleh, mara.mstae, mara.mstde, mara.prdha,
marc.matnr, marc.werks, marc.mmsta, marc.mmstd from sapr3.mara, sapr3.m
where sapr3.mara.mandt = sapr3.marc.mandt and sapr3.mara.matnr =
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
If the error occurred in a non-modified SAP program, you may be
able to find a solution in the SAP note system.
If you have access to the note system yourself, use the following
search criteria:
"DBIF_DSQL2_SQL_ERROR"
"ZM2431216 " or "ZM2431216 "
"EXTRACT_GENERAL_DATA"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in th
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error o
or which actions and input led to the error.
System environment
SAP Release.............. "46C"
Application server....... "essceu3"
Network address.......... "172.19.119.198"
Operating system......... "AIX"
Release.................. "5.3"
Hardware type............ "00C7ADBD4C00"
Database server.......... "ukblx176"
Database type............ "ORACLE"
Database name............ "EU3"
Database owner........... "SAPR3"
Character set............ "es_ES.ISO8859-1"
SAP kernel............... "46D"
Created on............... "Jul 9 2006 20:26:33"
Created in............... "AIX 1 5 00447C4A4C00"
Database version......... "OCI_920__OCI_7_API "
Patch level.............. "2257"
Patch text............... " "
Supported environment....
Database................. "ORACLE 8.0.5.., ORACLE 8.0.6.., ORACLE
8.1.6.., ORACLE 8.1.7.., ORACLE 9.2.0.., ORACLE 10.2.0.."
SAP database version..... "46D"
Operating system......... "AIX 1 4, AIX 2 4, AIX 3 4, AIX 1 5, AIX 2 5, AIX 3
5, , System build information:, , LCHN :
841480"
User, transaction...
Client.............. 600
User................ "MPZMMES"
Language key........ "S"
Transaction......... " "
Program............. "ZM2431216 "
Screen.............. "SAPMSSY0 1000"
Screen line......... 6
Information on where termination occurred
The termination occurred in the ABAP/4 program "ZM2431216 " in
"EXTRACT_GENERAL_DATA".
The main program was "ZM2431216 ".
The termination occurred in line 980
of the source code of program "ZM2431216 " (when callin
The program "ZM2431216 " was started as a background jo
Source code extract
009500 mara.ntgew,
009510 mara.gewei,
009520 mara.volum,
009530 mara.voleh,
009540 mara.mstae,
009550 mara.mstde,
009560 mara.prdha,
009570 marc.matnr,
009580 marc.werks,
009590 marc.mmsta,
009600 marc.mmstd
009610 into :w_ops-groes,
009620 :w_ops-brgew,
009630 :w_ops-ntgew,
009640 :w_ops-gewei,
009650 :w_ops-volum,
009660 :w_ops-voleh,
009670 :w_ops-mstae,
009680 :w_ops-mstde,
009690 :w_ops-prdha,
009700 :w_ops-matnr,
009710 :w_ops-werks,
009720 :w_ops-mmsta,
009730 :w_ops-mmstd
009740 from sapr3.mara, sapr3.marc
009750 where sapr3.mara.mandt = sapr3.marc.mandt
009760 and sapr3.mara.matnr = sapr3.marc.matnr
009770 and sapr3.mara.mandt = :p_mandt
009780 and sapr3.mara.matnr = :w_ebs-matnr
009790 and sapr3.marc.werks = :p_owerks
> ENDEXEC.
009810 endform. " extract_general_data
009820 *&
009830 *& Form append_i_ops
009840 *&
009850 * Appends W_OPS to I_OPS
009860 *
009870 form append_i_ops.
009880 append w_ops to i_ops.
009890 endform. " append_i_ops
009900 *&
009910 *& Form extract_material_description
009920 *&
009930 * Extracts a Material Description from the remote database an
009940 * modifies the current record in I_OPS.
009950 *
009960 * >P_SPRAS Language Key
009970 *
009980 form extract_material_description using p_spras.
009990 EXEC sql performing set_langauge.
Contents of system fields
SY field contents..................... SY field contents............
SY-SUBRC 0 SY-INDEX 0
SY-TABIX 1 SY-DBCNT 1
SY-FDPOS 18 SY-LSIND 0
SY-PAGNO 0 SY-LINNO 1
SY-COLNO 1
Chosen variables
Name.......................... Contents.1........2........3....+..
W_EBS-PRAT4
2
0
W_OPS-GROES
22222222222222222222222222222222
00000000000000000000000000000000
W_OPS-BRGEW #######
0000000
000000C
W_OPS-NTGEW #######
0000000
000000C
regards,
krishnaiah.Hi,
This is usually a SERVER SIDE DATABASE PROBLEM or SQLNET LISTENER (server side) PROBLEM. The client side should initially be ignored and instead the server should be investigated. In rare cases, this can be caused by client
side memory or other resource problem, or a DLL version mismatch, but this is
unlikely.
Enlist the assistance of your DBA. Then reproduce the ORA-3113 error on your
client application. Ask your DBA to look at the database side Alert.log and
trace files and look for ANY activity. Any activity that coincides with your
ORA-3113 will be a clue.
REgards
Vinod -
How to execute a sql query in VO????
Hi every body.
Can you show me the way to execute a sql query in VO.
For example: I have a viewobject1, and I add a new method void execSQL() before the last '}' of the java file of viewobject1 like this:
public void execSQL() {
String strSql = "Select sysdate from dual";
I want to execute strSql query and return a Resultset, how can I perform ???
Thanks a lot.The executeQuery method in ViewObjectImpl does not return a ResultSet.
ViewObjectImpl voImpl;
voImpl.setQuery(strSql);
voImpl.executeQuery(); -
Error while parsing or executing XML-SQL document
friends,
my scenario is based on file to jdbc.i am facing an error in receiver CC in RWB.
The error states that '
Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'MATMAS' (structure 'STATEMENT'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.'
My SOAP xml message is
- <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP:Header>
- <sap:Main xmlns:sap="http://sap.com/xi/XI/Message/30" versionMajor="3" versionMinor="0" SOAP:mustUnderstand="1" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
<sap:MessageClass>ApplicationMessage</sap:MessageClass>
<sap:ProcessingMode>asynchronous</sap:ProcessingMode>
<sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
<sap:TimeSent>2008-02-06T22:30:21Z</sap:TimeSent>
- <sap:Sender>
<sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
<sap:Service>ECC</sap:Service>
</sap:Sender>
- <sap:Receiver>
<sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
<sap:Service>BS_JDBC</sap:Service>
</sap:Receiver>
<sap:Interface namespace="http://file_to_jdbc">MI_JDBC_RECEIVER</sap:Interface>
</sap:Main>
- <sap:ReliableMessaging xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
<sap:QualityOfService>ExactlyOnce</sap:QualityOfService>
</sap:ReliableMessaging>
- <sap:DynamicConfiguration xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">
sapecc50\sapmnt\trans</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">UTF-8</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">matmas1.txt</sap:Record>
</sap:DynamicConfiguration>
- <sap:HopList xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
- <sap:Hop timeStamp="2008-02-06T22:30:21Z" wasRead="false">
<sap:Engine type="AE">af.e6e.sapecc6eval</sap:Engine>
<sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
<sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
<sap:Info />
</sap:Hop>
- <sap:Hop timeStamp="2008-02-06T22:30:21Z" wasRead="false">
<sap:Engine type="IS">is.01.sapecc6eval</sap:Engine>
<sap:Adapter namespace="http://sap.com/xi/XI/System">XI</sap:Adapter>
<sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
<sap:Info>3.0</sap:Info>
</sap:Hop>
- <sap:Hop timeStamp="2008-02-06T22:30:22Z" wasRead="false">
<sap:Engine type="AE">af.e6e.sapecc6eval</sap:Engine>
<sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
<sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
</sap:Hop>
</sap:HopList>
- <sap:Diagnostic xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
<sap:TraceLevel>Information</sap:TraceLevel>
<sap:Logging>Off</sap:Logging>
</sap:Diagnostic>
</SOAP:Header>
- <SOAP:Body>
- <sap:Manifest xmlns:sap="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
- <sap:Payload xlink:type="simple" xlink:href="cid:[email protected]">
<sap:Name>MainDocument</sap:Name>
<sap:Description />
<sap:Type>Application</sap:Type>
</sap:Payload>
</sap:Manifest>
</SOAP:Body>
</SOAP:Envelope>
and payload message is
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_JDBC_RECEIVER xmlns:ns0="http://file_to_jdbc">
- <STATEMENT>
- <ROW action="INSERT">
<TABLE>MATMAS</TABLE>
- <access>
<MATNR>38</MATNR>
<MTART>HALB</MTART>
<MATKL>00107</MATKL>
<MEINS>pc</MEINS>
<ERSDA>2008.04.05</ERSDA>
<BRGEW>10</BRGEW>
<NTGEW>12</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>88</MATNR>
<MTART>FERT</MTART>
<MATKL>02004</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2008.04.05</ERSDA>
<BRGEW>12</BRGEW>
<NTGEW>13</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>89</MATNR>
<MTART>FERT</MTART>
<MATKL>02004</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2008.03.02</ERSDA>
<BRGEW>12</BRGEW>
<NTGEW>14</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>98</MATNR>
<MTART>HALB</MTART>
<MATKL>2</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2006.09.01</ERSDA>
<BRGEW>12</BRGEW>
<NTGEW>12</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>170</MATNR>
<MTART>NLAG</MTART>
<MATKL>4</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2005.03.02</ERSDA>
<BRGEW>2</BRGEW>
<NTGEW>3</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>178</MATNR>
<MTART>NLAG</MTART>
<MATKL>4</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2007.03.06</ERSDA>
<BRGEW>3</BRGEW>
<NTGEW>4</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>188</MATNR>
<MTART>NLAG</MTART>
<MATKL>5</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2007.05.02</ERSDA>
<BRGEW>2</BRGEW>
<NTGEW>3</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>288</MATNR>
<MTART>HALB</MTART>
<MATKL>101</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2006.02.11</ERSDA>
<BRGEW>5</BRGEW>
<NTGEW>4</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>358</MATNR>
<MTART>HAWA</MTART>
<MATKL>2</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2007.09.09</ERSDA>
<BRGEW>500</BRGEW>
<NTGEW>500</NTGEW>
<GEWEI>G</GEWEI>
</access>
- <access>
<MATNR>359</MATNR>
<MTART>HAWA</MTART>
<MATKL>2</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2007.08.01</ERSDA>
<BRGEW>20</BRGEW>
<NTGEW>10</NTGEW>
<GEWEI>G</GEWEI>
</access>
</ROW>
</STATEMENT>
</ns0:MT_JDBC_RECEIVER>
Could anybody help me in sorting out this issue.My advance thankshi,
ypur structure is bad defined.
if you want to do an insert, the DT should be
<ns0:MT_JDBC_RECEIVER xmlns:ns0="http://file_to_jdbc">
___<StatementName>
______<dbTableName action=INSERT>
_____<table>MATMAS</table>
_______ <access>
___________<MATNR>38</MATNR>
___________<MTART>HALB</MTART>
___________<MATKL>00107</MATKL>
___________<MEINS>pc</MEINS>
___________<ERSDA>2008.04.05</ERSDA>
___________<BRGEW>10</BRGEW>
___________<NTGEW>12</NTGEW>
___________<GEWEI>KG</GEWEI>
______</access>
_____</dbTableName>
__ </StatementName>
</ns0:MT_JDBC_RECEIVER>
the ROW field is used when you wait receive data from DB for example you execute and SQL Query from Sender communication channel "SELECT name FROM TABLE Names"
so, the result of this query would be, for example:
<row>
____<name>joge</name>
</row>
<row>
____<name>pepe</name>
</row>
<row>
____<name>nicola</name>
</row>
See this link
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
Thanks
Rodrigo
Edited by: Rodrigo Pertierra on Feb 8, 2008 8:40 AM
Edited by: Rodrigo Pertierra on Feb 8, 2008 8:42 AM -
Option to execute one sql at a time
Hi,
I have 10 sql's according to parameter value i have to execute one sql at a time.Currently i am using union all for all 10 sql and according to parameter it is executing one sql.I am getting performance issue while using this approach.It is executing all the 10 sql ,getting result for 1 sql .
As per requirement i can not use ref cursor or procedure.
Is there any other options for this requirement.
Thanks in advance.is this a duplicate of this thread:
Re: problem with union all queries --urgent ?
if so, did you learn anything from the people who tried to help you? -
How to execute a sql script in dbms_job?
how to execute a sql script in dbms_job?
See my response to Re: how to execute a sql script file in procedure or trigger.
Cheers, APC -
Error while executing the .sql file
Hello,
Every time when i execute the below plsql it's keep throwing the error message as show in below output, this happens even when i manually create the trigger before executing the .sql file of all the below statements, can you please correct me what i am doing wrong here. Thank you.
DROP TABLE FCSDWH.REF_DATA_MASTER;
CREATE TABLE FCSDWH.REF_DATA_MASTER
REF_DATA_MASTER_ID NUMBER PRIMARY KEY,
DESCRIPTION VARCHAR2(255 CHAR),
CREATE_ID VARCHAR2(10 CHAR),
CREATE_DT DATE,
LST_UPD_ID VARCHAR2(10 CHAR),
LST_UPD_DT DATE,
ACT_STRT_DT DATE,
ACT_END_DT DATE
TABLESPACE FCSDWH
STORAGE(INITIAL 50K);
DROP SEQUENCE FCSDWH.REF_DATA_MASTER_SEQ;
CREATE SEQUENCE FCSDWH.REF_DATA_MASTER_SEQ START WITH 1 INCREMENT BY 1;
DROP TRIGGER "FCSDWH.REF_DATA_MASTER_TRG";
CREATE OR REPLACE TRIGGER FCSDWH.REF_DATA_MASTER_TRG
BEFORE INSERT ON FCSDWH.REF_DATA_MASTER
FOR EACH ROW
BEGIN
SELECT FCSDWH.REF_DATA_MASTER_SEQ.NEXTVAL INTO :NEW.REF_DATA_MASTER_ID FROM DUAL;
END;
/Output:
SQL> @/home/smadala/REF_DATA_MASTER.SQL
Table dropped.
Table created.
Sequence dropped.
Sequence created.
DROP TRIGGER "FCSDWH.REF_DATA_MASTER_TRG"
ERROR at line 1:
ORA-04080: trigger 'FCSDWH.REF_DATA_MASTER_TRG' does not exist
Trigger created.
SQL>The trigger is "attached" to the table so when you drop the table the trigger goes as well.
John
Maybe you are looking for
-
Link in PDF not opening from within browser
Hi, I have a PDF file with a link to a file share. it works perfctly if i open Adobe Reader and click on the link. However if i open the PDf in browser teh link does not work. Has anyone seen this before? The link is: The error is: Any suggestions ar
-
(SOLVED) Firefox and Sublime calling Cervisia as file manager
I'm using KDE 4.13 Problem In Firefox : When a download is completed, it shows up in Downloads window. When I ask "open containing folder", it will display a warning: http://up.vbiran.ir/uploads/10587140621 - a-warn.png "This is not a CVS folder. If
-
Outputing ALV display on Dynpro
Hello friends, Can someone give me a clue on what I doing wrong? Problem: I have developed a dypro with three Buttons. Button 1: To display table content 1 in ALV Button 2: To display table content 2 in ALv Button 3: To display table content 3 in ALV
-
I5610 All in One Stopped Printing
I have a 5610 All in One Printer which has worked well for two years. Today it will print nothing, regardless of the source. I I have tried turning it on and off. All the software appears to be working correctly. Everything I tried to print from
-
PSE7: Find all photos with any caption?
I'm running PSE7. I have a sub-set of my images selected via a tag. Now I want to find all of images in that set that have any caption at all. So I do a Find/By Caption or Note. Now in the next dialog box is there some way that I can enter a wild car