Problem with statement like
Dear all
when I do a select I can work with the statement like
CONCATENATE WA_DEL-FIELD '%' INTO I_FIELD.
SELECT * FROM ZTABLE INTO TABLE IT_ITAB
WHERE FIELD LIKE I_FIELD.
how do I can do the same question for a if command for a field ?
I was thinking with the statement (FIELD = ABCDEFG) (I_FIELD-SIGN = I / I_FIELD-OPTION = 'EQ' / I_FIELD-LOW = 'ABC*'
IF FIELD IN I_FIELD
should work, but it was not working..... what do I need to do
Hello,
Silly mistake ... You have to use the OPTION as CP ( C ontains P attern ) instead of EQ
(I_FIELD-SIGN = I / I_FIELD-OPTION = 'CP' / I_FIELD-LOW = 'ABC*'
BR,
Suhas
Similar Messages
-
Problem with gcc-like inline assembly in cc
Hi,
I am trying to compile the following code for a sparc machine using sun studio 12.
#define MAGIC(n) asm("sethi %0, %%g0" : :"g"(n));
int main(int argc, char **argv)
int x=1;
MAGIC(x);
return 0;
}I am using the following command:
cc -xO3 -xtarget=ultra2 -m32 -xarch=sparcvis -xregs=no%appl -w test.c -o test
and I get the following error:
cg error (as) : "__gnu_asm_inline_fake_test.c (template for __gnu_asm_inline_temp_func_001)", line 1 : statement syntax
cc: cg failed for test.c
Isn't Sun cc supposed to support gcc-like inline assembly? If so, what is the problem with the code above?
Thanks in advance,
NickHi,
we have the same Problem with the inline assembler. We are using Sunstudio 12 on x86 and tried to get this code compiled (Sunstudio 12 should be gas compatible).
any ideas ?
thanks
Dieter
#define HEC_HTONF(x) \
(__extension__ \
register HVB::float32_t __v, __x = (x); \
__asm__ ( \
"bswap %0" \
: "=r" (__v) \
: "0" (__x) \
__v; \
#define HEC_HTONLF_INPLACE(x) \
__asm__ ( \
"leal %0, %%ecx \n\t" \
"movl (%%ecx), %%eax \n\t" \
"movl 4(%%ecx), %%edx \n\t" \
"bswap %%eax \n\t" \
"bswap %%edx \n\t" \
"movl %%eax, 4(%%ecx) \n\t" \
"movl %%edx, (%%ecx) \n\t" \
: "=m" (x) \
: "m" (x) \
: "%eax", "%ecx", "%edx" \
); -
SCOM 2012 R2 Continued Problems with State Widget
Hi All,
Just want to see if anyone is seeing problems with the state widget in R2. Confirmed that if the criteria selection page is left blank, that the widget will render, if anything is selected it just loads and loads and loads finally with an error (follows,
first). Corresponding error in event log (follows, second). I thought this was resolved with UR4?
Error in console===============
Microsoft.EnterpriseManagement.Common.UnknownDatabaseException:
The query processor ran out of internal resources and could not produce a query
plan. This is a rare event and only expected for extremely complex queries or
queries that reference a very large number of tables or partitions. Please
simplify the query. If you believe you have received this message in error,
contact Customer Support Services for more information.
at
Microsoft.EnterpriseManagement.Common.Internal.ServiceProxy.HandleFault(String
methodName, Message message)
at
Microsoft.EnterpriseManagement.Common.Internal.EntityObjectsServiceProxy.GetRelatedManagedEntitiesByManagedEntityTypesAndCriteriaWithInstanceQueryOptions(IList`1
parentManagedEntityIds, Boolean recurse, IList`1 managedEntityTypeIds, IList`1
managedEntityBaseTypeIds, IList`1 criterias, String languageCode,
InstanceQueryOptions instanceQueryOptions)
at
Microsoft.EnterpriseManagement.InstancesManagement.GetRelatedObjectsInternal[T](ICollection`1
instanceIds, ICollection`1 criteriaCollection, TraversalDepth traversalDepth,
ObjectQueryOptions queryOptions)
at
Microsoft.EnterpriseManagement.Management.DataProviders.ManagedEntityProvider.GetContainedManagedEntities(IDataObjectCollection
targetEntities, ICollection`1 recursionTypeNames, ICollection`1 baseTypeNames,
String criteriaString, List`1 valueDefinitions, List`1 sortValueDefinitions,
String typePropertyName, String typeWithIconPropertyName, Boolean
propertyCollectionRequested)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethodInvoker.Invoke()
at
Microsoft.EnterpriseManagement.Monitoring.DataProviders.RetryCommandExecutionStrategy.Invoke(IDataProviderCommandMethodInvoker
invoker)
at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethod.Invoke(CoreDataGateway
gateWay, DataCommand command)
at
Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.ExecuteInternal[TResult](DataCommand
command)
at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.<ExecuteAsync>b__0[TResult](<>f__AnonymousType0`1
data)
Error in Event Log==============
GetRelatedManagedEntitiesByManagedEntityTypesAndCriteriaWithInstanceQueryOptions
for session ID uuid:9078152d-9ff1-4c68-a997-c8088a16a34c;id=5.<o:p></o:p>
Exception
message: The creator of this fault did not specify a Reason.<o:p></o:p>
Full
Exception:
System.ServiceModel.FaultException`1[Microsoft.EnterpriseManagement.Common.UnknownDatabaseException]:
The creator of this fault did not specify a Reason. (Fault Detail is equal to
The query processor ran out of internal resources and could not produce a query
plan. This is a rare event and only expected for extremely complex queries or
queries that reference a very large number of tables or partitions. Please
simplify the query. If you believe you have received this message in error,
contact Customer Support Services for more information.).<o:p></o:p>
<o:p></o:p>I am so sorry for my mistake. Below is the url.
http://blogs.technet.com/b/scom_atlas/archive/2013/10/22/scom-2012-sp1-ur4-is-out.aspx
Juke Chou
TechNet Community Support -
Problems with statement cache using OCI
Hello!
We recently changed our program to use statement cache, but we found a problem and not yet a solution.
We have problems in this situation:
OCIEnvCreate();
OCIHandleAlloc();
OCILogon2(..... OCI_LOGON2_STMTCACHE);
OCIStmtPrepare2("CREATE TABLE db_testeSP (cod_usuario INTEGER, usuario CHAR(20), dat_inclusao DATE)")
OCIStmtExecute();
OCIStmtRelease(... OCI_DEFAULT);
OCIStmtPrepare2("INSERT INTO db_testeSP (1,\'user\',CURRENT_DATE");
OCIStmtExecute();
OCIStmtRelease(... OCI_DEFAULT);
OCIStmtPrepare2("SELECT * FROM db_testeSP");
OCIStmtExecute();
OCIStmtRelease(... OCI_DEFAULT);
OCIStmtPrepare2("DROP TABLE db_testeSP");
OCIStmtExecute();
OCIStmtRelease(... OCI_DEFAULT);
OCIStmtPrepare2("CREATE TABLE db_testeSP (cod_usuario INTEGER, usuario CHAR(20), idade INTEGER, dat_inclusao DATE)");
OCIStmtExecute();
OCIStmtRelease(... OCI_DEFAULT);
OCIStmtPrepare2("INSERT INTO db_testeSP (1,\'user\',20,CURRENT_DATE");
OCIStmtExecute();
OCIStmtRelease(... OCI_DEFAULT);
OCIStmtPrepare2("SELECT * FROM db_testeSP");
OCIStmtExecute();
OCIStmtRelease(... OCI_DEFAULT);
On the second Select (wich is in bold), returns -1 from Execute, and if I get the error with OCIErrorGet I have: ORA-00932 - inconsistent datatypes
Researching I discovered that this is statement cache problem, is there a way to clear the cache of one table ? I'm asking this because I could clear whenever there is a DROP TABLE or ALTER TABLE instruction (but I don't know what statements will need to be cleared from the cache). I can't clear all the cache because I may have other statements from other tables on the cache.
This situation above is just an example, but I think that this will cause other problems too.
Our program is a gateway from the main program and database, so I don't know the SQL instructions before executing. How can we resolve this problem?
I have tested this issue with Oracle 10g (10.2.0.4.0) and 11g (11.2.0.1.0) both 64 bits and the result is the same (the OCI is version 11.2.0).
We appreciate any help.
Thanks in advance,
DanielAfter long time searching for answers, apparently this is expected to happen and the program should not use Statement caching in this situation.
I found this on an Oracle document (Tuning Data Source Connection Pools - 11g Release 1 (10.3.6)) and we will need to review the use of statement caching.
Stay as a tip for others who might be in the same situation. -
Hi! I've got a VI intended to control a storage tank. I've tried to do that by creating a simple state machine that changes the value(on/off) of some valves basing on 2 conditions:
-when a certain temperature reaches a pre-set value AND its derivative is <0, the state must change from on to off,
-when some time passes the state must change from off to on.
Unfortunately I can't get this work as it never changes state (e.g if I start with on always remain on "on" and viceversa).
Could you please tell me what I'm doing wrong? I'm attaching the screenshots of the 2 states.
Thanks!
Solved!
Go to Solution.
Attachments:
screenshot1.jpg 302 KB
screenshot2.jpg 300 KBIt looks like your shift regsiter might not be wired correctly.
Attachments:
screenshot1.jpg 303 KB -
hi,
in my app i would like to code something what you see in the
code.
but this is not possible, because now i have two buttons with
the id 1.
what is the best way to solve this? especially when you have
lots of buttons? i mean, i need the id when i want to remove the
child...
thanks!my example is quite abstract. so the code is not working, of
course...
but yes, i try to add the same btn in more then on state. -
so this is not possibel?
when i can't add the same btn twice, i have to use one button
in two states, and change its properties and styles...
but how do i change the eventhandler?
thanks -
Problem with statement after upgrading to 11g
Hello,
We recently upgraded to 11g from 9i and one of our statements we routinely use no longer works. The statement is:
delete from ALLEMPLOYEES x where exists( (select * from ALLEMPLOYEES where email_id=x.email_id) minus (select * from X_ALLEMPLOYEES where email_id=x.email_id));
This statement deletes no rows from the ALLEMPLOYEES table. When we run this statement as a check:
(select * from ALLEMPLOYEES) MINUS (select * from X_ALLEMPLOYEES);
We find many rows produced. Why would the delete fail now? We have colleagues still using 9i and use this same delete statement and it works for them with no trouble.Do you have proper indexes?
SQL> select *
2 from v$version
3 /
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> create table emp1 as select * from emp where deptno != 30
2 /
Table created.
SQL> create index emp1_idx_comm on emp1(comm)
2 /
Index created.
SQL> create index emp_idx_comm on emp(comm)
2 /
Index created.
SQL> explain plan for
2 delete emp e
3 where exists(
4 select *
5 from emp
6 where comm = e.comm
7 minus
8 select *
9 from emp1
10 where comm = e.comm
11 )
12 /
Explained.
SQL> @?\rdbms\admin\utlxpls
PLAN_TABLE_OUTPUT
Plan hash value: 1994471334
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | DELETE STATEMENT | | 1 | 28 | 9 (34)| 00:00:01 |
| 1 | DELETE | EMP | | | | |
| 2 | NESTED LOOPS | | 1 | 28 | 9 (34)| 00:00:01 |
| 3 | VIEW | VW_SQ_1 | 14 | 182 | 8 (25)| 00:00:01 |
| 4 | MINUS | | | | | |
| 5 | SORT UNIQUE | | 14 | 532 | | |
PLAN_TABLE_OUTPUT
| 6 | TABLE ACCESS FULL| EMP | 14 | 532 | 3 (0)| 00:00:01 |
| 7 | SORT UNIQUE | | 8 | 696 | | |
| 8 | TABLE ACCESS FULL| EMP1 | 8 | 696 | 3 (0)| 00:00:01 |
|* 9 | INDEX RANGE SCAN | EMP_IDX_COMM | 1 | 15 | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
9 - access("VW_COL_1"="E"."COMM")
filter("E"."COMM" IS NOT NULL)
PLAN_TABLE_OUTPUT
Note
- dynamic sampling used for this statement (level=2)
26 rows selected.
SQL> explain plan for
2 delete emp
3 where comm is not null
4 and comm not in (
5 select comm
6 from emp1
7 where comm is not null
8 )
9 /
Explained.
SQL> @?\rdbms\admin\utlxpls
PLAN_TABLE_OUTPUT
Plan hash value: 123997034
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | DELETE STATEMENT | | 3 | 84 | 1 (0)| 00:00:01 |
| 1 | DELETE | EMP | | | | |
| 2 | NESTED LOOPS ANTI| | 3 | 84 | 1 (0)| 00:00:01 |
|* 3 | INDEX FULL SCAN | EMP_IDX_COMM | 4 | 60 | 1 (0)| 00:00:01 |
|* 4 | INDEX RANGE SCAN| EMP1_IDX_COMM | 1 | 13 | 0 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
3 - filter("COMM" IS NOT NULL)
4 - access("COMM"="COMM")
filter("COMM" IS NOT NULL)
Note
- dynamic sampling used for this statement (level=2)
22 rows selected.
SQL> SY. -
hi, when my macbook air Going to sleep the device still working and not really in a state of sleep so happens that the battery is over me at night and left with a few percent in the morning
The following command (in terminal) will show you why your computer is not going to sleep:
pmset -g assertions -
Problem with statement.cancel()
Hi,
I am using Oracle 10g with the 10.2.0.3 jdbc (OCI) drivers. Though my statement.quertTimeout() works fine, the statement.cancel() does not seem to do anything.
Could you please guide me as to the cause of this kind of action, since I have read that internally queryTimeout() depends on cancel() to stop qurery execution.
Thanks in advanceHi,
I am using Oracle 10g with the 10.2.0.3 jdbc (OCI)
drivers. Though my statement.quertTimeout() works
fine, the statement.cancel() does not seem to do
anything.
Could you please guide me as to the cause of this
kind of action, since I have read that internally
queryTimeout() depends on cancel() to stop qurery
execution.
Thanks in advanceThe code I am using is:
package test;
import java.sql.*;
import oracle.jdbc.pool.OracleDataSource;
import oracle.jdbc.driver.*;
public class OracleQueryTimeout
public static void main(String[] args)
long timetaken; // Holds the execution time
int numFetchedRows = 0;
// Create a OracleDataSource instance
OracleDataSource ods;
try {
ods = new OracleDataSource();
//Sets the driver type
ods.setDriverType("oci");
// Sets the database server name
ods.setServerName("<my machine name>");
// Sets the database name
ods.setDatabaseName("orcl");
// Sets the port number
ods.setPortNumber(1521);
// Sets the user name
ods.setUser("<username>");
// Sets the password
ods.setPassword("<password>");
// Create a connection object
Connection connection;
connection = ods.getConnection();
// Sets the auto-commit property for the connection to be false.
connection.setAutoCommit(false);
Statement stmt = null;
String query = "Select * from USER_CATEGORY,MV_SUBSCRIBER_ATTRIBS";
stmt=connection.createStatement();
stmt.setQueryTimeout(0);
// Get time at start of query
long initialTime = System.currentTimeMillis();
// Execute the Query in query
ResultSet rst = stmt.executeQuery(query);
long finalTime = System.currentTimeMillis();
timetaken = finalTime - initialTime;
if(timetaken>0003)
stmt.cancel();
System.out.println("Statement Cancelled");
//Populate the ResultSet object
while ( rst.next() )
numFetchedRows++;
rst.getObject(1);
System.out.println("Time taken for query: " + timetaken);
System.out.println("Number of rows fetched: " + numFetchedRows);
System.out.println(rst);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
The program hangs when it comes to retrieving the >resultset
The program gives the following output If I do not go through the resultset:
Statement Cancelled
Time taken for query: 50782
Number of rows fetched: 0
oracle.jdbc.driver.OracleResultSetImpl@1a85d38Here the cancel method was invoked but to no visible action. -
Interactive Reports - problem with umlaute like 'ü'
Hello,
when i display an interactive report, all data and umlaute like "ü" was display correct.
But when i set an filter like "häuser" and then press search, the filtertext was changed to: 'häuser'.
Is this a language or character-set problem of the ajax engine?
thank you for any hint.
Danielhi there,
this helped me to solve the problem:
http://www.oracle.com/technology/products/database/application_express/html/freq_solved_faq.html#04
regards
frank -
CATS report RCATSP01: Problem with statement IMPORT FROM MEMORY ID.
Hi Guys,
I am trying to create a Z custom report using SAP template RCATSP01. In template report there is an IMPORT statement as below.
IMPORT icatsd
catsfields
fieldtab
FROM MEMORY ID 'LR2'.
When I run the report in debug mode, I found there is no data in ICATSD, CATSFIELDS & FIELDSTAB.
What should I do to get the data in these internal tables.
Thanks,
MiniI don't think this report is meant to be used as a stand-alone report; it's called within CATS time entry (e.g. CAT2 when user select print time sheet) which would export the info to 'LR2' memory prior to calling this report.
-
Cm:select performance problem with multiple likes query clause
I have query like <br>
<b>listItem like '*abc.xml*' && serviceId like '*xyz.xml*'</b><br>
Can we have two likes clauses mentioned above in the cm:select. The above is executing successfully but takes too much time to process. <br><br>
Can we simplify the above mentioned query or any solution. Please help me in this issue.<br><br>
Thanks & Regards,<br>
Murthy NalluriA few notes:
1. You seem to have either a VPD policy active or you're using views that add some more predicates to the query, according to the plan posted (the access on the PK_OPERATOR_GROUP index). Could this make any difference?
2. The estimates of the optimizer are really very accurate - actually astonishing - compared to the tkprof output, so the optimizer seems to have a very good picture of the cardinalities and therefore the plan should be reasonable.
3. Did you gather index statistics as well (using COMPUTE STATISTICS when creating the index or "cascade=>true" option) when gathering the statistics? I assume you're on 9i, not 10g according to the plan and tkprof output.
4. Looking at the amount of data that needs to be processed it is unlikely that this query takes only 3 seconds, the 20 seconds seems to be OK.
If you are sure that for a similar amount of underlying data the query took only 3 seconds in the past it would be very useful if you - by any chance - have an execution plan at hand of that "3 seconds" execution.
One thing that I could imagine is that due to the monthly data growth that you've mentioned one or more of the tables have exceeded the "2% of the buffer cache" threshold and therefore are no longer treated as "small tables" in the buffer cache. This could explain that you now have more physical reads than in the past and therefore the query takes longer to execute than before.
I think that this query could only be executed in 3 seconds if it is somewhere using a predicate that is more selective and could benefit from an indexed access path.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Problems with characters like "Á", "É"
Hi, I'm having trouble when reading data with characters "Á", "É", "Ñ" from a database. If I use this:
stmt = this.conexion.createStatement ();it works fine, but of course cannot access the records in the ResultSet but with method next ().
As I wanted to use absolute (), first (), etc. I wrote that:
stmt = this.conexion.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);but when I try to read for example the word "PÉREZ", I get the word "0x50C38952455A".
Can anyone help? Thanks in advance.This is my connection code:
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(url, login, password);The code that works:
(1)
stmt = conn.createStatement ();The code that doesn't:
(2)
stmt = conn.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);Then, the same code to execute the query:
rs = stmt.executeQuery ("SELECT MY_VARCHAR_FIELD FROM MY_TABLE");And to retrieve the value:
String myValue = rs.getString ("MY_VARCHAR_FIELD");The odd thing is that before using a scrollable ResultSet (code snippet (1)), this worked perfectly. But, since I changed to code snippet (2), it doesn't for those characters. -
OS: Windows Vista
Are you opening tab with those pages via session restore?
Tools > Options > General > Startup: "When Firefox Starts": "Show my windows and tabs from last time"
You may want to revert the change that has been made to the default value (0) of the pref browser.sessionstore.privacy_level and set the value to 1 that is used in Firefox 3 or disable saving such data with a value of 2.
See:
*http://kb.mozillazine.org/browser.sessionstore.privacy_level -
I am doing multiple comparisons, but for some reason it is
complaining about my usage of the word and. This is my script
on exitFrame
if sprite(12).loc = point(450, 388) and
sprite(13).loc = point(408, 390) and
sprite(14).loc = point(320, 389) and
sprite(15).loc = point(358, 389) and
sprite(16).loc = point(285, 389) then
go to frame 26
else
go to the frame
end if
end
Any help in letting me know whats wrong would be a great
help.
thanksIf you are really putting each condition on a single line
then you need
to add the continuation character to the end. Otherwise put
it all on
one line.
nick2price wrote:
> I am doing multiple comparisons, but for some reason it
is complaining about my
> usage of the word and. This is my script
> on exitFrame
> if sprite(12).loc = point(450, 388) and
> sprite(13).loc = point(408, 390) and
> sprite(14).loc = point(320, 389) and
> sprite(15).loc = point(358, 389) and
> sprite(16).loc = point(285, 389) then
> go to frame 26
> else
>
> go to the frame
>
> end if
> end
>
> Any help in letting me know whats wrong would be a great
help.
> thanks
>
Maybe you are looking for
-
Help!! Kernel panics after installation!!
Hi, I am new to Arch Linux (migrating from Fedora). I am having some problems with the installation on my Sony VAIO CW (C2D, Nvidia GT230M). At first I couldn't get past the installation of X in the Beginner's guide, but after some tweaking with conf
-
Dear Friends, I m working in SAP SD Module, is it wisable to go for SM. what are the knowledge i should have before going to do the course or start practice it. Please guide me Regards Arun
-
SharePoint 2010 - Document Management and Security Setup Recommendations
Greetings All! I have a requirement where the business would like to manage various files. The setup looks like this: User1 ----------->User2 ----------->User3 -------------------->User4 -------------------->User5 Where User1 has permission to see e
-
When I try to launch Firefox I am told it is already running
I get this error message: Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. When I go to task manager/applications tab, nothing shows up, but when I go
-
FWZE SAM1104 Inflows/outflows in the status plan must first be fixed
When I create a zero bond with FTR_CREATE I can post the initial payment (95000 EUR) at start of term and the amount (100000) (5 % interest over a year) that we would get back at end of term in the Structure tab page. I tried with transaction FWZE to