SQL Statement Ordering with an existing schema
Hi,
Can the Statement Ordering feature be used only if Kodo generates the
schema (Kodo wouldn't be able to retrieve the declared constraints in an
existing schema) ?
Thanks in advance.
Regards.
Statement ordering works for all schemas. The JDBC driver provides
methods to retrieve existing foreign key definitions, so it doesn't
matter if Kodo created the schema or not.
Similar Messages
-
Change open sales order with new condition schema
Hi SD Experts,
I have to change condition type on condition schema. For example, now we have ZPVI (Discount %). I have to change with ZPFI (Discount %). But we have some open sales orders with old schema. Can I correct old sales orders with new condition schema? Is it possible?
Thank you.
Gulay Celik>
Shai Sinai wrote:
> 3) The item categories of document items are assigned to billing plan types. This customization does create separate billing plan for each item, but the billing plans of item are refrenced to the header billing plan (according database field FPLA-RFPLN and screen field RV60F-KFREL), what means that item's values are not taken into consideration.
>
In this case it is obvious that it's not possible to have an item on the same document, which would have a billing plan different from the header. Unless, of course, you are ready to change the existing configuration or create a new item category, which would be independent from the header billing plan.
If, despite configuration, such entry is possible in VA41/VA42, then you'll have to use BDC instead of BAPI. Unfortunately, BAPIs do not have all the same functionality that might be available in the transaction. -
SQL Statement order of execution within batch
Hi all,
Can someone please explain the purpose of the GO command in SSMS. MSDN states it is used to signal the end of a batch of statements. I am trying understand the reasons you need this e.g. variable scope?, statement order of execution?
In particular, I'm concerned with the order of exuction...for example, with the following two statements:
use AdventureWorks2012;
select * from [Sales].[SalesOrderHeader];
Is there any risk that SQL server will attempt to execute the second statement before completing the first?
Thanks inadvance.Sorry Shriven - I somehow initially missed this part of your answer....ignore my original reply. Thanks.
--It will always execute in order
SELECT GETDATE() AS CURRENT_DATETIME INTO #TEMP3
WAITFOR DELAY '00:00:10';-- 10 Seconds Delay
SELECT GETDATE()
WAITFOR DELAY '00:00:15';-- 15 Seconds Delay
SELECT * FROM #TEMP3 -
SQL statement works with SQL/Plus - but not with ODBC
Hi all,
I have a rather copmplex SQL statement:
BEGIN
UPDATE ContentDataTable
SET SYMBOLIC_PATH_PARENT = N'/Test',
SYMBOLIC_NAME = N'HAWK01.GIF',
VERSION_NUMBER = 1 +
SELECT MAX(VERSION)
FROM
(SELECT MAX(VERSION_NUMBER) AS VERSION
FROM ContentDataTable WHERE
SYMBOLIC_PATH_PARENT = N'/Test' AND
SYMBOLIC_NAME = N'HAWK01.GIF'
UNION
SELECT MAX(VERSION_NUMBER) AS VERSION
FROM RevisedContentDataTable WHERE
SYMBOLIC_PATH_PARENT = N'/Test' AND
SYMBOLIC_NAME = N'HAWK01.GIF'))
WHERE SYMBOLIC_PATH_PARENT = N'/Test' AND SYMBOLIC_NAME = N'HAWK02.GIF' AND VERSION_NUMBER = 1;
END;
It works fine in SQL/Plus or SQL Worksheet and does what it should do ;-)
But when using it via ADO (ODBC Driver) I get the following error:
PLS-00103 found 'string' but expected one of the following: 'string'"}
Any idaes?
Thanx,
Christian
nullPardon my ignorance, but what's the significance of the N'<string>' construction? That's not one I'm familar with.
Justin -
Hi, we are evaluating Kodo 3.2.2
If during same transaction one deletes a persistent object and then
creates a new one with the same application identity, kodo disregards the
operation order and executes delete after insert on commit. This either
violates datastore constraints or if there is an unmapped primary key in
datastore, the result is that the object is silently deleted without one
being aware of this.
How in this situation an object those identity consist of other (related)
object keys can be managed? Can an non-embedded object, owned by another
object and the key constructed from a name and the owner id, be managed by
Kodo presenting deletes and creates in the same transaction, without
workarounds?
Thanks,
FedorAbe White wrote:
Actually this should work, and we have internal test cases that suggest itdoes.
Please send a contrary test case to [email protected] and we'll take
a
look.Thanks, the solution did work. -
Workspace to parse SQL statements from multiple database schema's
Hi ,
When go through the following link of workspace admin user :
Home>HTML DB Workspace Administration>Manage Services>Schema Reports>Workspace Schemas there I saw "Your workspace has the privilege to parse SQL statements using the following database schemas. Note that the terms database schema and database user can be used interchangeably.
" at the right pane.
So how can i make my workspace to parse SQL statements from multiple database schema's ?That must be listed there .But i have only one schema in view ? Can i make it multiple ?If then How ?
Anybody have an idea ?
ROSYAssign as many schemas to your workspace as you want using the administration app. Read about it in the doc.
Scott -
Excuting multiple sql statements
Hi to everybody.
I'm quite new to Oracle even if i have quite a big experience with MySQL and SQL commands. I'm facing a problem that I suppose it is a really basic one.
I received a dump of an Oracle database in a .sql format. I mean that both the schema and the data are build through a large number of sql statements. In particular the schema is made through a lot of "create table ..." while the data are built through "insert into..". My need is to import these database in a fresh Oracle database Oracle 10 g XE.
I've installed it on a Debian system and i can succesfully execute a single SQL command both through the web interface http://localhost:8080/apex and logging as oracle user through the sqlplus username/passwd command.
My problem is that the data are split on about 12000 SQL "INSERT INTO.." so executing all of them one by one could be a little annoying :-)
<u>So I'm asking if there is a way to instruct Oracle to execute multiple SQL statements reading it from a file (like MySQL does for example).</u>
I' m considering to write a script to do it if there's no better way. I know that there're better way to dump databases in Oracle but I can change the .sql format since it is the only one that I got.in SQL*Plus you can execute a SQL file with the start command or it's shorthand version @:SQL> start filename.sql
or
SQL> @filename.sql -
Hi,
Can anyone see why I am getting this error message for my SQL query?
WITH SKU_DATA AS (
SELECT /*+ MATERIALIZE */ DISTINCT FROM_LOC_ID,
SKU_ID,
DESCRIPTION,
UPDATE_QTY,
ORDER_ID,
CONSIGNMENT,
WEIGHT,
PALLET_ID,
CASE
WHEN Upd_Qty_Ratio < 1
THEN TO_CHAR(UPDATE_QTY) || 'U'
WHEN TRUNC(Upd_Qty_Ratio) = Upd_Qty_Ratio
THEN TO_CHAR(Upd_Qty_Ratio) || 'C'
ELSE TO_CHAR(TRUNC(UPDATE_QTY)) || 'C' || ' ' || TO_CHAR(ROUND(MOD(Upd_Qty_Ratio, 1) * USER_DEF_NUM_3, 6)) || 'U'
END CU_Sum
FROM (
SELECT DISTINCT
FROM_LOC_ID,
S.SKU_ID,
S.DESCRIPTION,
ITL.UPDATE_QTY,
S.USER_DEF_NUM_3,
OH.ORDER_ID,
ITL.CONSIGNMENT,
ITL.PALLET_ID,
NVL(ITL.UPDATE_QTY,0)*NVL(S.EACH_WEIGHT,0) Weight,
ITL.UPDATE_QTY/(CASE S.USER_DEF_NUM_3 WHEN 0 THEN 1 ELSE S.USER_DEF_NUM_3 END) Upd_Qty_Ratio
FROM INVENTORY_TRANSACTION ITL, SKU S, LOCATION L, ORDER_HEADER OH
WHERE ITL.SKU_ID = S.SKU_ID
AND ITL.CODE = 'Pick'
AND ITL.CONSIGNMENT = $P{Consignment}
AND OH.ORDER_DATE = TO_CHAR($P{Date}, 'DD-Mon-YYYY')
AND OH.ORDER_ID = ITL.REFERENCE_ID
AND ITL.TO_LOC_ID = 'CONTAINER'))
SELECT DISTINCT ORDER_ID, CONSIGNMENT, WEIGHT, PALLET_ID, CU_Sum,
(SELECT NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'U') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'C',NULL) END)),'0') ||'C' || ' ' || NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'C') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'U',NULL) END)),'0') ||'U' FROM SKU_DATA) AS Total_Cu_Sum
FROM SKU_DATAThanks in advance.
SM.Hi Sean,
It is saying error executing SQL statement, but with no "ORA error" so maybe its a Jasper Reports error i'm not too sure.
And this is a different version of the one we done together, that one is running fine just having problems putting the jasper file on to the server. I'm just using the main bits from the original SQL.
SM -
dear all,
is it possible to write sql statement in ECC without abap? e.g. test a sql statement query with any abap required?check this
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40bec8da-4cd8-2910-27a9-81f5ce10676c
a® -
Expensive SQL statements & no proper indexing INCLUDE LPSSTU03-PSST FuncGrp
Hi there forum
During a recent upgrade we have implemented EhP4 with relevant Support Packs.
Our Early Watch Report nows highlights INCLUDE LPSSTU03 in Function Module Group PSST as having expensive SQL statements along with improper indexing.
Although I have seached through OSS and Forums I can find nothing of help.
Is there an EXPERT out there who can help because SAP tells me that is the way it works!
Thanks.
Carl Cavendish-DaviesHerewith the latest results from the Early Watch report on this issue:
Object Type Total Executions Disk Reads Elapsed Time Buffer Gets Records Processed
TABLE 242481 1873373 12035981 36237218 34390383
SELECT
"MANDT" , "OBJNR" , "STAT" , "CHGNR" , "USNAM" , "UDATE" , "UTIME" , "TCODE" , "CDTCODE" , "INACT" , "CHIND"
FROM
"JCDS"
WHERE
"MANDT" = :A0 AND "OBJNR" IN ( :A1 , :A2 , :A3 , :A4 , :A5 )&
Execution Plan
V$SQL_PLAN addr= C000000774FF4038 hash= 3408408745 sql_id 4w93fuv5khc59
SELECT STATEMENT Estimated Costs= 6 Estimated Rows= 0 Optimizer: ALL_ROWS
3 INLIST ITERATOR
2 TABLE ACCESS BY INDEX ROWID JCDS
Estimated Costs= 5 Estimated Rows= 28 Estim. Bytes: 1,848
Estim. CPU-Costs = 41,426 Estim. IO-Costs = 5
1 INDEX RANGE SCAN JCDS~0
Estimated Costs= 1 Estimated Rows= 28 Access predicates:
"MANDT"=:A0 AND (("OBJNR"=:A1 OR "OBJNR"=:A2 OR "OBJNR"=:A3 OR "OBJNR"=:A4
OR "OBJNR"=:A5)) Search Columns: 2 Estim. CPU-Costs = 6,777 Estim. IO-Costs = 1
Program Data:
Origin of ABAP coding
Program Name Line Created By Last Changed By Last Changed On
LPSSTU03 44 SAP SAP 25.03.2003
000044 SELECT * FROM JCDS
000045 APPENDING CORRESPONDING FIELDS OF TABLE T_JCDS
000046 FOR ALL ENTRIES IN R_OBJNR
000047 WHERE OBJNR = R_OBJNR-OBJNR. -
Expensive SQL statements & no proper indexing INCLUDE LBSVAU14-BSVA FuncGrp
Expensive SQL statements & no proper indexing INCLUDE LBSVAU14 - Function Group BSVA (Status management)
Hi there Forum
During a recent upgrade we have implemented EhP4 with relevant Support Packs.
Our Early Watch Report nows highlights INCLUDE LBSVAU14 as having expensive SQL statements along with improper indexing.
Although I have seached through OSS and Forums I can find nothing of help.
Is there an EXPERT out there who can help because SAP tell me that is the way it works!
Thanks.
Carl Cavendish-DaviesHerewith the latest results from the Early Watch report on this:
Object Type Total Executions Disk Reads Elapsed Time Buffer Gets Records Processed
TABLE 457663 3282704 21081305 28310151 20031340
SELECT
FROM
"JEST"
WHERE
"MANDT" = :A0 AND "OBJNR" IN ( :A1 , :A2 , :A3 , :A4 , :A5 )&
Execution Plan
V$SQL_PLAN addr= C000000774FF4038 hash= 3408408745 sql_id 4w93fuv5khc59
SELECT STATEMENT Estimated Costs= 3 Estimated Rows= 0 Optimizer: ALL_ROWS
3 INLIST ITERATOR
2 TABLE ACCESS BY INDEX ROWID JEST
Estimated Costs= 3 Estimated Rows= 10 Estim. Bytes: 330
Estim. CPU-Costs = 20,886 Estim. IO-Costs = 3
1 INDEX RANGE SCAN JEST~0
Estimated Costs= 1 Estimated Rows= 10 Access predicates:
"MANDT"=:A0 AND (("OBJNR"=:A1 OR "OBJNR"=:A2 OR "OBJNR"=:A3 OR "OBJNR"=:A4
OR "OBJNR"=:A5)) Search Columns: 2 Estim. CPU-Costs = 6,137 Estim. IO-Costs = 1
Program Data:
Origin of ABAP coding
Program Name Line Created By Last Changed By Last Changed On
LBSVAU14 110 SAP SAP 08.04.2007
000110 SELECT * FROM JEST CLIENT SPECIFIED
000111 APPENDING TABLE JEST_BUF
000112 FOR ALL ENTRIES IN OBJNR_TAB
000113 WHERE MANDT EQ CLIENT
000114 AND OBJNR = OBJNR_TAB-OBJNR. -
Expensive SQL statements & no proper indexing INCLUDE LBSVAF14-BSVA FuncGrp
Expensive SQL statements & no proper indexing INCLUDE LBSVAF14 - Function Group BSVA (Status management)
Hi there Forum
During a recent upgrade we have implemented EhP4 with relevant Support Packs.
Our Early Watch Report nows highlights INCLUDE LBSVAF14 as having expensive SQL statements along with improper indexing.
Although I have seached through OSS and Forums I can find nothing of help.
Is there an EXPERT out there who can help because SAP tell me that is the way it works!
Thanks.
Carl Cavendish-DaviesHerewith the latest results from the Early Watch report on this:
Cache Statistics
Object Type Total Executions Disk Reads Elapsed Time Buffer Gets Records Processed
TABLE 1716707 1854501 13325961 25580720 19606427
SELECT
FROM
"JEST"
WHERE
"MANDT" = :A0 AND "OBJNR" = :A1&
Execution Plan
V$SQL_PLAN addr= C000000774FF4038 hash= 3408408745 sql_id 4w93fuv5khc59
SELECT STATEMENT Estimated Costs= 2 Estimated Rows= 0 Optimizer: ALL_ROWS
2 TABLE ACCESS BY INDEX ROWID JEST
Estimated Costs= 1 Estimated Rows= 2 Estim. Bytes: 66
Estim. CPU-Costs = 8,804 Estim. IO-Costs = 1
1 INDEX RANGE SCAN JEST~0
Estimated Costs= 1 Estimated Rows= 2
Access predicates: "MANDT"=:A0 AND "OBJNR"=:A1 Search Columns: 2
Estim. CPU-Costs = 5,817 Estim. IO-Costs = 1
Program Data:
Origin of ABAP coding
Program Name Line Created By Last Changed By Last Changed On
LBSVAF14 81 SAP SAP 08.04.2007
000080 * Einzelstatus von DB lesen in interne Tabelle
000081 SELECT * FROM JEST CLIENT SPECIFIED
000082 APPENDING TABLE JEST_TAB
000083 WHERE MANDT = MANDT
000084 AND OBJNR = OBJNR. -
Expensive SQL statements & no proper indexing in INCLUDE LV70AF01-SAPLV70A
Hi there forum
During a recent upgrade we have implemented EhP4 with relevant Suppoert Packs.
Our Early Watch Report nows highlights INCLUDE LV70AF01 in Module SAPLV70A as havinf a multitude of expensive SQL statements along with improper indexing.
Although I have seached through OSS and Forums I can find nothing of help.
Is there an EXPERt out there who can help because SAP tell me that is the way it works!
Thanks.
Carl Cavendish-DaviesHerewith the results of our latest Early Watch report on this issue:
Statement Data:
Cache Statistics
Object Type Total Executions Disk Reads Elapsed Time Buffer Gets Records Processed
TABLE 261 1107862 11465343 170865092 4
SELECT
FROM
"NAST"
WHERE
"MANDT" = :A0 AND "KAPPL" = :A1 AND "KSCHL" = :A2 AND "NACHA" = :A3 AND "VSTAT" = :A4 AND "VSZTP" = :A5 AND "AKTIV" = :A6&
Execution Plan
V$SQL_PLAN addr= C000000774FF4038 hash= 3408408745 sql_id 4w93fuv5khc59
SELECT STATEMENT Estimated Costs= 1,338 Estimated Rows= 0 Optimizer: ALL_ROWS
2 TABLE ACCESS BY INDEX ROWID NAST
Estimated Costs= 1,338 Estimated Rows= 150
Filter predicates: ("NACHA"=:A3 AND "VSTAT"=:A4 AND "VSZTP"=:A5)
Estim. Bytes: 41,700 Estim. CPU-Costs = 13,539,142 Estim. IO-Costs = 1,336
1 INDEX RANGE SCAN NAST~I
Estimated Costs= 19 Estimated Rows= 8,093 Filter predicates: "AKTIV"=:A6
Access predicates: "MANDT"=:A0 AND "KAPPL"=:A1 AND "KSCHL"=:A2 AND "AKTIV"=:A6
Search Columns: 4 Estim. CPU-Costs = 988,073 Estim. IO-Costs = 19
Program Data:
Origin of ABAP coding
Program Name Line Created By Last Changed By Last Changed On
LV70AF01 930 SAP SAP 07.06.2001
000930 SELECT * FROM nast INTO TABLE ct_messages
000931 WHERE kappl IN irt_application
000932 AND kschl IN irt_type
000933 AND nacha IN irt_medium
000934 AND vstat IN irt_status
000935 AND vsztp IN irt_timing
000936 AND aktiv EQ space. -
i am looking for sql statement monitor, similar to mssql's sql profiler.
is there tool that allows the user to monitor all sql statements ran by a specific user or sql statements received by a certain schema?
statement tracer for oracle doesn't work. i dont know why.
in EM (10g), there is sessions > sql tab but it is not real time.
i tried toad but i cant easily install it in the client. any other ways of doing it?
any other solutions?
Edited by: jdm811 on Jul 19, 2011 12:59 AMV$SESSION tells you about current sessions, whether they are active (STATUS), what they are executing (SQL_ID) and other metadata available about the session (MODULE, PROGRAM, MACHINE, TERMINAL, etc).
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm#REFRN30223
ASH - Active Session History - contains samples of active sessions - like most dictionary views, etc the exact columns depends on version.
As mentioned above, you need to be licensed for Diagnostic Pack for this.
V$ACTIVE_SESSION_HISTORY is a buffer of active sessions sampled every second.
The buffer is flushed to DBA_HIST_ACTIVE_SESS_HISTORY but by default only 1 in 10 sessions is retained in the repository.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/autostat.htm#i35568
If you need more data and more detail than this then you should look at enabling AUDIT:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/security.htm#sthref2916 -
TestStand Open SQL Statement does not support SQL's ORDER BY clause???
TestStand 1.0.3
Windows 2000 SP1
SQL Server 2000 Personal
You've got to be kidding me...
It appears that the built-in TestStand Open SQL Step does NOT support the
"ORDER BY" clause in the SELECT statement, even though the documentation
says it does. Is this true?
I have an Open SQL Statement query:
"SELECT * FROM [MyTable] WHERE ([Batch ID]=1234)"
it works fine, returning a correct record count 120 records. If I change
the Open SQL Statement query simply by adding an ORDER BY clause, such as:
"SELECT * FROM [MyTable] WHERE ([Batch ID]=1234) ORDER BY [MyField] ASC"
it returns a record count of zero. I know that "MyField" exists in the
MyTable table and contains valid data. The
second query works fine in SQL
Server Enterprise Manager.
Am I missing something? Is it true that the TestStand Open SQL Step does
NOT support the "ORDER BY" clause? If not, what &#$!ing good is it and why
does the manual state it is supported? Is there any other way using just
the TestStand steps to order a database recordset on one or more fields?
Any help would be appreciated.
Grrrrr....
Bob Rafuse
Etec Inc.> Bob -
> The database step types do not do anything special to the SQL command
> that you give it. The step just passes the command to the ADO
> provider. I tried a simple query using the step types with the
> following command,
>
> "SELECT UUT_RESULT.* FROM UUT_RESULT WHERE ([UUT_SERIAL_NUMBER] =
> 12345) ORDER BY [EXECUTION_TIME] ASC"
>
> and this return the expected results and the record count parameter
> was as expected. I tried this on TS 1.0.2 and TS 2.0 with MS Access
> 2000 and MS SQL Server 7.0. I do not have MS SQL Server 2000 at this
> time.
>
> It would be surprised if the step types are messing something up.
I've been doing some experimenting over the past couple of days. Simple,
one-table queries seem to handle the ORDER BY clause fine. Th
ings seem to
get messed up when I try multi-table queries with ORDER BY clause with the
TestStand database steps. I get no errors but the returned record counts
are always 0 with the ORDER BY and positive without the ORDER BY. The exact
same queries work fine in Visual Basic/ADO and the SQL Server Query
Analyzer.
> Questions:
> 1. Have you verified whether the data is actually returned even though
> the record count is zero?
Hmmm... yes data IS getting returned (at least on the two instances I just
checked), but the record count is always zero. I was not proceeding with
processing if the record count was 0.
Still... I don't know how to loop through the recordset without knowing how
many records there are an not eventually generate an error by passing EOF.
Is there another way using the TestStand database steps to determine a) the
number of records in the recordset or b) when I'm at EOF?
> 2. Are you using any advanced options on the Opend SQL Statement step
> type, specifically
the cursor type set to forward only? Forward only
> cursors do not allow for record counts.
Everything on the Advanced tab of the Open SQL Statement step is set to "Use
Default".
Bob.
Maybe you are looking for
-
Format an External Drive to Work on PC and MAC
I am trying to format my external hard drive so that I can view files stored on it on both my MAC and PC. I think this can be accomplished through the disk utility, but trial and error have not gotten me far. Thanks joe
-
Error message when opening itunes...The itunes library.itl cannot be read because it was created in a newer version of itunes... how do i fix, it will not open with any of my ipod, ipad, iphone.
-
HP 4635 wont print on windows 8
have set up a new HP 4635 on windows 8 samsung notebook. Printer shows ready and also progress window shows"printing". But no print when using my apple notebook all works fine
-
DiVi CAM 316 with 1GB SD?
I just bought a DiVi CAM 316 and need to purchase SD card. Can the DiVi CAM 316 support 1 GB SD? Hope someone is able to help. Thanks in advance.
-
When migrating from PC to Mac is it necessary to restore iPad to factory settings?
Hi everyone! I recently decided to migrate from PC to Mac. Everything is amazingly easy now. I have already migrated my iTunes Library with no hassle and I am very pleased with my decision. I had no problem either with my iPhone nor my iPod but with