IPS event query ** Help needed badly**
Greetings all. Apologies for the dramatic headline but I'm in a bit of a time crunch.
I have a 4215 running 6.0(3)E1. The device is inline. Below is an event which triggered,
========================
evIdsAlert: eventId=1184881408377311643 severity=low vendor=Cisco
originator:
hostId: xyz
appName: sensorApp
appInstanceId: 380
time: 2007/09/24 15:11:25 2007/09/24 15:11:25 UTC
signature: description=Recognized content type id=12673 version=S149
subsigId: 0
sigDetails: Recognized content type
marsCategory: Info/Misc
interfaceGroup: vs0
vlan: 0
participants:
attacker:
addr: locality=any a.a.a.a
port: 80
target:
addr: locality=any b.b.b.b
port: 51095
os: idSource=unknown relevance=relevant type=unknown
actions:
deniedFlow: true
context:
fromAttacker: <stuff>
riskRatingValue: attackRelevanceRating=relevant targetValueRating=medium 50
threatRatingValue: 15
interface: fe2_1
protocol: tcp
========================
I have an external application which pull this same event from the sensor using a query *like* the following,
wget --user foo --password hoo http://a.b.c.d/cgi-bin/event-server?events=evAlert
I'm able to pull most of the event information but not all. What I can't seem to get from query is the " deniedFlow: true" value. I'm seeing something like,
></attack></participants><actions></actions></evAlert>
Notice the "deniedFlow: true" information missing between action.
Is my wget-ish query missing some arguments which is preventing me from pulling all the same information I can see from the CLI?
Thanks in advance.
The problem is that you are using the 5.x-style event-server and so you do not see all of the event fields. You need to change the app to pull from the "sdee-server" and then you will see all of the event fields:
http://a.b.c.d/cgi-bin/sdee-server?events=evAlert
Similar Messages
-
Pagination query help needed for large table - force a different index
I'm using a slight modification of the pagination query from over at Ask Tom's: [http://www.oracle.com/technology/oramag/oracle/07-jan/o17asktom.html]
Mine looks like this when fetching the first 100 rows of all members with last name Smith, ordered by join date:
SELECT members.*
FROM members,
SELECT RID, rownum rnum
FROM
SELECT rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindate
WHERE rownum <= 100
WHERE rnum >= 1
and RID = members.rowidThe difference between this and the one at Ask Tom's is that my innermost query just returns the ROWID. Then in the outermost query we join the ROWIDs returned to the members table, after we have pruned the ROWIDs down to only the chunk of 100 we want. This makes it MUCH faster (verifiably) on our large tables, as it is able to use the index on the innermost query (well... read on).
The problem I have is this:
SELECT rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindateThis will use the index for the predicate column (last_name) instead of the unique index I have defined for the joindate column (joindate, sequence). (Verifiable with explain plan). It is much slower this way on a large table. So I can hint it using either of the following methods:
SELECT /*+ index(members, joindate_idx) */ rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindate
SELECT /*+ first_rows(100) */ rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindateEither way, it now uses the index of the ORDER BY column (joindate_idx), so now it is much faster as it does not have to do a sort (remember, VERY large table, millions of records). So that seems good. But now, on my outermost query, I join the rowid with the meaningful columns of data from the members table, as commented below:
SELECT members.* -- Select all data from members table
FROM members, -- members table added to FROM clause
SELECT RID, rownum rnum
FROM
SELECT /*+ index(members, joindate_idx) */ rowid as RID -- Hint is ignored now that I am joining in the outer query
FROM members
WHERE last_name = 'Smith'
ORDER BY joindate
WHERE rownum <= 100
WHERE rnum >= 1
and RID = members.rowid -- Merge the members table on the rowid we pulled from the inner queriesOnce I do this join, it goes back to using the predicate index (last_name) and has to perform the sort once it finds all matching values (which can be a lot in this table, there is high cardinality on some columns).
So my question is, in the full query above, is there any way I can get it to use the ORDER BY column for indexing to prevent it from having to do a sort? The join is what causes it to revert back to using the predicate index, even with hints. Remove the join and just return the ROWIDs for those 100 records and it flies, even on 10 million records.
It'd be great if there was some generic hint that could accomplish this, such that if we change the table/columns/indexes, we don't need to change the hint (the FIRST_ROWS hint is a good example of this, while the INDEX hint is the opposite), but any help would be appreciated. I can provide explain plans for any of the above if needed.
Thanks!Lakmal Rajapakse wrote:
OK here is an example to illustrate the advantage:
SQL> set autot traceonly
SQL> select * from (
2 select a.*, rownum x from
3 (
4 select a.* from aoswf.events a
5 order by EVENT_DATETIME
6 ) a
7 where rownum <= 1200
8 )
9 where x >= 1100
10 /
101 rows selected.
Execution Plan
Plan hash value: 3711662397
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 521K| 192 (0)| 00:00:03 |
|* 1 | VIEW | | 1200 | 521K| 192 (0)| 00:00:03 |
|* 2 | COUNT STOPKEY | | | | | |
| 3 | VIEW | | 1200 | 506K| 192 (0)| 00:00:03 |
| 4 | TABLE ACCESS BY INDEX ROWID| EVENTS | 253M| 34G| 192 (0)| 00:00:03 |
| 5 | INDEX FULL SCAN | EVEN_IDX02 | 1200 | | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("X">=1100)
2 - filter(ROWNUM<=1200)
Statistics
0 recursive calls
0 db block gets
443 consistent gets
0 physical reads
0 redo size
25203 bytes sent via SQL*Net to client
281 bytes received via SQL*Net from client
8 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
101 rows processed
SQL>
SQL>
SQL> select * from aoswf.events a, (
2 select rid, rownum x from
3 (
4 select rowid rid from aoswf.events a
5 order by EVENT_DATETIME
6 ) a
7 where rownum <= 1200
8 ) b
9 where x >= 1100
10 and a.rowid = rid
11 /
101 rows selected.
Execution Plan
Plan hash value: 2308864810
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 201K| 261K (1)| 00:52:21 |
| 1 | NESTED LOOPS | | 1200 | 201K| 261K (1)| 00:52:21 |
|* 2 | VIEW | | 1200 | 30000 | 260K (1)| 00:52:06 |
|* 3 | COUNT STOPKEY | | | | | |
| 4 | VIEW | | 253M| 2895M| 260K (1)| 00:52:06 |
| 5 | INDEX FULL SCAN | EVEN_IDX02 | 253M| 4826M| 260K (1)| 00:52:06 |
| 6 | TABLE ACCESS BY USER ROWID| EVENTS | 1 | 147 | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("X">=1100)
3 - filter(ROWNUM<=1200)
Statistics
8 recursive calls
0 db block gets
117 consistent gets
0 physical reads
0 redo size
27539 bytes sent via SQL*Net to client
281 bytes received via SQL*Net from client
8 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
101 rows processed
Lakmal (and OP),
Not sure what advantage you are trying to show here. But considering that we are talking about pagination query here and order of records is important, your 2 queries will not always generate output in same order. Here is the test case:
SQL> select * from v$version ;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 10.2.0.1
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
SQL> show parameter pga
NAME TYPE VALUE
pga_aggregate_target big integer 103M
SQL> create table t nologging as select * from all_objects where 1 = 2 ;
Table created.
SQL> create index t_idx on t(last_ddl_time) nologging ;
Index created.
SQL> insert /*+ APPEND */ into t (owner, object_name, object_id, created, last_ddl_time) select owner, object_name, object_id, created, sysdate - dbms_random.value(1, 100) from all_objects order by dbms_random.random;
40617 rows created.
SQL> commit ;
Commit complete.
SQL> exec dbms_stats.gather_table_stats(user, 'T', cascade=>true);
PL/SQL procedure successfully completed.
SQL> select object_id, object_name, created from t, (select rid, rownum rn from (select rowid rid from t order by created desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
OBJECT_ID OBJECT_NAME CREATED
47686 ALL$OLAP2_JOIN_KEY_COLUMN_USES 28-JUL-2009 08:08:39
47672 ALL$OLAP2_CUBE_DIM_USES 28-JUL-2009 08:08:39
47681 ALL$OLAP2_CUBE_MEASURE_MAPS 28-JUL-2009 08:08:39
47682 ALL$OLAP2_FACT_LEVEL_USES 28-JUL-2009 08:08:39
47685 ALL$OLAP2_AGGREGATION_USES 28-JUL-2009 08:08:39
47692 ALL$OLAP2_CATALOGS 28-JUL-2009 08:08:39
47665 ALL$OLAPMR_FACTTBLKEYMAPS 28-JUL-2009 08:08:39
47688 ALL$OLAP2_DIM_LEVEL_ATTR_MAPS 28-JUL-2009 08:08:39
47689 ALL$OLAP2_DIM_LEVELS_KEYMAPS 28-JUL-2009 08:08:39
47669 ALL$OLAP9I2_HIER_DIMENSIONS 28-JUL-2009 08:08:39
47666 ALL$OLAP9I1_HIER_DIMENSIONS 28-JUL-2009 08:08:39
11 rows selected.
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
OBJECT_ID OBJECT_NAME LAST_DDL_TIME
11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
37534 com/sun/mail/smtp/SMTPMessage 06-FEB-2010 03:46:14
36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
16695 /2940a364_RepIdDelegator_1_3 06-FEB-2010 03:38:17
36539 sun/io/ByteToCharMacHebrew 06-FEB-2010 03:28:57
14044 /d29b81e1_OldHeaders 06-FEB-2010 03:12:12
12920 /25f8f3a5_BasicSplitPaneUI 06-FEB-2010 03:11:06
42266 SI_GETCLRHSTGRFTR 06-FEB-2010 03:40:20
15752 /2f494dce_JDWPThreadReference 06-FEB-2010 03:09:31
11 rows selected.
SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
OBJECT_ID OBJECT_NAME LAST_DDL_TIME
37534 com/sun/mail/smtp/SMTPMessage 06-FEB-2010 03:46:14
13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
42266 SI_GETCLRHSTGRFTR 06-FEB-2010 03:40:20
16695 /2940a364_RepIdDelegator_1_3 06-FEB-2010 03:38:17
36539 sun/io/ByteToCharMacHebrew 06-FEB-2010 03:28:57
26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
14044 /d29b81e1_OldHeaders 06-FEB-2010 03:12:12
36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
12920 /25f8f3a5_BasicSplitPaneUI 06-FEB-2010 03:11:06
15752 /2f494dce_JDWPThreadReference 06-FEB-2010 03:09:31
11 rows selected.
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc ;
OBJECT_ID OBJECT_NAME LAST_DDL_TIME
37534 com/sun/mail/smtp/SMTPMessage 06-FEB-2010 03:46:14
13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
42266 SI_GETCLRHSTGRFTR 06-FEB-2010 03:40:20
16695 /2940a364_RepIdDelegator_1_3 06-FEB-2010 03:38:17
36539 sun/io/ByteToCharMacHebrew 06-FEB-2010 03:28:57
26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
14044 /d29b81e1_OldHeaders 06-FEB-2010 03:12:12
36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
12920 /25f8f3a5_BasicSplitPaneUI 06-FEB-2010 03:11:06
15752 /2f494dce_JDWPThreadReference 06-FEB-2010 03:09:31
11 rows selected.
SQL> set autotrace traceonly
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc
2 ;
11 rows selected.
Execution Plan
Plan hash value: 44968669
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 91200 | 180 (2)| 00:00:03 |
| 1 | SORT ORDER BY | | 1200 | 91200 | 180 (2)| 00:00:03 |
|* 2 | HASH JOIN | | 1200 | 91200 | 179 (2)| 00:00:03 |
|* 3 | VIEW | | 1200 | 30000 | 98 (0)| 00:00:02 |
|* 4 | COUNT STOPKEY | | | | | |
| 5 | VIEW | | 40617 | 475K| 98 (0)| 00:00:02 |
| 6 | INDEX FULL SCAN DESCENDING| T_IDX | 40617 | 793K| 98 (0)| 00:00:02 |
| 7 | TABLE ACCESS FULL | T | 40617 | 2022K| 80 (2)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("T".ROWID="T1"."RID")
3 - filter("RN">=1190)
4 - filter(ROWNUM<=1200)
Statistics
1 recursive calls
0 db block gets
348 consistent gets
0 physical reads
0 redo size
1063 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
11 rows processed
SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
11 rows selected.
Execution Plan
Plan hash value: 882605040
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 62400 | 80 (2)| 00:00:01 |
|* 1 | VIEW | | 1200 | 62400 | 80 (2)| 00:00:01 |
|* 2 | COUNT STOPKEY | | | | | |
| 3 | VIEW | | 40617 | 1546K| 80 (2)| 00:00:01 |
|* 4 | SORT ORDER BY STOPKEY| | 40617 | 2062K| 80 (2)| 00:00:01 |
| 5 | TABLE ACCESS FULL | T | 40617 | 2062K| 80 (2)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("RN">=1190)
2 - filter(ROWNUM<=1200)
4 - filter(ROWNUM<=1200)
Statistics
0 recursive calls
0 db block gets
343 consistent gets
0 physical reads
0 redo size
1063 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
11 rows processed
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
11 rows selected.
Execution Plan
Plan hash value: 168880862
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 91200 | 179 (2)| 00:00:03 |
|* 1 | HASH JOIN | | 1200 | 91200 | 179 (2)| 00:00:03 |
|* 2 | VIEW | | 1200 | 30000 | 98 (0)| 00:00:02 |
|* 3 | COUNT STOPKEY | | | | | |
| 4 | VIEW | | 40617 | 475K| 98 (0)| 00:00:02 |
| 5 | INDEX FULL SCAN DESCENDING| T_IDX | 40617 | 793K| 98 (0)| 00:00:02 |
| 6 | TABLE ACCESS FULL | T | 40617 | 2022K| 80 (2)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("T".ROWID="T1"."RID")
2 - filter("RN">=1190)
3 - filter(ROWNUM<=1200)
Statistics
0 recursive calls
0 db block gets
349 consistent gets
0 physical reads
0 redo size
1063 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
11 rows processed
SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 order by last_ddl_time desc ;
11 rows selected.
Execution Plan
Plan hash value: 882605040
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 62400 | 80 (2)| 00:00:01 |
|* 1 | VIEW | | 1200 | 62400 | 80 (2)| 00:00:01 |
|* 2 | COUNT STOPKEY | | | | | |
| 3 | VIEW | | 40617 | 1546K| 80 (2)| 00:00:01 |
|* 4 | SORT ORDER BY STOPKEY| | 40617 | 2062K| 80 (2)| 00:00:01 |
| 5 | TABLE ACCESS FULL | T | 40617 | 2062K| 80 (2)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("RN">=1190)
2 - filter(ROWNUM<=1200)
4 - filter(ROWNUM<=1200)
Statistics
175 recursive calls
0 db block gets
388 consistent gets
0 physical reads
0 redo size
1063 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
4 sorts (memory)
0 sorts (disk)
11 rows processed
SQL> set autotrace off
SQL> spool offAs you will see, the join query here has to have an ORDER BY clause at the end to ensure that records are correctly sorted. You can not rely on optimizer choosing NESTED LOOP join method and, as above example shows, when optimizer chooses HASH JOIN, oracle is free to return rows in no particular order.
The query that does not involve join always returns rows in the desired order. Adding an ORDER BY does add a step in the plan for the query using join but does not affect the other query. -
Hi
I need help in writing a sql query for the data given below
Market Description Revenue
LARGE CORPORATE 0.0
LARGE CORPORATE 0.0
OTHERS 0.0
OTHERS 1.98
LARGE CORPORATE 5.1299999999999999
LARGE CORPORATE 6.8500000000000005
LARGE CORPORATE 10.98
LARGE CORPORATE 16.490000000000002
LARGE CORPORATE 21.129999999999999
LARGE CORPORATE 28.66
LARGE CORPORATE 38.579999999999998
OTHERS 68.420000000000002
OTHERS 87.590000000000003
LARGE CORPORATE 90.040000000000006
LARGE CORPORATE 511.94
LARGE CORPORATE 625.01999999999998
LARGE CORPORATE 662.75999999999999
LARGE CORPORATE 700.68000000000006
LARGE CORPORATE 2898.6799999999998
LARGE CORPORATE 3273.96
OTHERS 3285.4400000000001
LARGE CORPORATE 3580.0799999999999
LARGE CORPORATE 4089.1900000000001
LARGE CORPORATE 4373.5200000000004
LARGE CORPORATE 16207.550000000001
LARGE CORPORATE 19862.740000000002
LARGE CORPORATE 33186.150000000001
LARGE CORPORATE 107642.79000000001
The output of query should be in the following format
Market Description 1st 10%(revenue) 2nd 10%(revenue) 3rd 10%(revenue) 4th 10%(revenue) 5th 10%(revenue) rest 50%(revenue)
Would appreciate any help on this query.Hi,
What does 1st 10%, 2nd 10% etc. mean?
Is it 0-10%, 11-20%, 21-30%....
If so, combination of floor,decode and division should help to
achieve the result.
For example for the followint table,
NAME SALE
SALES_GROUP1 .2
SALES_GROUP1 1
SALES_GROUP1 9
SALES_GROUP2 2.1
SALES_GROUP2 12.2
SALES_GROUP2 19.9
SALES_GROUP3 22.2
write,
select name,decode(floor(sale/10),0,sale,null) "1st10%",
decode(floor(sale/10),1,sale,null)"11to20%",
decode(floor(sale/10),2,sale,null) "21to30%"
from revenue;
I mean, using floor and division, your rounding all values b/w 0 to 10 as 0
Similarly, 11 to 20 has be rounded to 1 etc...then apply decode function it
to achive the result.
I hope this helps.
Regards,
Suresh
8i OCP. -
Query help needed for querybuilder to use with lcm cli
Hi,
I had set up several queries to run with the lcm cli in order to back up personal folders, inboxes, etc. to lcmbiar files to use as backups. I have seen a few posts that are similar, but I have a specific question/concern.
I just recently had to reference one of these back ups only to find it was incomplete. Does the query used by the lcm cli also only pull the first 1000 rows? Is there a way to change this limit somwhere?
Also, since when importing this lcmbiar file for something 'generic' like 'all personal folders', pulls in WAY too much stuff, is there a better way to limit this? I am open to suggestions, but it would almost be better if I could create individual lcmbiar output files on a per user basis. This way, when/if I need to restore someone's personal folder contents, for example, I could find them by username and import just that lcmbiar file, as opposed to all 3000 of our users. I am not quite sure how to accomplish this...
Currently, with my limited windows scripting knowledge, I have set up a bat script to run each morning, that creates a 'runtime' properties file from a template, such that the lcmbiar file gets named uniquely for that day and its content. Then I call the lcm_cli using the proper command. The query within the properties file is currently very straightforward - select * from CI_INFOOBJECTS WHERE SI_ANCESTOR = 18.
To do what I want to do...
1) I'd first need a current list of usernames in a text file, that could be read (?) in and parsed to single out each user (remember we are talking about 3000) - not sure the best way to get this.
2) Then instead of just updating the the lcmbiar file name with a unique name as I do currently, I would also update the query (which would be different altogether): SELECT * from CI_INFOOBJECTS where SI_OWNER = '<username>' AND SI_ANCESTOR = 18.
In theory, that would grab everything owned by that user in their personal folder - right? and write it to its own lcmbiar file to a location I specify.
I just think chunking something like this is more effective and BO has no built in back up capability that already does this. We are on BO 4.0 SP7 right now, move to 4.1 SP4 over the summer.
Any thoughts on this would be much appreciated.
thanks,
MissyJust wanted to pass along that SAP Support pointed me to KBA 1969259 which had some good example queries in it (they were helping me with a concern I had over the lcmbiar file output, not with query design). I was able to tweak one of the sample queries in this KBA to give me more of what I was after...
SELECT TOP 10000 static, relationships, SI_PARENT_FOLDER_CUID, SI_OWNER, SI_PATH FROM CI_INFOOBJECTS,CI_APPOBJECTS,CI_SYSTEMOBJECTS WHERE (DESCENDENTS ("si_name='Folder Hierarchy'","si_name='<username>'"))
This exports inboxes, personal folders, categories, and roles, which is more than I was after, but still necessary to back up.. so in a way, it is actually better because I have one lcmbiar file per user - contains all their 'personal' objects.
So between narrowing down my set of users to only those who actually have saved things to their personal folder and now having a query that actually returns what I expect it to return, along with the help below for a job to clean up these excessive amounts of promotion jobs I am now creating... I am all set!
Hopefully this can help someone else too!
Thanks,
missy -
I'm having trouble with an SQL query. I've created a simple logon page wherein a user will enter their user name and password. The program will look in an Access database for the user name, sort it by Date/Time modified, and check to see if their password matches the most recent password. Unfortunately, the query returns no results. I'm absolutely certain that I'm doing the query correctly (I've imported it directly from my old VB6 code). Something simple is eluding me. Any help would be appreciated.
private void LogOn() {
//make sure that the user name/password is valid, then load the main menu
try {
//open the database connection
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:LawOffice2000", "", "");
Statement select = con.createStatement();
String strTemp = "Select * From EMPLOYEES Where INITIALS = '" + txtUserName.getText() + "' Order By DATE Desc, TIME Desc";
ResultSet result = select.executeQuery(strTemp);
while(result.next()) {
if (txtPassword.getPassword().toString() == result.getString("Password")) {
MenuMain.main();
else {
System.out.println("Password Bad");
System.out.println(txtUserName.getText());
System.out.println(result.getString("Password"));
break; //exit loop
//close the connection
con.close(); }
catch (Exception e) {
System.out.println("LawOfficeSuite_LogOn: " + e);
return; }
}The problem is here: "txtPassword.getPassword().toString() == result.getString("Password"))"
Don't confuse String's equals() method with the equality operator '=='. The == operator checks that two references refer to the same object. If you want to compare the contents of Strings (whether two strings contain the same characters), use equals(), e.g. if (str1.equals(str2))...
Example:String s1 = "foo";
String s2 = new String("foo");
System.out.println("s1 == s2: " + (s1 == s2)); // false
System.out.println("s1.equals(s2): " + (s1.equals(s2))); // trueFor more information, check out Comparison operators: equals() versus == -
Help Needed Badly. Troubles with exporting video...
Hello, I created this account pretty much just for this problem, and I'm running under a very tight timeline so please if someone could give me an answer it would be very much appreciated. I have spent 8 hours over the past two nights as well as 4 hours today reworking, trying different things and combing the online community for any others experiencing these problems and/or solutions, so I am extremely stressed and tired if you could bare with me. So here it is:
I am editing and compiling a theatre production into a movie. I shot the show three times using a Canon HV30, imported the footage on a school computer (iMac, using iMovie '06), exported it in quicktime onto an external HD, brought it onto my computer (which, stupidly, has no firewire). The total file size was 7 hours of footage (85GB), and as a result my HD has about 300MB left on it, and has been excruciatingly slow. I have finished editing the movie, and I am now attempting to share it. All of the sources I have read tell me to share it in Media Browser, which will be accessible from iDVD. I attempted this many times, however I received multiple different error messages, only after watching it 'working' for 4 hours. Some have said that there was no virtual memory left (even after emptying the cache), some said that there wasn't enough HD space left, the exporting had encountered an error, error messages -50, -49, -48, and -47, and the most prominent one that I have been receiving told me that there had been a "parameter error" or something.
After researching online, I found that the '-50' error messages had to do with exporting to a MSDOS HD, which made sense because I was attempting to export to my iPod (formatted in Windows). My latest efforts have been trying to export it onto my HD, which is formatted for OSX, and has 350GB left on it. And yet, all of the problems persist (including error -50...?) any help would be greatly, greatly appreciated, as the DVD was due two days ago.
-Sean+"Alright, so I moved over the footage and deleted it off the internal..."+
Did you move the Events using iMovie? If not, the project pointers become invalid, and you would get the error you did. While moving the event using iMovie, you don't need to "delete" anything!
Couple of options for you to recover from this.
A> (Slower) Move the Events back to the internal HD, and use iM to move the Event to the Ext HD.
B> (Faster, but convoluted) Create an alias for the specific Event folder (now on your ext HD/iMovie Events folder) under your local HD's iM Events folder. IM will now be able to "see" the files on the internal HD, even though they're stored on the Ext HD.
From the Help File: "To keep an item at its original location and put an alias for it in a new folder, hold down the Command and Option keys while you drag the item."
Sorry you're having to jump through hoops to get this working... -
Hi,
Need help in writing a query.
SQL> SELECT xmlelement("P",xmlforest(P.process_id AS Ppid),
2 xmlagg(xmlelement("PI",XMLFOREST( PI.question_id AS PIqid,
3 PI.process_id AS PIpid,
4 PI.innertext AS PItext),
5 xmlagg(Xmlelement("PO",xmlforest( PO.option_id AS POoid,
6 PO.question_id AS POqid,
7 PO.process_id AS popid
8 ))
9 ORDER BY PO.option_id))
10 ORDER BY PI.question_id ) )
11 FROM liveProcess_ec P
12 INNER JOIN vw_liveProcessItem_Sim_v6 PI
13 ON P.process_id = PI.process_id
14 LEFT OUTER JOIN vw_liveProcessOption_Sim_v6 PO
15 ON PI.question_id = PO.question_id
16 AND PI.process_id = PO.process_id
17 WHERE p.process_id =450
18 GROUP BY p.process_id,PI.question_id,PI.process_id,PI.innertext
19 ORDER BY p.process_id;
SELECT xmlelement("P",xmlforest(P.process_id AS Ppid),
ERROR at line 1:
ORA-00937: not a single-group group functionThanks in advanceHi,
Here below are the create table scripts along with sample data and expected output.
CREATE TABLE VW_LIVEPROCESSOPTION_SIM_v6
( "OPTION_ID" NUMBER,
"QUESTION_ID" NUMBER(10,0),
"PROCESS_ID" NUMBER(10,0),
"OPT_INNERTEXT" VARCHAR2(200 CHAR),
"OPT_LINKFROM" VARCHAR2(20 CHAR),
"OPT_LINKTO" VARCHAR2(20 CHAR),
"LIBQUESTION_IDFK" NUMBER,
"LIBOPTION_IDFK" NUMBER
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,2,450,'Yes',null,'5',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,3,450,'Yes',null,'5',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,5,450,'Yes',null,'6',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,6,450,'Yes',null,'7',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,8,450,'Block All',null,'9',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,9,450,'Yes',null,'10',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,11,450,'Yes',null,'12',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,12,450,'Yes',null,'13',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,14,450,'Yes',null,'16',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,2,450,'No',null,'3',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,3,450,'No',null,'4',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,5,450,'No',null,'8',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,6,450,'No',null,'8',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,8,450,'Standard',null,'11',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,9,450,'No',null,'11',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,11,450,'No',null,'14',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,12,450,'No',null,'14',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,14,450,'No',null,'15',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (3,8,450,'Disabled',null,'12',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (4,8,450,'User Defined',null,'12',null,null);
REATE TABLE "VW_LIVEPROCESSITEM_SIM_v6"
( "QUESTION_ID" NUMBER(10,0),
"PROCESS_ID" NUMBER(10,0),
"INNERTEXT" VARCHAR2(200 CHAR),
"ITEMTYPE" VARCHAR2(50 CHAR),
"LINKFROM" VARCHAR2(500 CHAR),
"LINKTO" VARCHAR2(500 CHAR),
"ASSOCIATED" VARCHAR2(200 CHAR),
"CONTENT_ID" NUMBER,
"EXITPOINT1_ID" NUMBER(10,0),
"EXITPOINT2_ID" NUMBER(10,0),
"EXITPOINT3_ID" NUMBER(10,0),
"RESOLVEIDENTIFIER" VARCHAR2(40 CHAR),
"LIBQUESTION_IDFK" NUMBER(10,0),
"FOLLOWONCALL" NUMBER(1,0),
"USERINPUT" VARCHAR2(200 CHAR),
"ISLOCKED" NUMBER(1,0),
"PREVIOUSANSWER" NUMBER(1,0),
"VISIBLETOAGENT" NUMBER(1,0),
"RETRYATTEMPT" NUMBER(10,0),
"TAGS" VARCHAR2(50 BYTE)
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (1,450,'CBB1015 - Router Firewall Settinngs Process','Title',null,'2',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (2,450,'Is the customers PC Firewall turned off?','Question','1','2.2,2.1',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (3,450,'Advise the customer to turn off the PC Firewall in order to continue. Has this been done?','Question','2.2','3.2,3.1',null,278,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (4,450,'Advise the customer the PC Firewall must be switched off before this process????','ExitPoint','3.2',null,null,null,14,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (5,450,'Is the customer able to access the internet now?','Question','3.1,2.1','5.2,5.1',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (6,450,'Is the customer having a problem with a specific website?','Question','5.1','6.2,6.1',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (7,450,'1536: CBB1008 - Browser Setup and Daignostics','SubProcess','6.1',null,'1536-1-0',null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (8,450,'What is the security level on the CPE Management page?','Question','6.2,5.2','8.4,8.3,8.2,8.1',null,279,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (9,450,'Change the security level to Standard. Does this resolve the customers issue?','Question','8.1','9.2,9.1',null,280,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (10,450,'Issue Resolved','ExitPoint','9.1',null,null,null,1,6,122,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (11,450,'Change the security level to Disabled. Is the customer able to browse the internet?','Question','9.2,8.2','11.2,11.1',null,281,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (12,450,'Change the security level to Standard. Is the customer able to browse the internet now?','Question','11.1,8.3,8.4','12.2,12.1',null,283,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (13,450,'Issue Resolved','ExitPoint','12.1',null,null,null,1,6,123,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (14,450,'Ask the customer to perform a master reset. Does this resolve their issue?','Question','12.2,11.2','14.2,14.1',null,282,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (15,450,'Faulty CPE','ExitPoint','14.2',null,null,null,1,6,124,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (16,450,'Issue Resolved','ExitPoint','14.1',null,null,null,1,6,123,null,null,null,null,null,null,null,null,null);
CREATE TABLE "LIVEPROCESS_EC_V"
( "PROCESS_ID" NUMBER(10,0),
"USER_ID" NUMBER(10,0),
"CREATED" TIMESTAMP (6)
Insert into LIVEPROCESS_EC (PROCESS_ID,USER_ID,CREATED) values (450,7460,to_timestamp('21-APR-08 09.34.41.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'));Expected Output
<P>
<Ppid>450</Ppid>
<Pn>CBB1015 - Router Firewall Settinngs Process</Pn>
<Pg>9</Pg>
<Pl>0</Pl>
<Pb>5</Pb>
<qcount>100</qcount>
<ocount>200</ocount>
<PI>
<PIqid>1</PIqid>
<PIpid>450</PIpid>
<PIpx>366</PIpx>
<PIpy>-516</PIpy>
<PItext>CBB1015 - Router Firewall Settinngs Process</PItext>
<PItype>Title</PItype>
<PIto>2</PIto>
<PO />
</PI>
<PI>
<PIqid>2</PIqid>
<PIpid>450</PIpid>
<PIpx>366</PIpx>
<PIpy>-437</PIpy>
<PItext>Is the customers PC Firewall turned off?</PItext>
<PItype>Question</PItype>
<PIfrom>1</PIfrom>
<PIto>2.2,2.1</PIto>
<PO>
<POoid>1</POoid>
<POqid>2</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>5</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>2</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>No</POtext>
<POto>3</POto>
</PO>
</PI>
<PI>
<PIqid>3</PIqid>
<PIpid>450</PIpid>
<PIpx>468</PIpx>
<PIpy>-344</PIpy>
<PItext>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PItext>
<PItype>Question</PItype>
<PIfrom>2.2</PIfrom>
<PIto>3.2,3.1</PIto>
<PIc>278</PIc>
<PO>
<POoid>1</POoid>
<POqid>3</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>5</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>3</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>No</POtext>
<POto>4</POto>
</PO>
</PI>
<PI>
<PIqid>4</PIqid>
<PIpid>450</PIpid>
<PIpx>571</PIpx>
<PIpy>-250</PIpy>
<PItext>Advise the customer the PC Firewall must be switched off before this process????</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>3.2</PIfrom>
<PIe1>14</PIe1>
<PO />
</PI>
<PI>
<PIqid>5</PIqid>
<PIpid>450</PIpid>
<PIpx>374</PIpx>
<PIpy>-240</PIpy>
<PItext>Is the customer able to access the internet now?</PItext>
<PItype>Question</PItype>
<PIfrom>3.1,2.1</PIfrom>
<PIto>5.2,5.1</PIto>
<PO>
<POoid>1</POoid>
<POqid>5</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>6</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>5</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>No</POtext>
<POto>8</POto>
</PO>
</PI>
<PI>
<PIqid>6</PIqid>
<PIpid>450</PIpid>
<PIpx>322</PIpx>
<PIpy>-141</PIpy>
<PItext>Is the customer having a problem with a specific website?</PItext>
<PItype>Question</PItype>
<PIfrom>5.1</PIfrom>
<PIto>6.2,6.1</PIto>
<PO>
<POoid>1</POoid>
<POqid>6</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>7</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>6</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>No</POtext>
<POto>8</POto>
</PO>
</PI>
<PI>
<PIqid>7</PIqid>
<PIpid>450</PIpid>
<PIpx>128</PIpx>
<PIpy>-36</PIpy>
<PItext>1536: CBB1008 - Browser Setup and Daignostics</PItext>
<PItype>SubProcess</PItype>
<PIfrom>6.1</PIfrom>
<PIas>1536-1-0</PIas>
<PO />
</PI>
<PI>
<PIqid>8</PIqid>
<PIpid>450</PIpid>
<PIpx>461</PIpx>
<PIpy>-43</PIpy>
<PItext>What is the security level on the CPE Management page?</PItext>
<PItype>Question</PItype>
<PIfrom>6.2,5.2</PIfrom>
<PIto>8.4,8.3,8.2,8.1</PIto>
<PIc>279</PIc>
<PO>
<POoid>1</POoid>
<POqid>8</POqid>
<popid>450</popid>
<POpx>-112</POpx>
<POpy>89</POpy>
<POtext>Block All</POtext>
<POto>9</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>8</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>Standard</POtext>
<POto>11</POto>
</PO>
<PO>
<POoid>3</POoid>
<POqid>8</POqid>
<popid>450</popid>
<POpx>83</POpx>
<POpy>116</POpy>
<POtext>Disabled</POtext>
<POto>12</POto>
</PO>
<PO>
<POoid>4</POoid>
<POqid>8</POqid>
<popid>450</popid>
<POpx>-14</POpx>
<POpy>94</POpy>
<POtext>User Defined</POtext>
<POto>12</POto>
</PO>
</PI>
<PI>
<PIqid>9</PIqid>
<PIpid>450</PIpid>
<PIpx>237</PIpx>
<PIpy>76</PIpy>
<PItext>Change the security level to Standard. Does this resolve the customers issue?</PItext>
<PItype>Question</PItype>
<PIfrom>8.1</PIfrom>
<PIto>9.2,9.1</PIto>
<PIc>280</PIc>
<PO>
<POoid>1</POoid>
<POqid>9</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>10</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>9</POqid>
<popid>450</popid>
<POpx>69</POpx>
<POpy>73</POpy>
<POtext>No</POtext>
<POto>11</POto>
</PO>
</PI>
<PI>
<PIqid>10</PIqid>
<PIpid>450</PIpid>
<PIpx>158</PIpx>
<PIpy>185</PIpy>
<PItext>Issue Resolved</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>9.1</PIfrom>
<PIe1>1</PIe1>
<PIe2>6</PIe2>
<PIe3>122</PIe3>
<PO />
</PI>
<PI>
<PIqid>11</PIqid>
<PIpid>450</PIpid>
<PIpx>821</PIpx>
<PIpy>144</PIpy>
<PItext>Change the security level to Disabled. Is the customer able to browse the internet?</PItext>
<PItype>Question</PItype>
<PIfrom>9.2,8.2</PIfrom>
<PIto>11.2,11.1</PIto>
<PIc>281</PIc>
<PO>
<POoid>1</POoid>
<POqid>11</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>12</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>11</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>No</POtext>
<POto>14</POto>
</PO>
</PI>
<PI>
<PIqid>12</PIqid>
<PIpid>450</PIpid>
<PIpx>474</PIpx>
<PIpy>186</PIpy>
<PItext>Change the security level to Standard. Is the customer able to browse the internet now?</PItext>
<PItype>Question</PItype>
<PIfrom>11.1,8.3,8.4</PIfrom>
<PIto>12.2,12.1</PIto>
<PIc>283</PIc>
<PO>
<POoid>1</POoid>
<POqid>12</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>13</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>12</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>No</POtext>
<POto>14</POto>
</PO>
</PI>
<PI>
<PIqid>13</PIqid>
<PIpid>450</PIpid>
<PIpx>322</PIpx>
<PIpy>278</PIpy>
<PItext>Issue Resolved</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>12.1</PIfrom>
<PIe1>1</PIe1>
<PIe2>6</PIe2>
<PIe3>123</PIe3>
<PO />
</PI>
<PI>
<PIqid>14</PIqid>
<PIpid>450</PIpid>
<PIpx>645</PIpx>
<PIpy>327</PIpy>
<PItext>Ask the customer to perform a master reset. Does this resolve their issue?</PItext>
<PItype>Question</PItype>
<PIfrom>12.2,11.2</PIfrom>
<PIto>14.2,14.1</PIto>
<PIc>282</PIc>
<PO>
<POoid>1</POoid>
<POqid>14</POqid>
<popid>450</popid>
<POpx>-50</POpx>
<POpy>70</POpy>
<POtext>Yes</POtext>
<POto>16</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>14</POqid>
<popid>450</popid>
<POpx>50</POpx>
<POpy>70</POpy>
<POtext>No</POtext>
<POto>15</POto>
</PO>
</PI>
<PI>
<PIqid>15</PIqid>
<PIpid>450</PIpid>
<PIpx>768</PIpx>
<PIpy>435</PIpy>
<PItext>Faulty CPE</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>14.2</PIfrom>
<PIe1>1</PIe1>
<PIe2>6</PIe2>
<PIe3>124</PIe3>
<PO />
</PI>
<PI>
<PIqid>16</PIqid>
<PIpid>450</PIpid>
<PIpx>479</PIpx>
<PIpy>420</PIpy>
<PItext>Issue Resolved</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>14.1</PIfrom>
<PIe1>1</PIe1>
<PIe2>6</PIe2>
<PIe3>123</PIe3>
<PO />
</PI>
</P>Thanks in advance. -
Urgent Help needed - BADI's in Infospoke
Hi,
My Scenario:
I am pulling data from master data using infospoke into Application server. I need some kind of easy transformations during this stage.
I got ZSTATE field in my data and I need to restrict my output to only certain states(Ex: NJ,CA, TX , MNetc). Since I can't give those selection conditions in infospoke I need to try BADI. I created a BADI and have target and source structure. Can anyone write me small code for this to eliminate other states and allow NJ , CA, MN, TX etc.
Source structure: /BIC/CYZZTEST
target Structure: /BIC/CZZZTEST
infospoke: ZZTEST
Field: Zstate
Class:ZCL_IM_ZZTEST
Method:IF_EX_OPENHUB_TRANSFORM~TRANSFORM
Full points to helpful answer!!
Anil.The problem is cross user too - I have two user files on the machine and the same thing happens regardless of which user file I'm working in.
That points to s 'system-wide' issue.
Try resetting your SMC.
Resetting the System Management Controller >>
Also, you could try booting from your install DVD and see if it does it there. If it does not, it's more than likely a software issue and an Archive and Install should fix it.
Mac OS X: About the Archive and Install feature >>
-Bmer
Mac Owners Support Group - Join us @ MacOSG.com
Mac611 Mobile Mac Support - about.Mac611.com
iTunes:MacOSG Podcast | YouTube.MacOSG.com
An Apple User Group
Have an iPhone or iPod touch? Enter Mac611.com in Safari on it for 'mobile Mac support.' -
Another query help needed...
I have a tale as follows:
-- INSERTING into TABLE_EXPORT
Insert into TABLE_EXPORT (ACCOUNT_ID,TRANSACTION_AMOUNT,TRANSACTION_TYPE,DRAWEE_ACCOUNT_ID,BENEFICIARY_ACCOUNT_ID) values ('112010026758',6000,'Withdrawal','112010026758',null);
Insert into TABLE_EXPORT (ACCOUNT_ID,TRANSACTION_AMOUNT,TRANSACTION_TYPE,DRAWEE_ACCOUNT_ID,BENEFICIARY_ACCOUNT_ID) values ('112010026758',21664,'Deposit','147010001002','112010026758');
Insert into TABLE_EXPORT (ACCOUNT_ID,TRANSACTION_AMOUNT,TRANSACTION_TYPE,DRAWEE_ACCOUNT_ID,BENEFICIARY_ACCOUNT_ID) values ('112010026758',23000,'Withdrawal','112010026758','147010001000');
Insert into TABLE_EXPORT (ACCOUNT_ID,TRANSACTION_AMOUNT,TRANSACTION_TYPE,DRAWEE_ACCOUNT_ID,BENEFICIARY_ACCOUNT_ID) values ('112010026758',5000,'Withdrawal','112010026758','147010001000');
Insert into TABLE_EXPORT (ACCOUNT_ID,TRANSACTION_AMOUNT,TRANSACTION_TYPE,DRAWEE_ACCOUNT_ID,BENEFICIARY_ACCOUNT_ID) values ('112010026758',15000,'Deposit',null,'112010026758');I need to get the Counterparties and the number of txns with the counterparty and the amount transacted with the counterparties. Here counterparty is decided based on the transaction type i.e., if transaction_type is 'Deposit' then the counterparty is Drawee_Account_id. If transaction_type is 'Withdrawal' then the counterparty is Beneficiary_Account_id.
So in this data for the Account_id 112010026758, there are 2 counterparties - 147010001000 and 147010001002.
I am able to get the count of counterparties and the count of transactions with the counterparty using the following query
Select Account_id,
count(decode(Beneficiary_Account_id,Account_id,Drawee_Account_id,Beneficiary_Account_id)) NoofTransactions,
count(distinct(decode(Beneficiary_Account_id,Account_id,Drawee_Account_id,Beneficiary_Account_id))) Counterparties
from ENTTEST.TABLE_EXPORT
where Account_id = '112010026758'
group by Account_idBut how do i find the sum of transaction amount of the transactions with the counterparty. i.e., for the data above, number of transactions involved with the counterparties is 3 and the sum is 49664.. How can i get that sum??
Can anybody please help me with the query for getting this result...Please.. I am struck at this point..Does this answer your question?
SQL > WITH TABLE_EXPORT AS
2 (
3 SELECT '112010026758' AS ACCOUNT_ID, 6000 AS TRANSACTION_AMOUNT, 'Withdrawal' AS TRANSACTION_TYPE, '112010026758' AS DRAWEE_ACCOUNT_ID, null AS BENEFICI
ARY_ACCOUNT_ID FROM DUAL UNION ALL
4 SELECT '112010026758' AS ACCOUNT_ID, 21664 AS TRANSACTION_AMOUNT, 'Deposit' AS TRANSACTION_TYPE, '147010001002' AS DRAWEE_ACCOUNT_ID, '112010026758' AS
BENEFICIARY_ACCOUNT_ID FROM DUAL UNION ALL
5 SELECT '112010026758' AS ACCOUNT_ID, 23000 AS TRANSACTION_AMOUNT, 'Withdrawal' AS TRANSACTION_TYPE, '112010026758' AS DRAWEE_ACCOUNT_ID, '147010001002'
AS BENEFICIARY_ACCOUNT_ID FROM DUAL UNION ALL
6 SELECT '112010026758' AS ACCOUNT_ID, 5000 AS TRANSACTION_AMOUNT, 'Withdrawal' AS TRANSACTION_TYPE, '112010026758' AS DRAWEE_ACCOUNT_ID, '147010001002' A
S BENEFICIARY_ACCOUNT_ID FROM DUAL UNION ALL
7 SELECT '112010026758' AS ACCOUNT_ID, 15000 AS TRANSACTION_AMOUNT, 'Deposit' AS TRANSACTION_TYPE, null AS DRAWEE_ACCOUNT_ID, '112010026758' AS BENEFICIAR
Y_ACCOUNT_ID FROM DUAL
8 )
9 SELECT ACCOUNT_ID,SUM(TRANSACTION_AMOUNT)
10 FROM TABLE_EXPORT
11 WHERE DRAWEE_ACCOUNT_ID IS NOT NULL
12 AND BENEFICIARY_ACCOUNT_ID IS NOT NULL
13 GROUP BY ACCOUNT_ID
14 /
ACCOUNT_ID SUM(TRANSACTION_AMOUNT)
112010026758 49664This is a modified version of your query:
SQL > WITH TABLE_EXPORT AS
2 (
3 SELECT '112010026758' AS ACCOUNT_ID, 6000 AS TRANSACTION_AMOUNT, 'Withdrawal' AS TRANSACTION_TYPE, '112010026758' AS DRAWEE_ACCOUNT_ID, null AS BENEFICI
ARY_ACCOUNT_ID FROM DUAL UNION ALL
4 SELECT '112010026758' AS ACCOUNT_ID, 21664 AS TRANSACTION_AMOUNT, 'Deposit' AS TRANSACTION_TYPE, '147010001002' AS DRAWEE_ACCOUNT_ID, '112010026758' AS
BENEFICIARY_ACCOUNT_ID FROM DUAL UNION ALL
5 SELECT '112010026758' AS ACCOUNT_ID, 23000 AS TRANSACTION_AMOUNT, 'Withdrawal' AS TRANSACTION_TYPE, '112010026758' AS DRAWEE_ACCOUNT_ID, '147010001002'
AS BENEFICIARY_ACCOUNT_ID FROM DUAL UNION ALL
6 SELECT '112010026758' AS ACCOUNT_ID, 5000 AS TRANSACTION_AMOUNT, 'Withdrawal' AS TRANSACTION_TYPE, '112010026758' AS DRAWEE_ACCOUNT_ID, '147010001002' A
S BENEFICIARY_ACCOUNT_ID FROM DUAL UNION ALL
7 SELECT '112010026758' AS ACCOUNT_ID, 15000 AS TRANSACTION_AMOUNT, 'Deposit' AS TRANSACTION_TYPE, null AS DRAWEE_ACCOUNT_ID, '112010026758' AS BENEFICIAR
Y_ACCOUNT_ID FROM DUAL
8 )
9 SELECT Account_id,
10 COUNT(DECODE(Beneficiary_Account_id,Account_id,Drawee_Account_id,Beneficiary_Account_id)) NoofTransactions,
11 COUNT(DISTINCT(DECODE(Beneficiary_Account_id,Account_id,Drawee_Account_id,Beneficiary_Account_id))) Counterparties,
12 SUM(CASE WHEN BENEFICIARY_ACCOUNT_ID IS NOT NULL AND DRAWEE_ACCOUNT_ID IS NOT NULL THEN TRANSACTION_AMOUNT ELSE NULL END) AS TRANSACTION_AMOUNT
13 FROM TABLE_EXPORT
14 WHERE Account_id = '112010026758'
15 GROUP BY Account_id
16 /
ACCOUNT_ID NOOFTRANSACTIONS COUNTERPARTIES TRANSACTION_AMOUNT
112010026758 3 1 49664Hope this helps! -
Oracle Business Events related help needed
Hello All,
Good Morning , wanted some help regards Oracle Business events be used for sending notifications.
We are having a situation wherein we need to send notifications to the sales team whenever there are changes to the order line status..lets say the order line moves from Booked status to Awaiting Shipping status and further to Picked or Shipped status, we need to notify the sales team about this.
If we are going to use Business Events concept for this we wanted to check on the below points -
1.At the order line level what all seeded business events have been defined ( means if we could get the complete listing ) and whether any of these gets triggered when the order line status changes...we are on Oracle Release 12.0.6 version
2.Also is there a way to know what all parameters are being passed for a given seeded event, so that we know which parameters we could retrieve within the subscription using wf_event_t.getvalueforparameter function.
3.Regards setting up Subscriptions for this order line seeded business event : means we could see an option which says : "Send a Notification" when we are defining a Cstom Sbscription ( Now here it asks to give the Message Type ( This would be workflow item type where the message is defined in workflow ) and Message Name ) ..
Now if in this NOTIFICATION MESSAGE we need to show details like order number , sales rep , order line status etc ( then where do we set these details in the Event and also how do we pass these details from subscription so that it shows in the notification )
Means where do we setup and define values for the notification message attributes and how do we pass these values from event to the subscription and finally to the notification..How do we achieve this because some of the message attributes for the notification are Document Type while some are text/number types.. These would be required to show in the notif message...
4. Also once we send the notification lets say succesfully to person or a role using a subscription , how do we capture the response ...
Could someone please help us with this as we are stuck with this at the moment.
many thanksHi,
please reply the above questions.it would be a great help for me.
Thanks
Sap Guru -
I must not be in the right mode today, because this is giving
me a hard time...
I have a SQL Server database with 250,000 records. Each
record represents a medical visit.
Each record has 25 fields that contain patient diagnosis. A
visit may show one diagnosis, or it may show as many as 25. Any
specific diagnosis (250.00 for example) may appear in a field
called Code1, or a field called Code2.... Code25.
There are a total of about 500 patients that make up the
250,000 visits.
What I need is a report that shows each DISTINCT diagnosis,
and a listing (and count) of people that have been assigned that
diagnosis.
My thought is to first query the table to arrive at the
unique list of diagnosis codes. Then, in a nested loop, query the
database to see who has been assigned that code, and how many
times.
This strikes me as an incredibly database intensive query,
however.
What is teh correct way to do this?The correct way to do this is to normalize your database.
Rather than having 25 separate colums that essentially
contain the same data (different codes), break that out into a
separate table.
Patient
patientid
Visit
patientid (foreign key referencing Patient)
visitid
Diagnosis
visitid (foreign key referencing visitid in Visit)
diagnosiscode
order (if the 1-25 ordering of diagnosis codes is important)
Once you correct your datamodel, what you're trying to do
becomes simple.
-- get all diagnosis codes
select distinct(diagnosiscode) from diagnosis
-- get a breakdown of diagnosis codes, patients, and counts
for that diagnosis
select diagnosiscode, patient.name, count(diagnosiscode) from
patient left join visit on (patient.patientid =
visit.patientid)
left join diagnosis on (visit.visitid = diagnosis.visitid)
group by diagnosiscode, patient.name -
Duplicate invoice. Query help needed
Hi All,
We need to build a query which addresses the following condition
Some of the invoices were created against the wrong vendors and that money needs to be recovered. Some of them are already recovered while some are not
* list out all the duplicate invoices between a particular date range(invoice date) with same invoice num ,same invoice amount and same invoice date.
* If there are any debit invoice created(invoice number postfixed with CR or ADJ),those particualr invoices should not be included.
The table below shows two type of invoice, the one with bold(invoice num=193666) has debit invoice created and all the three records related to it should not be a part of output data
while the record(invoice num=00017321) should be a part of output data.
INVOICE_NUM INVOICE_AMOUNT VENDOR_NUMBER INVOICE_DATE ORG_ID
00017321 233.35 A321 1-Dec-11 95
00017321 233.35 K452 1-Dec-11 95
*193666 101.67 EM9B 18-May-12 91*
*193666 101.67 1B02 18-May-12 91*
*193666CR -101.67 1B02 18-May-12 91*
Below is the query which i wrote to identify the duplicate invoice
select distinct
a1.invoice_amount,
a1.invoice_num,
(select segment1 from apps.po_vendors where vendor_id=a1.vendor_id) vendor_name,
a1.invoice_date,
A1.ORG_ID
from apps.ap_invoices_all a1,
apps.ap_invoices_all a2
where 1=1
and a1.org_id in (91,95)
and a1.org_id in (91,95)
and a1.invoice_date between (to_DATE('01-SEP-2011','DD-MON-YYYY')) AND (to_DATE('01-JUN-2012','DD-MON-YYYY'))
and a2.invoice_date between (to_DATE('01-SEP-2011','DD-MON-YYYY')) AND (to_DATE('01-JUN-2012','DD-MON-YYYY'))
and a2.invoice_num=a1.invoice_num
and a1.invoice_amount=a2.invoice_amount
and a1.invoice_id<>a2.invoice_id
and a1.invoice_amount<>0
order by a1.invoice_amount,a1.invoice_num
Can anybody share their thoughts on how to modify the query above which checks if there are any debit invoice created and not include in the final output.
Thanks in advanceHow do I ask a question on the forums?
SQL and PL/SQL FAQ -
Event Handling Help needed please.
Hi,
I am writing a program to simulate a supermarket checkout. I have done the GUI and now i am trying to do the event handling. I have come up against a problem.
I have a JCombobox called prodList and i have added an string array to it called prods . I have also created 2 more arrays with numbers in them.
I want to write the code for if an item is selected from the combo box that the name from the array is shown in a textfield tf1, and also the price and stock no which correspond to the seclected item (both initialised in the other arrays) are also added to the textfield tf1.
I have started writng the code but i am really stuck. Could someone please help me with this please. The code i have done so far is as follows(just the event handling code shown)
public void ItemStateChange(ItemEvent ie){
if(ie.getItemSelected()== prodList)
changeOutput();
public void changeOutput()
if(ItemSelected ==0)
tf1.setText("You have selected" +a +b +c);
}Do you say this because i missed the d of ItemStateChanged ?
I have amended that but still i am getting the same errors class or enum expected. 4 of them relating to the itemStateChanged method.
i will post my whole code if it helps
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Observer; //new
import java.util.Observable;//new
import javax.swing.BorderFactory;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
public class MySuperMktPro
public MySuperMktPro()
CheckoutView Check1 = new CheckoutView(1,0,0);
CheckoutView Check2 = new CheckoutView(2,300,0);
CheckoutView Check3 = new CheckoutView(3,600,0);
CheckoutView Check4 = new CheckoutView(4,0,350);
CheckoutView Check5 = new CheckoutView(5,600,350);
OfficeView off111 = new OfficeView();
public static void main(String[] args) {
// TODO, add your application code
System.out.println("Starting My Supermarket Project...");
MySuperMktPro startup = new MySuperMktPro();
class CheckoutView implements ItemListener , ActionListener
private OfficeView off1;
private JFrame chk1;
private Container cont1;
private Dimension screensize,tempDim;
private JPanel pan1,pan2,pan3,pan4,pan5;
private JButton buyBut,prodCode;
private JButton purchase,cashBack,manual,remove,disCo;
private JButton but1,but2,finaLi1,but4,but5,but6;
private JTextArea tArea1,tArea2;
private JTextField tf1,tf2,tf3,list2;
private JComboBox prodList;
private JLabel lab1,lab2,lab3,lab4,lab5,lab6,lab7;
private int checkoutID; //New private int for all methods of this class
private int passedX,passedY;
private String prods[];
private JButton rb1,rb2,rb3,rb4;
private double price[];
private int code[];
public CheckoutView(int passedInteger,int passedX,int passedY)
checkoutID = passedInteger; //Store the int passed into the method
this.passedX = passedX;
this.passedY = passedY;
drawCheckoutGui();
public void drawCheckoutGui()
prods= new String[20];
prods[0] = "Beans";
prods[1] = "Eggs";
prods[2] = "bread";
prods[3] = "Jam";
prods[4] = "Butter";
prods[5] = "Cream";
prods[6] = "Sugar";
prods[7] = "Peas";
prods[8] = "Milk";
prods[9] = "Bacon";
prods[10] = "Spaghetti";
prods[11] = "Corn Flakes";
prods[12] = "Carrots";
prods[13] = "Oranges";
prods[14] = "Bananas";
prods[15] = "Snickers";
prods[16] = "Wine";
prods[17] = "Beer";
prods[18] = "Lager";
prods[19] = "Cheese";
for(i=0; i<prods.length;i++);
code = new int [20];
code[0] = 1;
code[1] = 2;
code[2] = 3;
code[3] = 4;
code[4] = 5;
code[5] = 6;
code[6] = 7;
code[7] = 8;
code[8] = 9;
code[9] = 10;
code[10] = 11;
code[11] = 12;
code[12] = 13;
code[13] = 14;
code[14] = 15;
code[15] = 16;
code[16] = 17;
code[17] = 18;
code[18] = 19;
code[19] = 20;
for(b=0; b<code.length; b++);
price = new double [20];
price[0] = 0.65;
price[1] = 0.84;
price[2] = 0.98;
price[3] = 0.75;
price[4] = 0.45;
price[5] = 0.65;
price[6] = 1.78;
price[7] = 1.14;
price[8] = 0.98;
price[9] = 0.99;
price[10] = 0.98;
price[11] = 0.65;
price[12] = 1.69;
price[13] = 2.99;
price[14] = 0.99;
price[15] = 2.68;
price[16] = 0.89;
price[17] = 5.99;
price[18] = 1.54;
price[19] = 2.99;
for(c=0; c<code.length; c++);
screensize = Toolkit.getDefaultToolkit().getScreenSize();
chk1 = new JFrame();
chk1.setTitle("Checkout #" + checkoutID); //Use the new stored int
chk1.setSize(300,350);
chk1.setLocation(passedX,passedY);
chk1.setLayout(new GridLayout(5,1));
//chk1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
cont1 = chk1.getContentPane();
//chk1.setLayout(new BorderLayout());
pan1 = new JPanel();
pan2 = new JPanel();
pan3 = new JPanel();
pan4 = new JPanel();
pan5 = new JPanel();
//panel 1
pan1.setLayout(new FlowLayout());
pan1.setBackground(Color.black);
prodList = new JComboBox(prods);
prodList.setMaximumRowCount(2);
prodList.addItemListener(this);
but1 = new JButton("Buy");
but1.addActionListener(this);
lab1 = new JLabel("Products");
lab1.setForeground(Color.white);
lab1.setBorder(BorderFactory.createLineBorder(Color.white));
pan1.add(lab1);
pan1.add(prodList);
pan1.add(but1);
//panel 2
pan2 = new JPanel();
pan2.setLayout(new BorderLayout());
pan2.setBackground(Color.black);
lab3 = new JLabel(" Enter Product Code");
lab3.setForeground(Color.white);
tArea2 = new JTextArea(8,10);
tArea2.setBorder(BorderFactory.createLineBorder(Color.white));
lab5 = new JLabel(" Tesco's ");
lab5.setForeground(Color.white);
lab5.setBorder(BorderFactory.createLineBorder(Color.white));
lab6 = new JLabel("Checkout");
lab6.setForeground(Color.white);
lab6.setBorder(BorderFactory.createLineBorder(Color.white));
lab7 = new JLabel("You selected ");
lab7.setForeground(Color.cyan);
//lab7.setBorder(BorderFactory.createLineBorder(Color.white));
pan2.add(lab7,"North");
pan2.add(lab6,"East");
pan2.add(tArea2,"Center");
pan2.add(lab5,"West");
pan2.add(lab3,"South");
//panel 3
pan3 = new JPanel();
pan3.setLayout(new FlowLayout());
pan3.setBackground(Color.black);
manual = new JButton("Manual");
manual.addActionListener(this);
manual.setBorder(BorderFactory.createLineBorder(Color.white));
remove = new JButton("Remove");
remove.addActionListener(this);
remove.setBorder(BorderFactory.createLineBorder(Color.white));
tf1 = new JTextField(5);
pan3.add(manual);
pan3.add(tf1);
pan3.add(remove);
//panel 4
pan4 = new JPanel();
pan4.setLayout(new FlowLayout());
pan4.setBackground(Color.black);
finaLi1 = new JButton("Finalise");
// finaLi1.addActionListener(this);
cashBack = new JButton("Cashback");
JTextField list2 = new JTextField(5);
but4 = new JButton(" Sum Total");
but4.addActionListener(this);
but4.setBorder(BorderFactory.createLineBorder(Color.white));
cashBack.setBorder(BorderFactory.createLineBorder(Color.white));
pan4.add(cashBack);
pan4.add(list2);
pan4.add(but4);
//panel 5
pan5 = new JPanel();
pan5.setLayout(new GridLayout(2,3));
pan5.setBackground(Color.black);
disCo = new JButton("Discount");
disCo.addActionListener(this);
disCo.setBorder(BorderFactory.createLineBorder(Color.black));
but6 = new JButton("Finalise");
but6.addActionListener(this);
but6.setBorder(BorderFactory.createLineBorder(Color.black));
rb1 = new JButton("Cash");
rb1.addActionListener(this);
rb1.setBorder(BorderFactory.createLineBorder(Color.black));
rb2 = new JButton("Card");
rb2.addActionListener(this);
rb2.setBorder(BorderFactory.createLineBorder(Color.black));
rb3 = new JButton("Cheque");
rb3.addActionListener(this);
rb3.setBorder(BorderFactory.createLineBorder(Color.black));
rb4 = new JButton("Voucher");
rb4.addActionListener(this);
rb4.setBorder(BorderFactory.createLineBorder(Color.black));
pan5.add(disCo);
pan5.add(but6);
pan5.add(rb1);
pan5.add(rb2);
pan5.add(rb3);
pan5.add(rb4);
//add the panels to the container
cont1.add(pan1);
cont1.add(pan4);
cont1.add(pan2);
cont1.add(pan3);
cont1.add(pan5);
chk1.setContentPane(cont1);
chk1.setVisible(true);
class OfficeView
private OfficeView off111;
private JFrame offMod1;
private JPanel pane1;
private JButton refill;
private Container cont11;
private Dimension screensize;
private JTextField tf11,tf12;
public OfficeView()
drawOfficeGUI();
public void drawOfficeGUI()
screensize = Toolkit.getDefaultToolkit().getScreenSize();
offMod1 = new JFrame("Office Control");
int frameWidth = 300;
int frameHeight = 250;
offMod1.setSize(frameWidth,frameHeight);
offMod1.setLocation(300,350);
offMod1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
cont11 = offMod1.getContentPane();
pane1 = new JPanel();
pane1.setBackground(Color.cyan);
refill = new JButton("Refill");
tf11 = new JTextField(25);
tf12 = new JTextField(25);
pane1.add(tf11);
pane1.add(refill);
pane1.add(tf12);
cont11.add(pane1);
offMod1.setContentPane(cont11);
offMod1.setVisible(true);
public void ItemStateChanged(ItemEvent ie)
if(ie.getItemSelected()== prodList)
changeOutput();
public void changeOutput()
if(ItemSelected ==0)
tf1.setText("You have selected", +a +b +c);
}Message was edited by:
fowlergod09 -
Top Wait Events Query is needed
Hi,
I hope I'm asking this question in right place.
I need a script and its output should give me the top 5 wait events in last 1 hour for an instance.986330 wrote:
Hi,
I hope I'm asking this question in right place.
I need a script and its output should give me the top 5 wait events in last 1 hour for an instance.
which Top 5? Top number of Waits? Top Total time Waited? Top Avg Wait Time?
why don't you just run AWR report? -
Eclipse error | Help needed badly
Hi,
My Eclipse was working properly a couple of days back but suddenly It's stopped working and gives me an error : "workspace does not contain a main type,Do you have a public void run method"
Now,I think the problem Is some how the jar's that I'm trying to upload aren't getting uploaded.
I say this because a strange problem has arised and I think this might have to do with Eclipse giving the above error.
This Is what I do to create a new java project
-Open eclipse
-save files to workspace
-click on new > java project
-Then,give the project a name and then click finish
-after that I create a new class by right clicking on the project folder > new > class >give the class a name and then click finish.
-after that I open workspace(thats on my desktop) click on the project folder make a new folder name It "lib" and upload the jar that I need for the project.
-after this I go back Into eclipse and right click on the project folder and hit refresh,now I see the folder"lib" containing the jar Inside It.
-I right click on the jar file and select "add to build path",and now theres the Issue comes In.
I want the jar to Into the reference librarys,because the last time I got the jar In the reference library It worked.
But this time I can't even manage to find where the reference library Is.
so when I click on add to build path the jar Instead of appearing in the reference library (which Isn't there) just dissapears.
I really need to fix this,because I cant test and write code until Its fixed.
heres a snapshot of how my eclipse framework looks : [http://www.flickr.com/photos/38561743@N03/4122304046/sizes/o/]
I tried to solve this on my own for hours and hours but It just Isn't working.
please guys help,I need to solve this.
Thanks,
Edited by: Parastar on Nov 21, 2009 7:26 AM
Edited by: Parastar on Nov 21, 2009 7:27 AMParastar wrote:
okay guys,I'v tried the eclipse forums for about 24 hours now.
but no response,those guys are really really slow.
please,some one here help me out.Quit begging. You've already been told this is not the place for this question. You're complaining about not getting an answer there, and begging people here to answer, as if that vindicates your decision to post here in the first place. But you haven't gotten your solution here either. Which is worse--no answer there, or a bunch of answers that don't help you here?
Maybe you are looking for
-
I need to save a report directly to excel format. The user does not want to open a delimited file in excel. After a lot of trials I got excel.prt file which supposedly saves the report in excel format directly from the PRINT TO FILE option. But I am
-
Time Capsule and external 2 tb drive
I am trying to connect a 2 tb seagate free agent desk external drive for mac to my time capsule through the USB port. I would like to have additional memory available for the three macs on the home network. Everything works fine for 15 mins or so and
-
A new type of activeKey USB token problems.
My activeKey USB token worked until recently. I did this: https://discussions.apple.com/thread/2526943 and I installed the package: http://smartcardservices.macosforge.org. Once I renewed, the usb key doesn't show up in my keychain. This isn't a ca
-
Prohibitory sign after update 10.9.4 from 10.8.5
First I would like to say thank you ahead of time for taking the time out of your day to read this and try to help me. I really appreciate it. I have 2012 13" MacBook Pro Intel i5 2.5 4GB 1TB Was running 10.8.5 flawlessly. I thought update to Maveric
-
Why didn't my new imac come with an install disk for 10.7??
why didn't my new imac come with an install disk for 10.7??