Writing query in frame!!
hi
Im developing a form in which i have been using BC4J.Currently my frame need a simple sql statement to fetch record from DB.since im using BC4J,do i need to open new connection to execute this query?.do we have any method to execute query??I have to execute query based on the values retrived from combobox.
Thanks in advance!!!
null
Assuming that your frame uses BC4J, and you are going against a predefined rowset:
rowSetInfo.setQueryCondition( whereClauseString);
rowSetInfo.setQueryOrderbyClause( orderByClauseSTring);
rowSetInfo.executeQuery();
may be helpful to you. I build a string dynamically based on textfield, checkbox and combobox entries for a custom Find panel.
Do Help on rowsetinfo.
Hope that helps
null
Similar Messages
-
help needed for writing query
i have the following tables(with data) as mentioned below
FK*-foregin key (SUBJECTS)
FK**-foregin key (COMBINATION)
1)SUBJECTS(table name)
SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
2 02 Computer Science
3 03 Physics
4 04 Chemistry
5 05 Mathematics
7 07 Commerce
8 08 Computer Applications
9 09 Biology
2)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
383 S1 9 4 2 3
384 S2 4 2 5 3
---------I actually designed the ABOVE table also like this
3) a)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
383 S1
384 S2
b)COMBINATION_DET
COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
1 383 9
2 383 4
3 383 2
4 383 3
5 384 4
6 384 2
7 384 5
8 384 3
Business rule: a combination consists of a maximum of 4 subjects (must contain)
and the user is less relevant to a COMB_NAME(name of combinations) but user need
the subjects contained in combinations
i need the following output
COMB_ID COMB_NAME SUBJECT1 SUBJECT2 SUBJECT3 SUBJECT4
383 S1 Biology Chemistry Computer Science Physics
384 S2 Chemistry Computer Science Mathematics Physics
or even this is enough(what i actually needed)
COMB_ID subjects
383 Biology,Chemistry,Computer Science,Physics
384 Chemistry,Computer Science,Mathematics,Physics
you can use any of the COMBINATION table(either (2) or (3))
and i want to know
1)which design is good in this case
(i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
good method to link with same table but if 4 subjects only(and must) comes
detail table is not neccessary )
now i am achieving the result by program-coding in C# after getting the rows from oracle
i am using oracle 9i (also ODP.NET)
i want to know how can i get the result in the stored procedure itsef.
2)how it could be designed in any other way.
any help/suggestion is welcome
thanks for your time --PradeeshWell I forgot the table-alias, here now with:
SELECT C.COMB_ID
, C.COMB_NAME
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
FROM COMBINATION C;
As you need exactly 4 subjects, the columns-solution is just fine I would say. -
Need helping in writing query for finding percentage of duration
Can any one please help in writing query for this.
The table is like this :-
ID Region Month Duration
I1 R1 Jan 80
I2 R2 Jan 70
I3 R1 Jan 70
I4 R3 Jan 40
I5 R1 Feb 80
I6 R2 Feb 30
I7 R3 Mar 100
I want to write a query to find
% of duration for each and every region against each and every month.
Please help in solving this query. I am in urgent need of this.
Thanks in advance.I also have to do in MS Access 2003You also have to ask into an other forum since here it's an Oracle forum, to try to find Oracle solution.
Nicolas. -
Hi All
This is regarding a query about Frame maker 11.
I have seen the in the FDK guide of FM 11 which states that "To compile FDK clients for Windows, you must use Microsoft Visual Studio 2010."
So do we need a separate installation of Microsoft Visual Studio 2010 in order to develop/compile FDK clients apart from FM11 installation or is its a part of FM11 software?
could you please any one can clarify on this .
Thank you .
Regards
RameshAFAIK, you have to supply your own IDE & compiler.
-
Hi,
Could anyone help me in writing below query without syntax errors.
I tried but no luck
select xmlelement("g", XMLATTRIBUTES(g.contentgroup_id as "id",g.groupname as "label",
(select xmlagg(xmlelement ("c",XMLATTRIBUTES(c.title as "title",c.content_id as "id")))) as "A"))
as "A" from
(SELECT g.contentgroup_id AS id, g.groupname AS label, c.title AS label, c.content_id AS id
FROM content_ec c FULL OUTER JOIN contentgroup_ec g ON c.group_id = g.contentgroup_id
oRDER BY g.groupname ,c.title ASC );
Any help really appreciated.
ThanksFew tips to get your question answered here
1. Give your database version. Some thing that does not work in one version works fine in the next. And 8i,9i or 10g is not version. best way to give the version is to query your v$version table like this.
SQL> select * from v$version where rownum = 1
2 /
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod2. You should understand we don't have what you have, meaning you should provide your data structure and some sample data for us to help.
3. "I got an error"... "Its not working"... and the list goes on. Sentences like this does not help. If you got a error past the entire error. If stuff does not work, tell us the details.
4. Just don't throw some output and say i want it. Please explain to every one how you derive it.
5. And the most important thing. Use \...\ tag to format. Please.. Please.. Please.. use it. It helps every one a lot. When you use it your SQL looks some thing like this.
SELECT xmlelement("g", XMLATTRIBUTES(g.contentgroup_id as "id",g.groupname as "label",
(select xmlagg(xmlelement ("c",XMLATTRIBUTES(c.title as "title",c.content_id as "id")))) as "A")) as "A"
FROM (SELECT g.contentgroup_id AS id,
g.groupname AS label,
c.title AS label,
c.content_id AS id
FROM content_ec c
FULL OUTER JOIN contentgroup_ec g
ON c.group_id = g.contentgroup_id
ORDER BY g.groupname ,c.title ASC );6. And also do search this forum. Most of your my queries are answered by simple search.
Thanks,
Karthick. -
PROBLEM IN WRITING QUERY.
HI FRIENDS,
I AM TRYING TO WRITE A QUERY WHICH WILL RETURN ME DATE QUATER WISE.
SUPPOSE I HAVE A DATE 19-SEP-12 THEN IT WILL CONSIDER THIS DATE BETWEEN FINANCIAL YEAR 2012-2013 AND THE RETURN ME DATE LIKE
01-APR-12 TO 30-JUN-12
01-JUL-12 TO 31-SEP-12
01-OCT-12 TO 31-DEC-12
01-JAN-13 TO 31-MAR-13
PLEASE HELP ME IN WRITING THE QUERY.Hi,
If
TRUNC (date_column, 'Q')is the beginning of quarter x, then
ADD_MONTHS ( TRUNC (date_column, 'Q')
, 3
)is the beginning of quarter x+1, and
ADD_MONTHS ( TRUNC (date_column, 'Q')
, 3
) - 1is the last day of quarter x.
The expression above is midnight at the beginning of the last day of quarter x; be careful if you use it in a BETWEEN expression. -
Assistance in writing Query / Query Logic.
I have a peculiar requirement to fetch data.
Table Structure ( Sample ... although real table has more fields)
Order ( orderid varchar2(30), custid varchar2(30), status varchar2(1), createdon datetime )
Sample Data:
OrderID CustID AccID Status createdon
123 111 Y 20-Jan-2012 01:29:22
124 111 100 Y 22-Jan-2012 01:23:02
125 111 100 N 23-Jan-2012 02:34:24
126 111 100 N 28-Jan-2012 04:23:22
127 111 100 N 29-Jan-2012 07:32:26
123Cancel 111 100 N 31-Jan-2012 03:27:29
I want to write 2 Queries.
a. input is OrderId, Need to find out how many order's present with status = 'N' after that orderid provided.
b. input is OrderId, Need to find out what is the previous order with status = 'Y'
Note: There can be 100's of orders and Status would be Y on first come first serve basis... if one does not have status = 'Y' ie it is 'N' the following order's will never turn to final status = 'Y'.
There are millions of records in the table.
Your help for writing this query / logic would be highly appreciated. Am intending to do thru single query.
Best Regards
MH Doshiselect count(*) from order
where createdon >( select created from order where order_id = &order_id);
and status = 'N';
select * from (select a.*, rownum rn from (select order_id from order
where status = 'Y'
and createdon<(seelect createdon from order where order_id = &order_id)
order by createdon)) where rn=1 -
Writing query using UNION Operator
Question -
(1)
Write an SQL Statement to list the following items: Customer ID, Customer Name, number of invoices, sum of total for invoices. Ensure that all customers are returned in the result set.
Answer for the above is written as below by one person. That seams to be correct. Is there another way of writing this same query.;
select c.CUSTOMER_ID,c.NAME,i.cnt,i.s
from gee_customer c,(select customer_id,count(*) as cnt, sum(TOTAL) as s
from gee_invoice
group by customer_id) i
where c.CUSTOMER_ID = i.customer_id (+)
(2)
My other question is How to write the above answer (or what you sugest) using UNION operator ?
Any ideas please
Message was edited by:
user483578In fact the outer join means you use the union of two result sets - usual join result
and the rows from the outer table for which there is not any row in the inner table.
SQL> select d.deptno, e.ename from emp e, dept d
2 where d.deptno = e.deptno(+)
3 order by 1,2
4 /
DEPTNO ENAME
10 CLARK
10 KING
10 MILLER
20 ADAMS
20 FORD
20 JONES
20 SCOTT
20 SMITH
30 ALLEN
30 BLAKE
30 JAMES
30 MARTIN
30 TURNER
30 WARD
40
15 rows selected.
SQL> select d.deptno,e.ename from emp e, dept d
2 where d.deptno = e.deptno
3 union
4 select deptno, null
5 from dept d where not exists (select null from emp e where e.deptno = d.deptno)
6 order by 1,2
7 /
DEPTNO ENAME
10 CLARK
10 KING
10 MILLER
20 ADAMS
20 FORD
20 JONES
20 SCOTT
20 SMITH
30 ALLEN
30 BLAKE
30 JAMES
30 MARTIN
30 TURNER
30 WARD
40
15 rows selected.In your example something like (NOT tested !)
with i as (select customer_id,count(*) as cnt, sum(TOTAL) as s
from gee_invoice group by customer_id)
select c.CUSTOMER_ID,c.NAME,i.cnt,i.s
from gee_customer c, i
where c.CUSTOMER_ID = i.customer_id
union
select c.CUSTOMER_ID,c.NAME,null,null
from gee_customer c
where not exists (select null from i where c.CUSTOMER_ID = i.customer_id)
Rgds. -
Trouble writing Query for Pivoting data from a table
I am having a little trouble writing a query for converting the below table data into a pivot data. I am trying to write a query for which if I give a single valid report_week date as input it should give me the data for that week and also provide two extra columns, one which gives the data of last week for the same countries and the second column which gives the difference of numbers in both the columns(i.e. COUNT - COUNT_LAST_WEEK).
REPORT_WEEK DIVISION COUNT
9/26/2009 country1 81
9/26/2009 country2 97
9/26/2009 country3 12
9/26/2009 country4 26
9/26/2009 country5 101
10/3/2009 country1 85
10/3/2009 country2 98
10/3/2009 country3 10
10/3/2009 country4 24
10/3/2009 country5 101
10/10/2009 country1 84
10/10/2009 country2 98
10/10/2009 country3 10
10/10/2009 country4 25
10/10/2009 country5 102
For example, if I give input as 10/10/2009, the output should be as give below.
REPORT_WEEK DIVISION COUNT COUNT_LAST_WEEK DIFFERENCE
10/10/2009 country1 84 85 -1
10/10/2009 country2 98 98 0
10/10/2009 country3 10 10 0
10/10/2009 country4 25 24 1
10/10/2009 country5 102 101 1
For example, if I give input as 10/3/2009, the output should be as give below.
REPORT_WEEK DIVISION COUNT COUNT_LAST_WEEK DIFFERENCE
10/3/2009 country1 85 81 4
10/3/2009 country2 98 97 1
10/3/2009 country3 10 12 -2
10/3/2009 country4 24 26 -2
10/3/2009 country5 101 101 0
Can anyone please shed some light on Query building for the above scenarios.
Thank you
SKP
Edited by: user11343284 on Oct 10, 2009 7:53 AM
Edited by: user11343284 on Oct 10, 2009 8:28 AMI assume there is no gap in report weeks. If so:
SQL> variable report_week varchar2(10)
SQL> exec :report_week := '10/10/2009'
PL/SQL procedure successfully completed.
with t as (
select to_date('9/26/2009','mm/dd/yyyy') report_week,'country1' division,81 cnt from dual union all
select to_date('9/26/2009','mm/dd/yyyy'),'country2',97 from dual union all
select to_date('9/26/2009','mm/dd/yyyy'),'country3',12 from dual union all
select to_date('9/26/2009','mm/dd/yyyy'),'country4',26 from dual union all
select to_date('9/26/2009','mm/dd/yyyy'),'country5',101 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country1',85 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country2',98 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country3',10 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country4',24 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country5',101 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country1',84 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country2',98 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country3',10 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country4',25 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country5',102 from dual
select max(report_week) report_week,
division,
max(cnt) keep(dense_rank last order by report_week) cnt_this_week,
max(cnt) keep(dense_rank first order by report_week) cnt_last_week,
max(cnt) keep(dense_rank last order by report_week) - max(cnt) keep(dense_rank first order by report_week) difference
from t
where report_week in (to_date(:report_week,'mm/dd/yyyy'),to_date(:report_week,'mm/dd/yyyy') - 7)
group by division
order by division
REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
10-OCT-09 country1 84 85 -1
10-OCT-09 country2 98 98 0
10-OCT-09 country3 10 10 0
10-OCT-09 country4 25 24 1
10-OCT-09 country5 102 101 1
SQL> exec :report_week := '10/3/2009'
PL/SQL procedure successfully completed.
SQL> /
REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
03-OCT-09 country1 85 81 4
03-OCT-09 country2 98 97 1
03-OCT-09 country3 10 12 -2
03-OCT-09 country4 24 26 -2
03-OCT-09 country5 101 101 0
SQL> SY. -
Get 15 mins back time from current time (pls help writing query)
Dear all,
I need to write a query that gives time 15 mins before the current time.
I need to calculate hits on a website for last 15 mins.
Kindly help writing this query.
Regards, Imranselect sysdate - 15/(60*24)
from dual;
Regards
Asif Kabir -
Writing query to Oracle DB with DATE field in it.
When I try to execute the following query on Oracle DB I get an exception. I know that the problem is with Date representation on the query string. Please, if anyone knows how to make it work help me.
query = "INSERT INTO MYTABLE (NAME , BIRTHDAY ) VALUES ('" + person.getName() +" ' , " + person.getBirthday() + " )";
statment.executeUpdate(query);
getBirthday() returns java.sql.Date object.
Please, please, help to work it out!Thank you, very much.
I've put the record into DB!!!! Hurray!
But now I have another problem. I've got a ResultSet & I'd like to extract the DATE from it. But how?
The Exception text states that the name of the field (Birthday) is incorrect.
My code:
Date birthday = resultSet.getDate("Birthday");
All other fields are perfectly well extracted, but they are Strings. -
Hi All,
I have following query to execute at every 20 seconds interval for one day.
si.pos_txn_date between to_date('01-DEC-2011 21:20:01','DD-MON-YYYY HH24:MI:SS')
and to_date('01-DEC-2011 21:40:00','DD-MON-YYYY HH24:MI:SS')
This parameter i want to increment by every 20 sec like if i have executed once for above then at net time it must take above condition as
si.pos_txn_date between to_date('01-DEC-2011 21:40:01','DD-MON-YYYY HH24:MI:SS')
and to_date('01-DEC-2011 22:00:00','DD-MON-YYYY HH24:MI:SS')
How should i do that?
query is as follows
insert into temp_lyris_02dec
with base as(
SELECT
ea.third_party_order_ref ,
DECODE(ea.title,'MR','M','MR.','M','MISS','F','MRS','F','MRS.','F','MS.','F','Unknown') AS male_female,
ea.email_address,
ea.first_name || ' ' || ea.surname AS fname_sname,
ea.title,
ea.first_name,
ea.surname,
hpk_lookup.hsf_get_hoflin@nrstp(si.rp_rp_id) AS hoflin,
si.rp_rp_id RP_ID,
wcs.wc1_descr AS level1,
wcs.wc2_descr AS level2,
wcs.wc3_descr AS level3,
wcs.wc4_descr AS level4,
wcs.wc5_descr AS level5,
rpcv.descr AS brand,
wp.short_brief,
si.sales_item_val,
si.txn_val,
TO_CHAR(si.pos_txn_date, 'DD-MON-YYYY HH24:MI:SS') AS order_date,
ea.billing_address1,
ea.billing_address2,
ea.billing_address3,
ea.billing_postcode,
ea.billing_country,
si.recogn_card_no,
ilv.first_order_date,
CASE
WHEN ef.numrecs > 0 THEN
'Y'
ELSE
'N'
END cardholder_flag
FROM dwt_sales_items si
INNER JOIN dw_retl_prd_cat_val_us rpcvu ON si.rp_rp_id =
rpcvu.rp_rp_id
AND si.sales_audit_date BETWEEN
rpcvu.dw_eftv_from AND
NVL(rpcvu.dw_eftv_to,
si.sales_audit_date)
INNER JOIN dw_retl_prd_cat_vals rpcv ON rpcvu.pc_pc_id = rpcv.pc_pc_id
AND rpcvu.pcv_pcv_id = rpcv.pcv_id
AND si.sales_audit_date BETWEEN
rpcv.dw_eftv_from AND
NVL(rpcv.dw_eftv_to,
si.sales_audit_date)
INNER JOIN web_prds@nrstp wp ON si.rp_rp_id = wp.rp_rp_id
LEFT JOIN dss.dwt_om_email_addresses ea ON si.loc_loc_id = ea.loc_loc_id
AND si.till_no = ea.till_no
AND TRUNC(si.pos_txn_date) =
ea.transaction_date
AND si.sales_audit_txn_no =
ea.sales_audit_txn_no
--INNER JOIN web_sales@nrstp ws
--ON ea.third_party_order_ref = ws.dmw_order
INNER JOIN web_cats@nrstp wc ON REPLACE(retail.hsf_wc_highest_level@nrstp(si.rp_rp_id,
TRUNC(si.pos_txn_date)),
'S',
'') = wc.wc_id
INNER JOIN wcs@nrstp wcs ON wc.art_wc_id = wcs.wc_art_wc_id
LEFT OUTER JOIN (SELECT dt.loc_loc_id,
dt.till_no,
dt.sales_audit_date,
dt.sales_audit_txn_no,
COUNT(*) numrecs
FROM dwt_tenders dt
WHERE dt.sales_audit_date = '02-DEC-2011' --''14-JUL-2011''
AND dt.seme_seme_id IN
('06', '16', '70', '71', '78', '79', '80', '81', '86', '87','84')
GROUP BY dt.loc_loc_id,
dt.till_no,
dt.sales_audit_date,
dt.sales_audit_txn_no) ef ON ef.loc_loc_id =
ea.loc_loc_id
AND ef.till_no =
ea.till_no
AND ef.sales_audit_date =
trunc(ea.transaction_date)
AND ef.sales_audit_txn_no =
ea.sales_audit_txn_no
-- INNER JOIN (SELECT third_party_customer_ref,
LEFT OUTER JOIN (SELECT third_party_customer_ref,
MIN(transaction_date) AS first_order_date
FROM dss.dwt_om_email_addresses
GROUP BY third_party_customer_ref) ilv ON ea.third_party_customer_ref =
ilv.third_party_customer_ref
WHERE si.sales_audit_date = '02-DEC-2011' --'14-JUL-2011'
AND si.loc_loc_id = '1097'
AND rpcvu.pc_pc_id = 'BRAND'
AND si.qual_cd = '10'
AND si.sales_item_val >= 0
and si.pos_txn_date between to_date('01-DEC-2011 21:20:01','DD-MON-YYYY HH24:MI:SS')
and to_date('01-DEC-2011 21:40:00','DD-MON-YYYY HH24:MI:SS')
AND NVL(si.rsn_rsn_class, 'X') <> 'RETURNS'),
cards as
(select oea.third_party_order_ref,
si.rp_rp_id,
si.recogn_card_no,
si.loc_loc_id,
si.till_no,
si.sales_audit_date,
si.sales_audit_txn_no,
case
when bn.account_type in ('RFC','STR','STI') then
'Y'
else
'N'
end REC_AC_FLAG,
case
when bn.account_type in ('CDT','CDI') then
'Y'
else
'N'
end REC_MC_FLAG,
case
when bn.account_type in ('LTY','LYI') then
'Y'
else
'N'
end REC_REW_1_FLAG,
case
when bn.account_type in ('LTT') then
'Y'
else
'N'
end REC_REW_2_FLAG,
case
when bn.account_type in ('LTY','LYI') then
'Y'
else
'N'
end REC_REDEMPTION_FLAG
from dss.dwt_om_email_addresses oea, dwt_sales_items si,crm_bin_numbers@crmenq bn, base
where oea.loc_loc_id = si.loc_loc_id
and oea.till_no = si.till_no
and oea.transaction_date = trunc(si.pos_txn_date)
and oea.sales_audit_txn_no = si.sales_audit_txn_no
and si.sales_item_val > 0
and si.recogn_card_no is not null
and si.recogn_card_no like bn.bin_number||'%'
and si.sales_audit_date = '02-DEC-2011' --'14-JUL-2011'
and si.rp_rp_id = base.RP_ID
and oea.third_party_order_ref = base.third_party_order_ref),
tndr as
( select t.loc_loc_id,t.till_no,t.sales_audit_date,t.sales_audit_txn_no,
sum(t.txn_seme_val) - t.txn_val As sum_val
from dwt_tenders t
where t.sales_audit_date = '02-DEC-2011' --'14-JUL-2011'
group by t.loc_loc_id,t.till_no,t.sales_audit_date,t.sales_audit_txn_no, t.txn_val
-- Here the main select statement goes for with query
select base.third_party_order_ref,
base.male_female,base.email_address,base.fname_sname,base.title,base.first_name,
base.surname,base.hoflin,base.level1,base.level2,base.level3,base.level4,base.level5,
base.brand,base.short_brief,base.sales_item_val,base.txn_val,base.order_date,
base.billing_address1,base.billing_address2,base.billing_address3,base.billing_postcode,base.billing_country,
base.recogn_card_no,base.first_order_date,base.cardholder_flag,
case
when tndr.sum_val = 0 and cards.REC_AC_FLAG = 'Y' then
'Y'
else
'N'
end REC_AC_FLAG,
case
when tndr.sum_val = 0 and cards.REC_MC_FLAG = 'Y' then
'Y'
else
'N'
end REC_MC_FLAG,
case
when cards.REC_REW_1_FLAG = 'Y' then
'Y'
else
'N'
end REC_REW_1_FLAG,
case
when cards.REC_REW_2_FLAG = 'Y' then
'Y'
else
'N'
end REC_REW_2_FLAG,
case
when tndr.sum_val = 0 and
regexp_like(cards.recogn_card_no,
'^(6338070|6338071|6338072)[0-9]*$') then
'Y'
else
'N'
end GIFT_CARD_FLAG,
case
when tndr.sum_val = 0 and cards.REC_REDEMPTION_FLAG = 'Y' then
'Y'
else
'N'
end REC_REDEMPTION_FLAG,
dwsf_delv_method(base.third_party_order_ref) as Delivery_method,
dwsf_store_type(base.third_party_order_ref) as Stores,
dwsf_cust_id_mv(base.recogn_card_no) As Customer_id
from base left join cards on base.RP_ID = cards.rp_rp_id
and base.third_party_order_ref = cards.third_party_order_ref
left join tndr on tndr.loc_loc_id = cards.loc_loc_id
and tndr.till_no = cards.till_no
and tndr.sales_audit_date = cards.sales_audit_date
and tndr.sales_audit_txn_no = cards.sales_audit_txn_no;I don't see the difficulty.
declare
v_start date := to_date('01-DEC-2011 21:20:01','DD-MON-YYYY HH24:MI:SS');
v_end date := to_date('01-DEC-2011 21:40:00','DD-MON-YYYY HH24:MI:SS');
begin
while v_start_date < v_end_date
loop
<put your sql statement here>
v_start_date := v_start_date + (1*20)/24/60/60);
end loop;
end;PS. Your example seems to show 20 minute differences
if you want this then use this instead
v_start_date := v_start_date + (1*20)/24/60; -
Hello.
any one know how to write string/s on a frame?
what method do I need to use?
what class?
Thanks in advance ,
Gonenkriling
I have tried to go like you said , and the result is the same
still just that red background
here is my code
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.*;
public class DrawString extends JPanel {
protected void paintComponent(Graphics g)
super.paintComponent(g);
g.drawString("Hello World", 100, 100);
public static void main(String[] args)
JPanel mypanel=new JPanel();
mypanel.setBackground(Color.RED);
mypanel.repaint();
JFrame frame=new JFrame("My String ");
frame.getContentPane().add(mypanel);
frame.setPreferredSize(new Dimension(400 , 400));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}and camkicr
look here
http://java.sun.com/docs/books/tutorial/uiswing/painting/step2.html
I did like they did and it didnt work. -
Dear All,
How to write a Query in a SQ01. Please tell me the steps with an example.
Its very urgent.
Thanks & Regards,
Abhay.Hi,
Check this out.
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
Reward if helpful.
Regards,
Ramya -
APD - writing query result "rank calculation" to file or DSO
Hello,
I am trying to take a query result set where I am calculating a key figure as Rank and run it through an APD to write to a DSO.
This is a top 5 query for a dashboard. I keep getting an MDX failure on the query.
Any ideas?
My ultimate goal is to set up a process to take TopN query results and get them into a target that can be used in a Universe.
Thanks,
ChrisHi,
You want to store the data of query in to dso?Y
You can write a code in to routine for calulated key figure.
I also face the same problem but i solved using routine.
try this.
Regards,
Ganesh
Maybe you are looking for
-
Hi- I recently upgraded to DW CC and most everything else in the CC. I am only having this issue with DW on a Win 8, 64-bit system. PS, AI, InDesign and Premiere CC do not do this. When I want to open files, and I routinely want to open .cfm files,
-
Keeping access to Ubuntu after upgrading to Windows 8.1
Using Windows 7 Pro. I got a Windows 8.1 License with a setup .iso file. I want to setup (upgrade) Win 8.1, but before, I need to verify something. I have Ubuntu installed side by side with Win 7 (Win 7 installed first). The current boot (grub) is of
-
HTTP Button Submit not working in FireFox
I am using Adobe Life Cycle Designer to make a Form. I have a Problem that the HTTP Submit Button is not working in FireFox. It works with IE but not with FireFox. I have also checked this with Button Submit Control.Please Help me.
-
Calling XI's SOAP Adapter from Webdynpro for java
Hello every one, I have implemented a webservice scenario which involves soap message exchange,,I have checked the configuration from configuration tool -- it seems fine there -- than we had a check run from XML spy, using the WSDL generated by XI,,,
-
Reg -- enterprise manager component installation
Hi, I have oracle 10.2.0.3(hp-ux 11) software.which was upgraded from 9i. this software doesnot have enterprise manager component to get dbconsole. so if i try to install enterprise manager component to existing oracle software, is there a chance tha