Again Interesting JButton Query
See I am making a Dock and my dock items are basically JButtons
So to delete the Dock Item from my Dock i want to introduce a close button on each JButton
My query is
I want to add a Button in a JButton and at a particular location on that JButton
Eg:
JButton dockitem=new JButton("dockitem");
JButton close=new JButton("close");
Now i want to embed close in dockittem at right top corner so can anyone help me out :)
You are going to have to get clever with Layouts or use an AbsoluteLayout.
Similar Messages
-
I have three tables namely
Inspections
flights
Airports
Inspections table is child of flights table
flights table is child of airports table
I need to get departure airport name, arrival airport name for specific instance of inspections. where flights table have arr_airport, dep_airport attributes as foriegn keys.
i have tried this query;
select NAME as arrival_airport
from airports
where airports.AIRPORTID in (select f.ARRAIRPORT
from flights f, inspections i
where i.STATUS = 'P' and i.FLIGHTID = f.FLIGHTID)
Problem is inner query return multiple rows but outer query gives the distinct names for all rows returned. I dont want distinct names but names for all rows returned by inner query.
Suggest some good solution, thanks
Message was edited by:
kashif
Message was edited by:
kashifJust to confirm, if
select f.ARRAIRPORT
from flights f, inspections i
where i.STATUS = 'P' and i.FLIGHTID = f.FLIGHTIDreturns 20 rows including duplicated airport ids, you would expect to see airports.name 20 times including duplicates?
If that is the case, you just need to join don't you?
select
NAME as arrival_airport
from
airports a
flights f,
inspections i
where
a.AIRPORTID = f.ARRAIRPORT
AND
i.STATUS = 'P'
and
i.FLIGHTID = f.FLIGHTIDAnd if you need to show the arrival and departure airport names you'd just join to airports twice:
select
arr.NAME as arrival_airport
dep.NAME as departure_airport
from
airports arr,
airports dep,
flights f,
inspections i
where
arr.AIRPORTID = f.ARRAIRPORT
AND
dep.AIRPORTID = f.DEPAIRPORT --Just guessing the name here
AND
i.STATUS = 'P'
and
i.FLIGHTID = f.FLIGHTIDHTH
David -
Interesting date query I need some help with
I need to select dates for each day starting from a
particular date up until the present day. These dates are for days
where a value doesn't exist in the table.
Thanks for any advice> how to do this purely in sql
In ms sql you could use a table valued udf. The udf could
generate the dates and insert them into a table variable that would
be used in your join. The basic logic is the same. Create two
variables: @startDate and @todaysDate. Then loop while the start
date is <= today's date. Within each loop insert the current
date into the table variable, and increment the start date
http://msdn.microsoft.com/en-us/library/ms191165.aspx
while @startDate <= @today
begin
insert into @dateTable (theDate) values (@startDate)
set @startDate = dateAdd(d, 1, @startDate)
end
Though personally I prefer using using a permanent calendar
table. I use that table in my selects rather than generating a
table of dates each time. -
Does The Query get Fired Again
Does the query get fired again when i query a existing view
1. create view abc as select name from Table
2. select name from abc
Table is a really large table wid many columns and many rows
Lookin for a better performance coz i need names in one procedure and again need the same names for deletion in another procedure
I dont want to fire the same query twice dats y.> there are like 20000 rows out of wch i need 2 retrieve 9000 or 10000 rows dependin on
the constraints
Go slow on the I'M SPEAK please... much better to deal with technical issues when using proper English.
A 20,000 rows table is tiny and running a SQL that returns 10,000 or so rows, should be execute in seconds.. the slowest part of the operation should be shipping that 10,000 rows to the client (across the network) in case of a remote client.
Maybe if you can describe the physical structure of the table (heap, index, partitioned?) and pinpoint just where the performance problem is (execution plan or an SQL*Plus autotrace), we could comment on why the performance seems (or maybe truly is) slow. -
hi all,
SELECT T0.[Quantity] + (T0.[Quantity]/10), T0.[ItemCode] FROM RDR1 T0 INNER JOIN ORDR T1 ON T0.DocEntry = T1.DocEntry WHERE T1.[DocNum] =[%0]
This query select particular sales order and then item is selected one by one in this order, after every selection we have to again run this query but my client want to select item by pressing ctrl button so that item can be selected at one time.so please provide me updated query.
thanks and regards
rahulHi Rahul,
You can use between condition i where clause so as to select a range of items.
Again here you may not be able to select in random the items required, they will be in sequential order only.
SELECT T0.Quantity + (T0.Quantity/10), T0.ItemCode FROM RDR1 T0 INNER JOIN ORDR T1 ON T0.DocEntry = T1.DocEntry WHERE T1.DocNum between [%0] and [%1]
Hope this solves ur issue!!!
Regards
Reno -
Creating a query for a custom report layout
hello guys,
i am really stuck with this task - i need to populate a report with rows with "0" values based on a particular criteria, here is the example: lets say we have a table BROKERS with company names, their transaction types and cumulative amounts for a current month and all months ever.
COMPANY TRAN_TYPE CURR_MNTH ALL_MNTH
Broker1 CURRENCY_SELL $1000.00 $1500000.00
Broker1 GOLD_SELL $50000.00 $2500000.00
Broker1 GOLD_BUY $80000.00 $8500000.00
Broker1 STOCKS_SELL $35000.00 $3500000.00
table BROKERS does not have a field TRAN_TYPE, but has a field TRAN_TYPE_CD which reffers to another table called TRAN_TYPE_CD_EXPL, where all the codes are explained:
TRAN_TYPE_CD TRAN_TYPE_CD_EXPLD
1 STOCKS_SELL
2 STOCKS_BUY
3 GOLD_SELL
4 GOLD_BUY
5 SILVER_SELL
6 SILVER_BUY
7 COPPER_SELL
8 COPPER_BUY
9 CURRENCY_SELL
10 CURRENCY_BUY
so the results shown above is just a simple join of those two tables:
select b.COMPANY, tt.TRAN_TYPE, b.CURR_MONTH, b.ALL_MNTH
from BROKERS b, TRAN_TYPE_CD_EXPL tt
where b.TRAN_TYPE_CD = tt.TRAN_TYPE_CD;
everything is pretty simple, but here is where the problem starts : the report i am working on should look like this:
COMPANY MARKET TRAN_TYPE CURR_MNTH ALL_MNTH
Broker1 FOREX CURRENCY_SELL $1000.00 $1500000.00
Broker1 FOREX CURRENCY_BUY $0.00 $5500000.00
Broker1 CONTRACTS GOLD_SELL $50000.00 $2500000.00
Broker1 CONTRACTS GOLD_BUY $80000.00 $8500000.00
Broker1 STOCKMARKET STOCKS_SELL $35000.00 $3500000.00
Broker1 STOCKMARKET STOCKS_BUY $0.00 $9500000.00
so let me explain :
firstable, report should contains a column MARKET, which should be populated based on the values in the column TRAN_TYPE, but the thing is there is no table MARKET in database, so each time when you need to populate it in a report or somewhere else, you need to use decode like this (assumed everybody knows where all kind of tran_types belong to):
SELECT DECODE (TRAN_TYPE_CD_EXPL.TRAN_TYPE_CD_EXPLD,
'CURRENCY_SELL', 'FOREX',
'CURRENCY_BUY', 'FOREX',
'STOCKS_SELL', 'STOCKMARKET',
'STOCKS_BUY', 'STOCKMARKET') AS MARKET,
or based on TRAN_TYPE_CD value:
SELECT DECODE (BROKERS.TRAN_TYPE_CD,
9, 'FOREX',
10, 'FOREX',
1, 'STOCKMARKET',
2, 'STOCKMARKET') AS MARKET,
2) problem number 2 is more complicated : the report logic says - is a company has at least one transaction in a particular group (lets say CURRENCY_SELL for market type 'FOREX'), the report should be populated with other tran_types from the market type group with $0 even thou this company did not have any of those transactions during current month. so in this case it should be populated with the rows
Broker1 FOREX CURRENCY_BUY $0.00 $5500000.00
and
Broker1 STOCKMARKET STOCKS_BUY $0.00 $9500000.00
The thing is that it will be executed thru plsql batch on unix, so it must be a single query.
Any ideas and/or suggestions are very appreciated!
Thanks
P.S.
Its oracle 11gr2, with read-only role.Hi,
This sounds like a jo for a partitioned outer join.
Here's one way:
WITH broker_summary AS
SELECT b.company
, tt.tran_type
, b.curr_mnth
, b.all_mnth
FROM broker b
JOIN tran_type_cd_expl tt ON WHERE b.tran_type_cd = tt.tran_type_cd
, market AS
SELECT 'CURRENCY_SELL' AS tran_type, 'FOREX' AS market from DUAL UNION ALL
SELECT 'CURRENCY_BUY', 'FOREX' from DUAL UNION ALL
SELECT 'STOCKS_SELL', 'STOCKMARKET' from DUAL UNION ALL
, got_market_cnt AS
SELECT bs.company
, m.market
, m.tran_type
, b.curr_mnth
, b.all_mnth
, COUNT (*) OVER ( PARTITION BY bs.company
, m.market
) AS market_cnt
FROM market m
LEFT OUTER JOIN broker_summary bs PARTITION BY (bs.company)
ON bs.tran_type = m.tran_type
SELECT company
, market
, tran_type
, NVL (curr_mnth, 0) AS curr_mnth
, NVL (all_mnth, 0) AS all_mnth
FROM got_market_cnt
WHERE market_cnt > 0
ORDER BY company
, market
, tran_type
;If you'd care to post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data, then I could test it.
You should create a market table. Do it once, then you won't have to do it over and over again in every query that needs it. -
Need Help with complex query for productio database
Hello again,
i need your help again, for an query how Shows me how long every production step takes per Order.
See sample data and what i expect.
Thank you all for your help.
We use Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Here the sample data tables:
CREATE TABLE TABLE_2
( "ORDER_NR" VARCHAR2 (12)
, "PRIORITY" VARCHAR2 (2)
, "WO_STEP" VARCHAR2 (1)
, "STEP_DATE" DATE
CREATE TABLE TABLE_1
( "ORDER_NR" VARCHAR2 (12) PRIMARY KEY
, "PRIORITY" VARCHAR2 (2)
, "CREATE_DATE" DATE
, "ACT_STEP" VARCHAR2 (2)
, "STEP_DATE" DATE
, "EMPLOYEE" VARCHAR2 (5)
, "DESCRIPTION" VARCHAR2 (20)
INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, CREATE_DATE, ACT_STEP, STEP_DATE, EMPLOYEE, DESCRIPTION)
VALUES ('1KKA1T205634', '12', TO_DATE('10-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'), 'U', TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'), 'W0010', 'CLEAN HOUSE');
INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, CREATE_DATE, ACT_STEP, STEP_DATE, EMPLOYEE, DESCRIPTION)
VALUES ('1KKA1Z300612', '12', TO_DATE('08-FEB-13 14:00:00','DD-MON-RR HH24:MI:SS'), 'F', TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'), 'K0052', 'REPAIR CAR');
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'A', TO_DATE('12-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', '5', TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'K', TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', '5', TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'K', TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', '5', TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'C', TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'B', TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'E', TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'F', TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'S', TO_DATE('21-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'R', TO_DATE('21-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1T205634', '12', 'U', TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', 'A', TO_DATE('12-FEB-13 13:52:42','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', '5', TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', 'K', TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', '5', TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', 'K', TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', '5', TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', 'C', TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', 'B', TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', 'E', TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE)
VALUES ('1KKA1Z300612', '12', 'F', TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
COMMIT;And here is what i expect from my query:
SYSDATE 28.Feb.13 14:00
ORDER_NR PRIORITYCREATE_DATE STATUS STATUS_DATE DESCRIPTION AGE_1 AGE_2 WAITNG STEP_A STEP_B STEP_C STEP_5 STEP_K STEP_E STEP_F STEP_S STEP_R
1KKA1T205634 12 10.Feb.13 10:00 U 28.Feb.13 12:00 CLEAN HOUSE 18,083 8,833 2,125 0,833 4,125 0,083 0,750 0,208 2,125 0,666 0,042 7,125
1KKA1Z300612 12 08.Feb.13 14:00 F 20.Feb.13 16:00 REPAIR CAR 20,000 16,042 2,125 0,833 4,125 0,083 0,750 0,208 2,125 0,666 And now the explanation to the query result:
The AGE_1 is the difference in days between the 'CREATE_DATE' and IF EXSIST the STEP 'U' then STEP_DATE or if the STEP 'U' is not found in TABLE_2 then it should show the difference in days between the 'CREATE_DATE' and the 'SYSDATE'
The AGE_2 is the difference in days between the STEP 'A' STEP_DATE and IF EXSIST the STEP 'R' then STEP_DATE or if the STEP 'R' is not found in TABLE_2 then it should show the difference in days between the 'CREATE_DATE' and the 'SYSDATE'
The WAITING is the difference in days between CREATE_DATE and STEP 'A' STEP_DATE
The following columns show the days how long the ORDER_NR stays in these STEP, if an ORDER_NR comes into the same STEP more then one time it should be calculated together.
If the ORDER_NR skips a step it should show a zero in the specific field.
I hope my explanation is good enough, my english skills are far away from good.
Thanks all for your help.
Greets Reinhard W.Hi,
i changed this query:
with t2 as (
select t.*,
lead(step_date) over(partition by order_nr order by step_date) next_step_date
from table_2 t
select t1.*,
nvl(
max(
case t2.wo_step
when 'U' then t2.step_date
end
sysdate
) - t1.create_date age_1,
nvl(
max(
case t2.wo_step
when 'R' then t2.step_date
end
sysdate
) - t1.create_date age_2,
sum(
case t2.wo_step
when 'B' then t2.next_step_date - t2.step_date
end
) step_b
from table_1 t1,
t2
where t2.order_nr = t1.order_nr
group by t1.order_nr,
t1.priority,
t1.create_date,
t1.act_step,
t1.step_date,
t1.employee,
t1.descriptionTo this:
with t2 as (
select t.*,
lead(step_date) over(partition by order_nr order by step_date) next_step_date
from table_2 t
select t1.order_nr,
nvl(
max(
case t2.wo_step
when 'U' then t2.step_date
end
sysdate
) - t1.create_date age_1,
nvl(
max(
case t2.wo_step
when 'R' then t2.step_date
end
sysdate
) - t1.create_date age_2,
sum(
case t2.wo_step
when 'B' then t2.next_step_date - t2.step_date
end
) step_b
from table_1 t1,
t2
where t2.order_nr = t1.order_nr
group by t1.order_nrthen i get the ORA-00979 Error.
Whats wrong?
I have another question.
How can i handle i i want to group to or more 'STEP's in one Column.
in Case of this i want that the column 'STEP_B' contains all days for STEP 'B' and STEP '5'.
I tried already with a + Operation like this:
with t2 as (
select t.*,
lead(step_date) over(partition by order_nr order by step_date) next_step_date
from table_2 t
select t1.*,
nvl(
max(
case t2.wo_step
when 'U' then t2.step_date
end
sysdate
) - t1.create_date age_1,
nvl(
max(
case t2.wo_step
when 'R' then t2.step_date
end
sysdate
) - t1.create_date age_2,
Round( sum(
case t2.wo_step
when 'B' then t2.next_step_date - t2.step_date
end
) +
sum(
case t2.wo_step
when '5' then t2.next_step_date - t2.step_date
end
), 3 ) step_b
from table_1 t1,
t2
where t2.order_nr = t1.order_nr
group by t1.order_nr,
t1.priority,
t1.create_date,
t1.act_step,
t1.step_date,
t1.employee,
t1.descriptionBut this does reply evertime a NULL.
Thank You. -
Af:query with extra functionality
Hello everyone,
JDev: 11.1.1.3 (migrating to 11.1.1.5)
We are using the af:query component as our standard query module (seems logical).
Thanks to the Frank Nimphius "af:query component complex field validation" on the ADF Code Corner,
it is clear how to do validation in an af:query component.
What we want to do is the following : on an existing field, adding a link/icon that opens a popup that contains
a taskflow, which contains a more complex query (again with af:query ;-)). The result of the tf should return
into the field in the first af:query component.
Is something like this possible?
Thanks.
Filip Huysmans.Filip,
no, you can't
Frank -
Insert Chinese data in Oracle but cannot be shown when querying
I use:
JDK 1.1.8, Oracle 8i, thin driver.
The OS is HP Unix.
I successfully insert the Chinese Big5 encoding data into Oracle. But I can't show the Chinese again when I querying.
Here's my code:
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection
("jdbc:oracle:thin:@hpdev.wisers.com:1521
:research", "corp", "corp");
stmt = con.createStatement();
String sqlString = new String("insert into filetable values(1,"
+ var1 + "," + var2 + "...)");
stmt.executeQuery(sqlString);
Then I show the result by "select * from filetable;". However, the Chinese Big5 encoding data cannot be shown, "+??.." is shown instead. There is no problem when the data is in English.
I have tried
byte[] sqlStringBytes = sqlString.getBytes("Big5");
String newsql = new String(sqlStringBytes,"Big5");
stmt.executeQuery(newsql);
but still not successful.
My NLS_LANG is
AMERICAN_AMERICA.ZHT16BIG5
How can I make use of this variable? How can I solve the problem?
I am very in hurry. The program deadline is coming!! Help please!!
nullYour code looks fine ?
What's your db character set ?
I successfully insert the Chinese Big5 encoding data into Oracle.How do you know this ? Did you verify with SQL*Plus to see whether the data can be retrieved ?
What are var1 and var2 ? -
SQL Query on an XMLObject CaseSensitive Resultset
Hi there,
I make a SQL query on an object with dbtype = query
<cfquery name="qry_catalog" dbtype="query">
SELECT * FROM catalog query
WHERE country LIKE '# art #'
</ cfquery>
What also goes without problems, interestingly, the query takes only results when the Upper / lower case is correct.
e.g. Search for "UK" brings 13 records from the XML object "uk" no.
I have never read that it is case-sensitive.
I'm open to all suggestions.
Thank you greeting JochenI believe it's commonly known that it's case sensitive. e.g. it's documented here:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=using_recordsets_7.html
"Unlike the rest of ColdFusion, Query of Queries is case-sensitive. However, Query of Queries supports two string functions, UPPER() and LOWER(), which you can use to achieve case-insensitive matching." -
Hi,
I have a a VO based on a Database Table 'XXCZ_TEST_V'(View in APPS schema)
The table(view) present in APPS schema is based on several base Tables in XXCZ schema.
When I test the Query in the Wizard it shows following error int he "Detailed Screen"
java.sql.SQLException: Invalid column index: getValidColumnIndex
While testing the VO output in BC4J tester I get followig error
oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: Select * from XXCZ_TEST_V
Note : The query Select * from XXCZ_TEST_V works fine in SQL client or TOAD.
How can i correct it?
Thanks,
Gowtam.Hi Srini,
I am facing a strange behavior in the wizard.
When i test the query in the Wizard i get[b] "Query Valid".
If I open the Edit VO and then click test, still I get "Query Valid".
but when I click Apply I get an SQL error.
and BC4J tester also throws an SQL error.
The query is
Select * from XXCZ_MODELS_V
First time It works fine..
Then If I edit it to select Model_code,Model_name from XXCZ_MODELS_V I get the error.
And now, again if Edit the query back to Select * from XXCZ_MODELS_V,surprse...again an error..
I am not able to understand the error..as It executes perfectly fine in SQL client
Everytime I am deleting the VO and creating again with select * query...
Should I delete the VO everytie if i want to change the Query
Thanks,
Gowtam. -
Problem with input ready query with structure in Rows
Hi,
First I have created an input ready query without a structure where I have GL accounts in rows and key figures in column. It works and I can see that the cells are ready for input when I launch it in web through query designer.
Later, I am replacing the GL accounts in rows with a structure. Each line in the structure is combination of GL acctUoMChart of Acct (all restrcited to single values). Here comes the issue. When I run the query again (launching thru query designer) it dumps. Any idea?
Also, please let me know whether the planning applications can be made using BEX analyser OR WAD ?
Thanks a lot in advance.
Regards,
SSC
Edited by: sapsem con on Feb 19, 2009 2:38 PMHi,
Can you check ST22 for the dump analysis.
Also, planning applications can be built using BEx analyzer or WAD.
Check this link for example and step-by-step procedure to do the same.
http://help.sap.com/saphelp_nw70/helpdata/en/43/a18462c8291d9be10000000a1553f7/frameset.htm
Regards,
Deepti -
Querying Data from 3rd Party System
We would like to query data from a 3rd party (non-SAP) system. Our BW is an MSSQL DB and the 3rd party is also an MSSQL DB. We do not want to physically load the data from the external system we just want to use the BW query tools to display the data.
Is this possible? I thought this is what a Remote Cube would be used for but SAP's instructions on Remote Cubes are vague and confusing.
1. In BW, create a source system for the external system that you want to use.
2. Define the required InfoObjects.
3. Load the master data:
· Create a master data InfoSource for each characteristic
· Load texts and attributes
4. Define the RemoteCube
5. Define the queries based on the RemoteCubeHi Jon,
SAP RemoteCube is an InfoProvider. This is a special RemoteCube that allows
you to define queries with direct access to transaction data in other SAP systems. SAP RemoteCubes are defined on the basis of an InfoSource with flexible updating, and assume the characteristics and key figures of the InfoSource.
Use/Data Flow
Unlike with other RemoteCubes, it is not necessary to program extractors. The
same extractors are used to select data in the source system that are also used when replicating data into the BW. When executing a query, each navigation step sends a request to the extractors for the assigned source systems. In addition, characteristics selection and selection criteria for these characteristics are transformed to fields in the transfer structure, in accordance with the transfer rules. They are transferred to the extractor in this form. The delivered datasets run through the transfer rules in BW and are filtered once again in the query.
In your case Remote cube can be an option .
Cheers
Raja -
[SOLVED] Strange behaviour of Query-by-Example (QBE) fields
Hello,
Jdev 11g TP3.
We have a QBE-Block with input fields.
Follwing steps are performed:
1) Change to find mode: #{bindings.Find.execute}
2) Enter search criteria into the fields
3) execute query: #{bindings.Execute.execute}
4) change to find mode again --> previously entered search criterias are shown --> OK
5) clear the search criteria in all fields
6) execute query again
7) PROBLEM: query is executed with the OLD search criteria again.
If we change into query mode again, the OLD search criterias are shown again
(BUT not for ALL fields).
8) Even wildcards (* or %) doesn't change the situation.
But it's possible to enter a different (but not empty) search criteria into the field.
Details:
=====
For some of the QBE-Fields the search criteria can be cleared but for some of them not.
Differences between this fields:
a) mandatory fields (also part of the key in the view model and NOT NULL in DB) --> criteria can't be cleared
b) non-mandatory fields (also not part of the view model and NULL-able in DB) --> criteria can be cleared
I tried to change one of the mandatory fields to non-mandatory and to be not part of the key in the view model but behaviour doesn't change?
Can anybody confirm this behaviour as bug or is there a mistake on my side?
BR
Peter
Message was edited by:
hofespetSeems to be solved in TP4.
br
Peter -
Big Problem.. Need a query
Hi,
I have an issue with Sql Query, i have written the same some extent.
Aim : I am trying to fetch the Numeric data from a Character column and filter with some numeric condition.
I have written the same up to filter the numeric data, the problem is how to filter data again the resultant query with numeric operations.
Problem Facing :
Invalid Number... Error....
I have prepared a Small Test Case for this scenario :
CREATE TABLE KSK_TEST_Q
(INVENTORY_ITEM_ID NUMBER,
ELEMENT_NAME VARCHAR2(2000),
ELEMENT_VALUE VARCHAR2(2000),
ITEM_CATALOG_GROUP_ID NUMBER
BEGIN
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (2794,'Memory Supplied','SATIH123',93);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (167,'Diameter','123SEFG',33);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (167,'Thread','123ASDF1234213',33);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (482,'Thread','32',33);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (484,'Diameter','6',33);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (484,'Thread','28',33);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (247,'Size','1232130.90',115);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (247,'Size','123213.WER234',113);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (247,'Size','17',31);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (225,'Size','TASDRTS',115);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (225,'Size','23423',113);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (225,'Size','5665.09',31);
Insert into KSK_TEST_Q (INVENTORY_ITEM_ID,ELEMENT_NAME,ELEMENT_VALUE,ITEM_CATALOG_GROUP_ID) values (199,'Size','89.00',115);
END;
Case 1 :
-- fine because its checking as a Character value --------------
select * from ( select * from (select cc.* ,ltrim(translate(cc.element_value,'0123456789.0123456789',' '))
res from KSK_TEST_Q cc where element_value <>'.' ) where res is null or res = '0' )
where element_value = '32'
Case 2:
-- error Invalid Error -- because it was checking for the all the data not for resultant query ……. Why its happening like this..?
select * from ( select * from (select cc.* ,ltrim(translate(cc.element_value,'0123456789.0123456789',' '))
res from KSK_TEST_Q cc where element_value <>'.' ) where res is null or res = '0' )
where element_value = 32 ;
Case 3:
-- error Invalid Error -- for the same case2 with applied to_number to value --
select * from ( select * from (select cc.* ,ltrim(translate(cc.element_value,'0123456789.0123456789',' '))
res from KSK_TEST_Q cc where element_value <>'.' ) where res is null or res = '0' )
where to_number (element_value) = 32 ;
Note: It was searching the value entire table KSK_TEST_Q, not in the resultant set... How can we handle the same on the resultant set only...
I need to develop the same with single query only ( not allowed to use procedures/blocks ), and finally I want to get the data for the filter condition (element_value) = 32 condition .
Please help on this
Thanks,
KumarPlease post what do you expect to get for each element_value. Is it:
SQL> select t.*,
2 regexp_replace(
3 element_value,
4 '[^\+\-\.0123456789]'
5 ) num
6 from KSK_TEST_Q t
7 /
INVENTORY_ITEM_ID ELEMENT_NAME ELEMENT_VALUE ITEM_CATALOG_GROUP_ID NUM
2794 Memory Supplied SATIH123 93 123
167 Diameter 123SEFG 33 123
167 Thread 123ASDF1234213 33 1231234213
482 Thread 32 33 32
484 Diameter 6 33 6
484 Thread 28 33 28
247 Size 1232130.90 115 1232130.90
247 Size 123213.WER234 113 123213.234
247 Size 17 31 17
225 Size TASDRTS 115
225 Size 23423 113 23423
INVENTORY_ITEM_ID ELEMENT_NAME ELEMENT_VALUE ITEM_CATALOG_GROUP_ID NUM
225 Size 5665.09 31 5665.09
199 Size 89.00 115 89.00
13 rows selected.
SQL> SY.
Maybe you are looking for
-
I've bought my S10e in April 2009. it worked properly until a month ago when i was browsing, this blue screen appears suddenly and Windows (XP SP3, home edition) restarts. It happens too fast that i cannot read the message. after logging in this mess
-
Exception - If table is Invalid
Hi All, I have following procedure... what exceptions should be used if the table name which i am passing is invalid. Can i give INVALID_CURSOR????? Specification Used table type... TYPE t_tab IS TABLE OF VARCHAR2 (4000); PROCEDURE PROCESS (
-
How to insert check box fields in a htmlb: tableview
Hi, Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked. Thanks in advance, Aruna.
-
Application stuck transferring to child primary distribution point
I have a single application (not a package) which is refusing to distribute to one of the child primary site servers. Bit of background: The server was built a few days ago and all packages were prestaged and loaded onto the server successfully exce
-
Third Party Certificate, 802.1X and Intermediate Certificate
Hi Guys, Quick question: Have 802.1x setup with Windows Radius Server - Installed a Godaddy certificate which came with an intermediate root certificate. I would like clients to validate the certificate to connect to the 802.1x, - Question: Do i ne