Wrong with this request
Hi friends,When I try to run the following query
select user_name
from xx_user
where lower(user_name) in(
select substr(lower(supf.first_name),1,1)|| lower(supf.last_name)
from per_all_people_f papf,
per_all_assignments_f paaf,
per_all_people_f supf
where papf.business_group_id = 216
and papf.person_id = paaf.person_id
and NVL(paaf.supervisor_id, papf.person_id) = supf.person_id
and sysdate between papf.effective_start_date and papf.effective_end_date
and sysdate between paaf.effective_start_date and paaf.effective_end_date
and sysdate between supf.effective_start_date and supf.effective_end_date
and papf.person_type_id = 5145 and level >=1
start with substr(lower(papf.first_name),1,1)|| lower(papf.last_name) in (select substr(lower(papf.first_name),1,1)|| lower(papf.last_name)
from xx_history xx, per_all_people_f papf
where xx.emp_no=papf.person_id and xx.old_mrg_id <> xx.new_mgr_id)
connect by papf.person_id = prior paaf.supervisor_id
and level <=1
order by rownum desc)
Im getting error asORA-00907: lack the right parenthesisBut if I run this part of the single application, it works very well
select substr(lower(supf.first_name),1,1)|| lower(supf.last_name)
from per_all_people_f papf,
per_all_assignments_f paaf,
per_all_people_f supf
where papf.business_group_id = 216
and papf.person_id = paaf.person_id
and NVL(paaf.supervisor_id, papf.person_id) = supf.person_id
and sysdate between papf.effective_start_date and papf.effective_end_date
and sysdate between paaf.effective_start_date and paaf.effective_end_date
and sysdate between supf.effective_start_date and supf.effective_end_date
and papf.person_type_id = 5145 and level >=1
start with substr(lower(papf.first_name),1,1)|| lower(papf.last_name) in (select substr(lower(papf.first_name),1,1)|| lower(papf.last_name)
from xx_history xx, per_all_people_f papf
where xx.emp_no=papf.person_id and xx.old_mrg_id <> xx.new_mgr_id)
connect by papf.person_id = prior paaf.supervisor_id
and level <=1
order by rownum desc)
This query returns a correct in a rowtmcdermottguess if I run as the means below, it works
select user_name
from xx_user
where lower(user_name) in 'tmcdermott'
But I don't know why it doesn't work if I run as the way to above(top-most).What's wrong with him
Brgds,
Mini
Hello
Move the bracket, so last two lines become
AND LEVEL <= 1)
ORDER BY ROWNUM DESC
Concerning
Peter
Tags: Database
Similar Questions
-
Which is wrong with this query?
SELECT THE PRODUCT. PRODUCT_ID PRODUCT. PRODUCT_DESCRIPTION, PRODUCT. PR_CURRENT_YEAR_SALES_GOAL, (ORDER_QUANTITY * PRODUCT_PRICE) AS sales so far
ORDER, ORDER_LINE, PRODUCT, PRODUCT_LINE
WHERE TO ORDER. ORDER_NUMBER = ORDER_LINE. ORDER_NUMBER
AND THE PRODUCT. PRODUCT_ID = ORDERED_PRODUCT. PRODUCT_ID
AND THE PRODUCT. PRODUCT_ID = PRODUCT_LINE. PRODUCT_ID
AND THE PRODUCT. PRODUCT_LINE_NAME = 'Home Office ';
There is something wrong with this request, but I don't see what it is. Anyone know whats wrong with it and perhaps what would be the correct way to request program?There is another thing that I noticed:
You seem to have used a Table name: "ORDERED_PRODUCT. PRODUCT_ID' in your WHERE clause that is not in your FROM clause
See you soon-
-
Mr President.
What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.
--SL_CUSTOMERS table data INSERT INTO SL_CUSTOMERS VALUES(1,'Kamrul Hasan',NULL,NULL,'Moghbazar', 'Dhaka','0456789123',NULL,NULL,NULL,'Y',NULL); INSERT INTO SL_CUSTOMERS VALUES(2,'Rabiul Alam',NULL,NULL,'Motijheel', 'Dhaka','0567891234',NULL,NULL,NULL,'Y',NULL); INSERT INTO SL_CUSTOMERS VALUES(3,'Shahed Hasan',NULL,NULL,'2-G/1,2-2,Mirpur', 'Dhaka','0678912345',NULL,NULL,NULL,'Y',NULL);
CREATE SEQUENCE "ALIZA"."SL_CUSTOMERS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE ; CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS" FOR EACH ROW BEGIN IF :NEW.CUSTOMER_ID IS NULL OR :NEW.CUSTOMER_ID < 0 THEN SELECT SL_CUSTOMERS_SEQ.nextval INTO :NEW.CUSTOMER_ID FROM DUAL; END IF; END; /
When I try to insert several records with the seq.nextval it gives error
violation of primary key.
INSERT INTO "ALIZA"."SL_CUSTOMERS" (CUSTOMER_NAME) VALUES ('sdfsd') ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated ORA-06512: at line 1 One error saving changes to table "ALIZA"."SL_CUSTOMERS": Row 4: ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated ORA-06512: at line 1
Concerning
Mr President.
I find the solution by creating a function before the triiger
as below
CREATE SEQUENCE "ALIZA"."SL_CUSTOMERS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE ; CREATE OR REPLACE FUNCTION get_SL_CUSTOMERS_vId RETURN VARCHAR2 AS BEGIN RETURN SL_CUSTOMERS_SEQ.NEXTVAL; END; / CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS" FOR EACH ROW DECLARE dummy VARCHAR2(200); BEGIN dummy := get_SL_CUSTOMERS_vId(); :NEW.CUSTOMER_ID := dummy; END; /
It works very well
Thank you all for the suggestions.
Concerning
-
Hi, I've been a user of Club Photo Dollar. I accepted the proposal to continue with 10 dollars a month for 10 photos with this request: AD006115173PT, but still no response. Can help you pls?
Hi Luis
I understand that your initial order for the promotion of CPD Stock has failed and you are looking for re - order.
I'm looking into that for you and will let you know when we have a solution.
Kind regards
Bev
-
Can someone help with this request please
I have a table something like below
Things_t
Characteristic of things float value
Element 1 red color
1 packaging
Point 2 square shape
Point 2 brand Spunk
Now I want to reterive an element with any of its tank as Null values. Using the query 'select distinct things from things_t, where there is no char value' fetch element 1 also with point 2. I want to retrieve a record of the thing for which none of the tank, the values are Null as point 2. Can you please help me with this request.Try this:
WITH t AS (SELECT 1 item_id, 17436 chr_id, 14225034 chr_val_id FROM dual UNION SELECT 1 item_id, 39 chr_id, 14276173 chr_val_id FROM dual UNION SELECT 1 item_id, 17774 chr_id, NULL chr_val_id FROM dual UNION SELECT 1 item_id, 265 chr_id, 20502978 chr_val_id FROM dual UNION SELECT 1 item_id, 16978 chr_id, 797233 chr_val_id FROM dual UNION SELECT 1 item_id, 13092 chr_id, 5666917 chr_val_id FROM dual UNION SELECT 1 item_id, 15228 chr_id, 1209758 chr_val_id FROM dual UNION SELECT 2 item_id, 112 chr_id, 12705342 chr_val_id FROM dual UNION SELECT 2 item_id, 6945 chr_id, NULL chr_val_id FROM dual UNION SELECT 2 item_id, 70 chr_id, 12597376 chr_val_id FROM dual UNION SELECT 2 item_id, 16832 chr_id, NULL chr_val_id FROM dual UNION SELECT 2 item_id, 7886 chr_id, 9588619 chr_val_id FROM dual UNION SELECT 2 item_id, 6986 chr_id, 2659351 chr_val_id FROM dual UNION SELECT 3 item_id, 9531 chr_id, 8910943 chr_val_id FROM dual UNION SELECT 3 item_id, 9798 chr_id, 8717531 chr_val_id FROM dual UNION SELECT 3 item_id, 17446 chr_id, 12266441 chr_val_id FROM dual UNION SELECT 3 item_id, 4830 chr_id, 13683090 chr_val_id FROM dual UNION SELECT 3 item_id, 9518 chr_id, 834772 chr_val_id FROM dual UNION SELECT 3 item_id, 11031 chr_id, 20233753 chr_val_id FROM dual UNION SELECT 3 item_id, 12564 chr_id, 2282478 chr_val_id FROM dual) SELECT DISTINCT item_id FROM t MINUS SELECT DISTINCT item_id FROM t WHERE chr_val_id IS NULL
Or this:
SELECT item_id FROM (SELECT item_id, MIN(NVL(chr_val_id, -1)) min_chr_val_id FROM t GROUP BY item_id) WHERE min_chr_val_id != -1
Published by: lee200 on October 15, 2012 09:22
-
What wrong with this sql?
What wrong with my sql? When I try to run a plain explain command against it. I get it that perfectly well... If the syntax was wrong, I won't get the plan to explain it, then why am I getting an error number invalid? What is the data? I'm on 10.2.0.3
Published by: S2K on August 18, 2009 10:21Check out this site that has a lot of regular expressions submitted by users: [Library of regular expressions | http://regexlib.com/DisplayPatterns.aspx?cattabindex=2&categoryId=3]
Then you should do something like you posted:
WHERE REGEXP_LIKE(RSLT_QTY,
) -
Hi all
I try to read two different audio files with the following code piece. individually, they play well. When I try to play at the same time which is at the same time, it is give IllegalStateException and does not play any audio file.
When I play them separately, they play well. My requirement is to play 1 file as background music and another as foreground.
Audio playback code.
public class Audio implements Runnable//extends Thread { private Class clazz; private InputStream is; public Player player; private String audiofile; private int fileType; private int mode; public Audio(String path, int type, int mode) { audiofile = path; fileType = type; this.mode = mode; } public void run() { //this sample demonstrates playing an MP3 file that has been //added as a resource to the project try { //retrieve the MP3 file clazz = getClass(); //create an instance of the player from the InputStream is = clazz.getResourceAsStream(audiofile); // 1-- mpeg, 2-- wav audio files if(fileType == 1) player = javax.microedition.media.Manager.createPlayer(is, "audio/mpeg"); else if(fileType ==2) player = javax.microedition.media.Manager.createPlayer(is, "audio/x-wav"); player.setLoopCount(mode); player.realize(); player.prefetch(); player.start(); } catch (Exception ex) { UiApplication.getUiApplication().pushScreen(new CloseScreen("Hello")); } } }
// if call this, commenting section2 it works well //section1 Audio at = new Audio("/neon1.wav",2, -1); Thread at1 = new Thread(at); at1.start(); // if call this, commenting section1 it works well //section2 Audio at3 = new Audio("/neon1.wav",2, -1); Thread at2 = new Thread(at3); at2.start(); // when i uncomment both section1 and section2 and execute it is not playing giving an exception IllegalStateException.
all aid should be of great use.
Thank you and best regards,
PraveenG
On the storm, it is not possible to play 2 sounds loaded from a file at a time. If you try this, the first sound stops and the second sound will be played.
You can, however, load and play a sound (background music) and play other sounds (sound effects) by using Alert.startAudio (). The first noise not would be cut. The only problem with this is that the Alert.startAudio sounds are not the best.
-
What am I doing wrong with this idea of menu?
Hi team,
I am trying to build a menu but have two problems, as you can see on the vid when I press one of my button fly, closing at all (which could be authorized)
Quen worst is that even if I have the names of instance for all the steps and the target tool allows you to find the path to these buttons, I can't access it from the main timeline.
Here's the code...
import flash.events.MouseEvent;
import flash.display.MovieClip;
GSmain.gsshape.gss1.gssr1.addEventListener (MouseEvent.CLICK, page2go);
function page2go(e:MouseEvent) {}
gotoAndStop (2);
}
and the error...
TypeError: Error #1009: cannot access a property or method of a null object reference.
to aavar / frame1 () [aavar::frame1:4]
aavar is the document class associated with this file
If
GSmain.gsshape.gss1.gssr1.addEventListener (MouseEvent.CLICK, page2go);
is frame 1/4, GSmain.gsshape.gss1.gssr1 does not exist when this code runs.
you have also nested named functions which is always problematic:
function whatever() {}
function whatevernested() {}
}
}
should be
function whatever() {}
}
function nolongernested() {}
}
-
Something wrong with this JOIN?
DB version: 11.2
I'm trying to join the tables TBS_FILE_INFO and FREE_SPACE_INFO below.
Info on the data stored in these 2 tables:
==========================================
TBS_FILE_INFO is a kind of a master table that stores information about each file and its size in a tablespace. Almost all 30 GB in size.
Each file consists of several extensions. FREE_SPACE_INFO table stores information about the free space left in extensions in a file.
My requirement is simple. I just need that information returned by 2 queries below (but a query).
SQL > select sum (SIZEGB) TotalAllocatedGB from tbs_file_info where nom_tablespace = 'SIEBEL_TABLES ';
TOTALALLOCATEDGB
----------------
450
SQL > select sum (FREEGB) free_gb from free_space_info where nom_tablespace = 'SIEBEL_TABLES ';
FREE_GB
----------
206.999329
To get this data in a single request, I associate myself with these 2 tables using the FILE_ID column.
Output is shown below.
The FREE_GB info is correct, but the value of TotalAllocatedGB 10170 (indicated in red below) is not correct . It should be 450 GB as shown above. No idea why?
Select
TFI.tablespace_name,
Sum (SIZEGB) TotalAllocatedGB,
the sum of Free_GB (FREEGB)
from tbs_file_info INNER JOIN free_space_info ISP tfi
on (tfi.file_id = fsi.file_id)
where tfi.tablespace_name = 'SIEBEL_TABLES. '
and tfi.tablespace_name = fsi.tablespace_name - it's condition AND no difference
Tfi.tablespace_name group;
NOM_TABLESPACE TOTALALLOCATEDGB FREE_GB
------------------------------ ---------------- ----------
10170 206.999329 SIEBEL_TABLES
-Here is the data
-What is there all I could attach .sql files to this post? I couldn't fix the photo option and video
SQL > select * from tbs_file_info;
FILE_ID SIZEGB NOM_TABLESPACE
------------------------------ ---------- ----------
18 30 SBL_S_ORDER_ITEM_IDX
53 5 SBL_S_ORDER_ITEM_IDX
52 30 SBL_S_ORDER_ITEM_IDX
63 30 SIEBEL_TABLES
64 30 SIEBEL_TABLES
74 30 SIEBEL_TABLES
66 30 SIEBEL_TABLES
67 30 SIEBEL_TABLES
68 30 SIEBEL_TABLES
SIEBEL_TABLES 69 30
SIEBEL_TABLES 70 30
71 30 SIEBEL_TABLES
72 30 SIEBEL_TABLES
73 30 SIEBEL_TABLES
62 30 SIEBEL_TABLES
61 30 SIEBEL_TABLES
7 30 SIEBEL_TABLES
SIEBEL_TABLES 65 30
18 selected lines.
SQL > select * from free_space_info;
FILE_ID EXTENT_ID FREEGB NUM_OF_BLOCKS NOM_TABLESPACE
------------------------------ ---------- ---------- ---------- -------------
18 2031744 SBL_S_ORDER_ITEM_IDX 3.875 507904
18 1523840 SBL_S_ORDER_ITEM_IDX 3.875 507904
18 1015936 SBL_S_ORDER_ITEM_IDX 3.875 507904
18 508032 SBL_S_ORDER_ITEM_IDX 3.875 507904
18 333312 1.33300781 SBL_S_ORDER_ITEM_IDX 174720
18 3047552 SBL_S_ORDER_ITEM_IDX 3.875 507904
18 2539648 SBL_S_ORDER_ITEM_IDX 3.875 507904
18 3555456 2.87402344 SBL_S_ORDER_ITEM_IDX 376704
52 3555456 2.87402344 SBL_S_ORDER_ITEM_IDX 376704
52 3047552 SBL_S_ORDER_ITEM_IDX 3.875 507904
52 2031744 SBL_S_ORDER_ITEM_IDX 3.875 507904
52 1523840 SBL_S_ORDER_ITEM_IDX 3.875 507904
52 1015936 SBL_S_ORDER_ITEM_IDX 3.875 507904
52 508032 SBL_S_ORDER_ITEM_IDX 3.875 507904
52 333824 1.32910156 SBL_S_ORDER_ITEM_IDX 174208
52 326528 128.000976563 SBL_S_ORDER_ITEM_IDX
52 248184 8.000061035 SBL_S_ORDER_ITEM_IDX
52 2539648 SBL_S_ORDER_ITEM_IDX 3.875 507904
53 12800 3.77832031 SBL_S_ORDER_ITEM_IDX 495232
53 508032 1.12402344 SBL_S_ORDER_ITEM_IDX 147328
SIEBEL_TABLES 7 1542144.00390625 512
SIEBEL_TABLES 7 2246528.000976563 128
SIEBEL_TABLES 7 2247680.03515625 4608
SIEBEL_TABLES 7 2586112.0625 8192
SIEBEL_TABLES 7 2703872.0625 8192
SIEBEL_TABLES 7 2824192.0625 8192
SIEBEL_TABLES 7 581504.000976563 128
SIEBEL_TABLES 7 1070720.002929688 384
SIEBEL_TABLES 61 2806272.0625 8192
61 571776 128.000976563 SIEBEL_TABLES
SIEBEL_TABLES 61 2692608.0625 8192
SIEBEL_TABLES 61 2576000.061523438 8064
SIEBEL_TABLES 61 1062272.000976563 128
62 538752 384.002929688 SIEBEL_TABLES
62 1395968 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 62 1756032.000976563 128
62 2090624 384.002929688 SIEBEL_TABLES
SIEBEL_TABLES 62 2554880.02734375 3584
SIEBEL_TABLES 62 2788352.0625 8192
SIEBEL_TABLES 62 2667008.0625 8192
SIEBEL_TABLES 63 642176.002929688 384
63 2541312 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 63 2543616.04296875 5632
SIEBEL_TABLES 63 2657792.0625 8192
SIEBEL_TABLES 63 2771968.0625 8192
SIEBEL_TABLES 64 2644608.030273438 3968
64 2302208 256.001953125 SIEBEL_TABLES
64 1965952 128.000976563 SIEBEL_TABLES
64 1108864 128.000976563 SIEBEL_TABLES
64 619904 128.000976563 SIEBEL_TABLES
SIEBEL_TABLES 64 2759680.0625 8192
65 3811456 384.002929688 SIEBEL_TABLES
SIEBEL_TABLES 65 3812736.000976563 128
SIEBEL_TABLES 65 3813248.000976563 128
65 3813760 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 65 3814656.000976563 128
SIEBEL_TABLES 65 3814912.000976563 128
SIEBEL_TABLES 65 3815680.000976563 128
SIEBEL_TABLES 65 3815936.000976563 128
65 3816704 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 65 3826432.000976563 128
SIEBEL_TABLES 65 3827328.000976563 128
SIEBEL_TABLES 65 3827968.000976563 128
SIEBEL_TABLES 65 3828352.000976563 128
65 3876992 384.002929688 SIEBEL_TABLES
SIEBEL_TABLES 65 3926528.04296875 5632
65 3810432 384.002929688 SIEBEL_TABLES
SIEBEL_TABLES 65 3801472.000976563 128
SIEBEL_TABLES 65 3801216.000976563 128
65 3792640 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 65 3792384.000976563 128
SIEBEL_TABLES 65 3792000.000976563 128
SIEBEL_TABLES 65 3791616.000976563 128
65 3791232 256.001953125 SIEBEL_TABLES
65 3790592 256.001953125 SIEBEL_TABLES
65 3789952 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 65 3788416.000976563 128
SIEBEL_TABLES 65 3788032.000976563 128
SIEBEL_TABLES 65 3787520.000976563 128
SIEBEL_TABLES 65 3787264.000976563 128
SIEBEL_TABLES 65 3302912.0078125 1024
SIEBEL_TABLES 65 3295744.0078125 1024
SIEBEL_TABLES 65 3279360.0078125 1024
SIEBEL_TABLES 65 3266048.0078125 1024
SIEBEL_TABLES 65 3257856.0078125 1024
SIEBEL_TABLES 65 3216896.0078125 1024
65 3192832 512.00390625 SIEBEL_TABLES
65 3042944 384.002929688 SIEBEL_TABLES
SIEBEL_TABLES 65 128.002929688 384
65 667264 384.002929688 SIEBEL_TABLES
SIEBEL_TABLES 66 61952.00390625 512
66 65536 512.00390625 SIEBEL_TABLES
66 78336 512.00390625 SIEBEL_TABLES
66 80896 512.00390625 SIEBEL_TABLES
66 92672 512.00390625 SIEBEL_TABLES
66 96256 512.00390625 SIEBEL_TABLES
66 98816 512.00390625 SIEBEL_TABLES
SIEBEL_TABLES 66 102400.000976563 128
SIEBEL_TABLES 66 109056.0078125 1024
66 132608 1024.0078125 SIEBEL_TABLES
66 164352 1024.0078125 SIEBEL_TABLES
SIEBEL_TABLES 66 180736.0078125 1024
66 187904 1024.0078125 SIEBEL_TABLES
SIEBEL_TABLES 66 204288.0078125 1024
SIEBEL_TABLES 66 218624.0078125 1024
66 224768 1024.0078125 SIEBEL_TABLES
SIEBEL_TABLES 66 264704.0078125 1024
SIEBEL_TABLES 66 271360.0078125 1024
SIEBEL_TABLES 66 293888.0078125 1024
66 296192 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 66 300544.0078125 1024
66 305664 512.00390625 SIEBEL_TABLES
SIEBEL_TABLES 66 307200.01171875 1536
66 312832 1536.01171875 SIEBEL_TABLES
66 315392 512.00390625 SIEBEL_TABLES
66 327168 512.00390625 SIEBEL_TABLES
SIEBEL_TABLES 66 360448.0078125 1024
SIEBEL_TABLES 66 361728.000976563 128
SIEBEL_TABLES 66 365056.000976563 128
SIEBEL_TABLES 66 365312.000976563 128
SIEBEL_TABLES 66 366592.000976563 128
SIEBEL_TABLES 66 366848.000976563 128
SIEBEL_TABLES 66 367104.000976563 128
SIEBEL_TABLES 66 367360.000976563 128
SIEBEL_TABLES 66 369664.008789063 1152
SIEBEL_TABLES 66 370944.000976563 128
SIEBEL_TABLES 66 373248.0078125 1024
66 377344 1024.0078125 SIEBEL_TABLES
66 380928 1024.0078125 SIEBEL_TABLES
SIEBEL_TABLES 66 384512.0078125 1024
SIEBEL_TABLES 66 396288.0078125 1024
SIEBEL_TABLES 66 408064.0078125 1024
SIEBEL_TABLES 66 411136.0078125 1024
SIEBEL_TABLES 66 415744.0078125 1024
SIEBEL_TABLES 66 418304.0078125 1024
SIEBEL_TABLES 66 423424.0078125 1024
SIEBEL_TABLES 66 452096.0078125 1024
SIEBEL_TABLES 66 463360.0078125 1024
SIEBEL_TABLES 66 476672.0078125 1024
SIEBEL_TABLES 66 478208.0078125 1024
66 484352 2048.015625 SIEBEL_TABLES
66 491520 2048.015625 SIEBEL_TABLES
66 500736 2048.015625 SIEBEL_TABLES
66 527872 2048.015625 SIEBEL_TABLES
SIEBEL_TABLES 66 543744.0078125 1024
SIEBEL_TABLES 66 545792.0078125 1024
66 569344 2048.015625 SIEBEL_TABLES
66 576512 2048.015625 SIEBEL_TABLES
SIEBEL_TABLES 66 600064.0078125 1024
SIEBEL_TABLES 66 603136.0078125 1024
SIEBEL_TABLES 66 609280.0078125 1024
SIEBEL_TABLES 66 616448.0078125 1024
SIEBEL_TABLES 66 623616.0078125 1024
SIEBEL_TABLES 66 671232.0078125 1024
SIEBEL_TABLES 66 680448.0078125 1024
SIEBEL_TABLES 66 689664.0078125 1024
66 705024 1024.0078125 SIEBEL_TABLES
SIEBEL_TABLES 66 720896.0078125 1024
SIEBEL_TABLES 66 728064.0078125 1024
66 742400 1024.0078125 SIEBEL_TABLES
SIEBEL_TABLES 66 775168.0078125 1024
SIEBEL_TABLES 66 791552.0078125 1024
SIEBEL_TABLES 66 1262976.000976563 128
SIEBEL_TABLES 66 1263360.000976563 128
SIEBEL_TABLES 66 1263872.000976563 128
SIEBEL_TABLES 66 1264384.000976563 128
SIEBEL_TABLES 66 1264640.000976563 128
SIEBEL_TABLES 66 1264896.000976563 128
SIEBEL_TABLES 66 1265536.000976563 128
SIEBEL_TABLES 66 1266176.000976563 128
SIEBEL_TABLES 66 1266560.000976563 128
SIEBEL_TABLES 66 1266816.000976563 128
66 1267072 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 66 1267968.000976563 128
66 1277312 128.000976563 SIEBEL_TABLES
66 1278336 256.001953125 SIEBEL_TABLES
66 1278720 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 66 1279488.000976563 128
SIEBEL_TABLES 66 1279744.000976563 128
SIEBEL_TABLES 66 1280384.000976563 128
66 1280640 128.000976563 SIEBEL_TABLES
SIEBEL_TABLES 66 1281024.000976563 128
SIEBEL_TABLES 66 1281664.000976563 128
66 1282304 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 66 1282944.000976563 128
SIEBEL_TABLES 66 1283200.000976563 128
SIEBEL_TABLES 66 1283584.000976563 128
SIEBEL_TABLES 66 1284480.000976563 128
SIEBEL_TABLES 66 1285120.000976563 128
SIEBEL_TABLES 66 1285376.000976563 128
SIEBEL_TABLES 66 1285760.000976563 128
66 1376512 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 66 1523840.002929688 384
SIEBEL_TABLES 66 2031744.002929688 384
66 2808320 1.82519531 SIEBEL_TABLES 239232
66 3047552 SIEBEL_TABLES 3.875 507904
66 3555456 2.87402344 SIEBEL_TABLES 376704
SIEBEL_TABLES 66 2711376.000061035 8
SIEBEL_TABLES 66 2711384.000061035 8
SIEBEL_TABLES 66 2711352.000061035 8
SIEBEL_TABLES 66 2711360.000061035 8
SIEBEL_TABLES 66 2711368.000061035 8
SIEBEL_TABLES 66 2711328.000061035 8
SIEBEL_TABLES 66 2711336.000061035 8
SIEBEL_TABLES 66 2711344.000061035 8
SIEBEL_TABLES 66 2711320.000061035 8
67 89472 128.000976563 SIEBEL_TABLES
67 91008 128.000976563 SIEBEL_TABLES
67 91392 128.000976563 SIEBEL_TABLES
67 91776 128.000976563 SIEBEL_TABLES
67 93056 128.000976563 SIEBEL_TABLES
67 93312 128.000976563 SIEBEL_TABLES
67 93696 128.000976563 SIEBEL_TABLES
67 93952 256.001953125 SIEBEL_TABLES
67 94464 128.000976563 SIEBEL_TABLES
67 94720 128.000976563 SIEBEL_TABLES
67 95104 128.000976563 SIEBEL_TABLES
SIEBEL_TABLES 67 95360.000976563 128
67 95616 128.000976563 SIEBEL_TABLES
67 95872 128.000976563 SIEBEL_TABLES
67 96640 128.000976563 SIEBEL_TABLES
67 97408 384.002929688 SIEBEL_TABLES
67 98304 128.000976563 SIEBEL_TABLES
67 98560 256.001953125 SIEBEL_TABLES
67 99456 384.002929688 SIEBEL_TABLES
67 100096 128.000976563 SIEBEL_TABLES
67 101376 128.000976563 SIEBEL_TABLES
67 101760 128.000976563 SIEBEL_TABLES
67 102528 256.001953125 SIEBEL_TABLES
67 103168 128.000976563 SIEBEL_TABLES
67 103552 128.000976563 SIEBEL_TABLES
67 104192 128.000976563 SIEBEL_TABLES
67 104960 128.000976563 SIEBEL_TABLES
67 105984 128.000976563 SIEBEL_TABLES
67 106752 128.000976563 SIEBEL_TABLES
67 248192 128.000976563 SIEBEL_TABLES
67 508032 384.002929688 SIEBEL_TABLES
67 1015936 384.002929688 SIEBEL_TABLES
67 1632640 3.04492188 SIEBEL_TABLES 399104
67 2031744 SIEBEL_TABLES 3.875 507904
67 2539648 SIEBEL_TABLES 3.875 507904
67 3047552 SIEBEL_TABLES 3.875 507904
67 3555456 2.87402344 SIEBEL_TABLES 376704
67 1537936 8.000061035 SIEBEL_TABLES
67 1537792 8.000061035 SIEBEL_TABLES
67 1537800 8.000061035 SIEBEL_TABLES
67 1537920 8.000061035 SIEBEL_TABLES
67 1537928 8.000061035 SIEBEL_TABLES
67 1537680 8.000061035 SIEBEL_TABLES
67 1537688 8.000061035 SIEBEL_TABLES
67 1537696 8.000061035 SIEBEL_TABLES
67 1537176 8.000061035 SIEBEL_TABLES
67 1537664 8.000061035 SIEBEL_TABLES
67 1537672 8.000061035 SIEBEL_TABLES
67 1523840 128.000976563 SIEBEL_TABLES
67 1537168 8.000061035 SIEBEL_TABLES
SIEBEL_TABLES 68 128.002929688 384
SIEBEL_TABLES 68 508032.002929688 384
68 1176992 2.64624023 SIEBEL_TABLES 346848
68 1523840 SIEBEL_TABLES 3.875 507904
68 2031744 SIEBEL_TABLES 3.875 507904
68 2539648 SIEBEL_TABLES 3.875 507904
68 3047552 SIEBEL_TABLES 3.875 507904
68 3555456 2.87402344 SIEBEL_TABLES 376704
SIEBEL_TABLES 68 1016064.000976563 128
SIEBEL_TABLES 69 128.002929688 384
69 849408 1.27050781 SIEBEL_TABLES 166528
69 1015936 SIEBEL_TABLES 3.875 507904
69 1523840 SIEBEL_TABLES 3.875 507904
69 2031744 SIEBEL_TABLES 3.875 507904
69 2539648 SIEBEL_TABLES 3.875 507904
69 3047552 SIEBEL_TABLES 3.875 507904
69 3555456 2.87402344 SIEBEL_TABLES 376704
69 508160 128.000976563 SIEBEL_TABLES
SIEBEL_TABLES 70 128.002929688 384
70 607232 3.11816406 SIEBEL_TABLES 408704
70 1015936 SIEBEL_TABLES 3.875 507904
70 1523840 SIEBEL_TABLES 3.875 507904
70 2031744 SIEBEL_TABLES 3.875 507904
70 2539648 SIEBEL_TABLES 3.875 507904
70 3047552 SIEBEL_TABLES 3.875 507904
70 3555456 2.87402344 SIEBEL_TABLES 376704
SIEBEL_TABLES 70 530056.000061035 8
70 530064 8.000061035 SIEBEL_TABLES
SIEBEL_TABLES 70 529824.000061035 8
SIEBEL_TABLES 70 530048.000061035 8
SIEBEL_TABLES 70 508032.000976563 128
71 435456 256.001953125 SIEBEL_TABLES
SIEBEL_TABLES 71 436736.543945313 71296
71 508032 SIEBEL_TABLES 3.875 507904
71 1015936 SIEBEL_TABLES 3.875 507904
71 1523840 SIEBEL_TABLES 3.875 507904
71 2031744 SIEBEL_TABLES 3.875 507904
71 2539648 SIEBEL_TABLES 3.875 507904
71 3047552 SIEBEL_TABLES 3.875 507904
71 3555456 2.87402344 SIEBEL_TABLES 376704
SIEBEL_TABLES 71 128.000976563 128
SIEBEL_TABLES 71 363896.000061035 8
72 373376 1.02734375 SIEBEL_TABLES 134656
508032 72 SIEBEL_TABLES 3.875 507904
1015936 72 SIEBEL_TABLES 3.875 507904
1523840 72 SIEBEL_TABLES 3.875 507904
2031744 72 SIEBEL_TABLES 3.875 507904
2539648 72 SIEBEL_TABLES 3.875 507904
3047552 72 SIEBEL_TABLES 3.875 507904
72 3555456 2.87402344 SIEBEL_TABLES 376704
72 259872 8.000061035 SIEBEL_TABLES
72 259880 8.000061035 SIEBEL_TABLES
72 259888 8.000061035 SIEBEL_TABLES
SIEBEL_TABLES 72 384.000976563 128
72 259856 8.000061035 SIEBEL_TABLES
72 259864 8.000061035 SIEBEL_TABLES
SIEBEL_TABLES 72 256.000976563 128
72 259840 8.000061035 SIEBEL_TABLES
72 259848 8.000061035 SIEBEL_TABLES
SIEBEL_TABLES 72 128.000976563 128
72 259616 8.000061035 SIEBEL_TABLES
73 315776 128.000976563 SIEBEL_TABLES
73 316928 1.45800781 SIEBEL_TABLES 191104
73 508032 SIEBEL_TABLES 3.875 507904
73 1015936 SIEBEL_TABLES 3.875 507904
73 1523840 SIEBEL_TABLES 3.875 507904
73 2031744 SIEBEL_TABLES 3.875 507904
73 2539648 SIEBEL_TABLES 3.875 507904
73 3047552 SIEBEL_TABLES 3.875 507904
73 3555456 2.87402344 SIEBEL_TABLES 376704
73 195512 8.000061035 SIEBEL_TABLES
73 195488 8.000061035 SIEBEL_TABLES
73 195496 8.000061035 SIEBEL_TABLES
73 195504 8.000061035 SIEBEL_TABLES
SIEBEL_TABLES 73 128.000976563 128
73 195464 8.000061035 SIEBEL_TABLES
73 195472 8.000061035 SIEBEL_TABLES
73 195480 8.000061035 SIEBEL_TABLES
73 195248 8.000061035 SIEBEL_TABLES
73 195256 8.000061035 SIEBEL_TABLES
73 195456 8.000061035 SIEBEL_TABLES
73 195240 8.000061035 SIEBEL_TABLES
74 258304 256.001953125 SIEBEL_TABLES
74 267776 1.83300781 SIEBEL_TABLES 240256
74 508032 SIEBEL_TABLES 3.875 507904
74 1015936 SIEBEL_TABLES 3.875 507904
74 1523840 SIEBEL_TABLES 3.875 507904
74 2031744 SIEBEL_TABLES 3.875 507904
74 2539648 SIEBEL_TABLES 3.875 507904
74 3047552 SIEBEL_TABLES 3.875 507904
74 3555456 2.87402344 SIEBEL_TABLES 376704
74 131344 8.000061035 SIEBEL_TABLES
74 130536 8.000061035 SIEBEL_TABLES
74 130544 8.000061035 SIEBEL_TABLES
74 131328 8.000061035 SIEBEL_TABLES
74 131336 8.000061035 SIEBEL_TABLES
74 130512 8.000061035 SIEBEL_TABLES
74 130520 8.000061035 SIEBEL_TABLES
74 130528 8.000061035 SIEBEL_TABLES
74 130488 8.000061035 SIEBEL_TABLES
74 130496 8.000061035 SIEBEL_TABLES
74 130504 8.000061035 SIEBEL_TABLES
74 130480 8.000061035 SIEBEL_TABLES
Hello
Thanks for posting the sample data.
In your first post, you said:
URS wrote:
...
SQL > select sum (FREEGB) free_gb from free_space_info where nom_tablespace = 'SIEBEL_TABLES ';
FREE_GB
----------
206.999329
...
When I run this query with your sample data, I get:
FREE_GB
----------
.69140625
If the largest number is really what you want, explain, step-by-step, how get you from the given sample data.
I got some wrong in response #2 identifiers. What I wanted to post was:
WITH file_summary AS
(
SELECT SUM (sizegb) AS TotlAllocatedGB
nom_tablespace
OF tbs_file_info
GROUP BY tablespace_name
)
SELECT fi.tablespace_name
, fi. TotlAllocatedGB
SUM (fr.freegb) AS FreeGB
File_summary FI
JOIN free_space_info en on fr.tablespace_name = fi.tablespace_name
WHERE fi.tablespace_name = 'SIEBEL_TABLES. '
GROUP BY fi.tablespace_name
, fi. TotlAllocatedGB
;
Output of your sample data:
NOM_TABLESPACE TOTLALLOCATEDGB FREEGB
------------------------------ --------------- ----------
SIEBEL_TABLES 450.69140625
-
HWAT am I doing wrong with this webcam?
Hello!
I found a tutorial in a .pdf file on webcams, usb and how to make them work with labview... so... I managed to make this diagram below!
But it still does not... What am I doing wrong? Or... you have a better scheme for this application? Or a diagram simple JAWS!
Help! : s
-
Dear experts. Help me please with this request.
I'm generating a report in dev6i.
the following query does not work correctly. and also fetch data with (+) outer join.
Select i.itemcode, sum (gs.approved) - sum (iss.issuedqty)
ims_itemcode i, ims_issues iss, ims_grns gs
where i.itemcode = gs.itemcode and gs.itemcode = iss.itemcode (+) of the i.itemcode group.
but I have to join two tables over (ims_issuem, ims_grnm)
After the addition of these two tables, the query will be
Select i.itemcode, sum (gs.approved) - sum (iss.issuedqty)
ims_itemcode i, ims_issues iss, gs ims_grns, im ims_issuem, gm ims_grnm
where i.itemcode = gs.itemcode and gs.itemcode = iss.itemcode (+) and gm.grnmserial = gs.grnsserial and
Group im.issuemserial = Iss.issuesserial by i.itemcode;
now the query works, but isn't going to pick up the results with outer (+) join. It takes only the results that correspond to the tables, but I want the results as well as the outer (+) join.
What is the problem in the second request help please.You must add more join.
Try this...
select i.itemcode,sum(gs.approved)-sum(iss.issuedqty) from ims_itemcode i,ims_issues iss, ims_grns gs, ims_issuem im, ims_grnm gm where i.itemcode=gs.itemcode (+) and gs.itemcode=iss.itemcode(+) and gm.grnmserial(+)=gs.grnsserial and im.issuemserial(+)=iss.issuesserial group by i.itemcode;
If not work, try something. After your first request. Add a table and check if need to add outer join.
Hope this helps
Hamid
-
What wrong with this Manager?
Hello
I created a simple Manager where I put a label and a button. Here is the code:
public class TitleManager extends Manager { private Bitmap bg = Bitmap.getBitmapResource("res/top_btm_bar.png"); protected Field field; private String title; private LabelField titleLbl; public TitleManager(String titleText, Field field) { super(Manager.USE_ALL_WIDTH); this.title = title; this.field = field; titleLbl = Common.getLabelFieldForList(title); titleLbl = new LabelField(title) { public void paint(Graphics g){ g.setColor(Color.WHITE); super.paint(g); } }; setBackground(BackgroundFactory.createBitmapBackground(bg)); add(titleLbl); add(field); } protected void sublayout(int width, int height) { int displayWidth = Display.getWidth(); int displayHeight = bg.getHeight(); layoutChild(titleLbl, width, height); //displayWidth, displayHeight layoutChild(field, displayWidth - titleLbl.getPreferredWidth(), displayHeight); setPositionChild(titleLbl, 50, 3); setPositionChild(field, 272, 3); setExtent(displayWidth, displayHeight); } /* protected void paint(Graphics g) { g.setFont(Font.getDefault().derive(Font.PLAIN, 18)); g.setColor(Color.WHITE); g.drawText(title, (bg.getWidth()/2)-50, field.getContentTop()+8); }*/ public int getPreferredWidth() { return Display.getWidth(); } public int getPreferredHeight() { return bg.getHeight(); } }
I'm passing a text to display as the title and a button to be placed next to him. I create LabelField using the text and I try to place the labelfield.
But I don't see the button, but not the titleLbl. Can someone tell me what is the problem with the above code. Why don't I see the titleLbl. Even I tried to paint text using object, but failed their also.
Any line help is very much appreciated.
Thank you
It's much better than before. You may want to consider laying off field (button?) first because it has a width the better, then with the label - making it an operation of a single pass (without calculations of rgdSpace). Something like
layoutChild(field, displayWidth, displayHeight); layoutChild(titleLbl, displayWidth - field.getWidth(), displayHeight);
I always use the width rather than displayWidth in all your calculations (and ditch displayWidth altogether).
I do not mean the same thing with height is because you're likely to add that the Manager of a MainScreen() which, by default, gives to his 'children' a total of Integer.MAX_VALUE > 1 height (due to having a default VERTICAL_SCROLL value - see screen explained knowledge base article for more information). Using height in this case needlessly will propel the way the fields past the bottom of the screen. You can avoid this by using MainScreen (MainScreen.NO_VERTICAL_SCROLL) constructor, as explained in the article - then you can bring your Display.get... call and use the width and height as basis.
-
What's wrong with this script?
This opens a project in RoboHTML:
projectPath var = "C:\\scratch\\test\\test.xpj";
main();
main() function
{
RoboHelp.openProject (projectPath);
}
This opens the RoboHTML but not the project:
projectPath var = "C:\\scratch\\test\\test.xpj";
main();
main() function
{
if(ProjectPath = '')
{
Alert ("project path is not defined. \nPlease update the variable 'projectPath"in the script. ») ;
RoboHelp.quit ();
}
RoboHelp.openProject (projectPath);
}
What is the error?
Hello
You set the path to the empty project with your statement:
if(ProjectPath = '')
should be
If (projectPath == "")
With a unique =, set the value of a variable. With double ==, you check if the variable has the same value as the variable/string/etc.
Take a bow
Willam
-
What am I doing wrong with this simple table?
I have a table that I need to add unique characters to slowly.
If the table is wordToCheck and I have a few "drop places" to check and see if a letter "fell off the coast." An index is assigned to each point of fall and I just want to add the letter to the appropriate index of the table so that I can push in a string.
This is my code:
wordToCheck [currentBlank.register] = currentLetter.letter.toLowerCase ();
So you can see that if 'A' has been abandoned to the empty spot with the 2 register it would return "-a".
The problem is that it is remove each time that I add a letter. If I put 'A' in the registry and then 2 "M" save 3 it returns '-m '.How do it do not replace itself every time?
1. to the original post: If you use the same instance of table - it shouldn't happen. Looks like whenever you add letter - it's a new instance of the wordToCheck table.
2. If you want to convert the string table - use Array.join () method.
-
Please help me with this request - I'm trying with Dense rank
version 10g
I got a quote for an account. If the same quote is received under different account I should mark the old account has received as being deleted.
Please help me.
power required/* Formatted on 2010/06/28 14:13 (Formatter Plus v4.8.8) */ WITH temp AS (SELECT '1-11TWQL' quote_id, 'COPS' ACCOUNT, 'Ordered' status, TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM' ) captured_date FROM DUAL UNION ALL SELECT '1-11TWQL', 'COPS', 'RFS', TO_DATE ('12/23/2009 3:37:50', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-11TWQL', 'COPS', 'Rejected', TO_DATE ('12/23/2009 3:37:52', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-11TWQL', 'COPS', 'Validated', TO_DATE ('12/23/2009 3:37:51', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-11TWQL', 'D1', 'Ordered', TO_DATE ('12/23/2009 3:04:24', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-11TWQL', 'D1', 'RFS', TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-11TWQL', 'D1', 'Rejected', TO_DATE ('12/23/2009 3:04:22', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-11TWQL', 'D1', 'Validated', TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'RFS', TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'RFS', TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'RFS', TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Rejected', TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Rejected', TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Rejected', TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Validated', TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Validated', TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Validated', TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'Ordered', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'Ordered', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'RFS', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'RFS', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'Validated', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'Validated', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8Z', 'COPS', 'Validated', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL UNION ALL SELECT '1-249A8Z', 'COPS', 'Ordered', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM') FROM DUAL) SELECT quote_id, ACCOUNT, status, captured_date, DENSE_RANK () OVER (PARTITION BY quote_id ORDER BY quote_id, ACCOUNT) rn -- ,CASE DENSE_RANK () OVER (PARTITION BY quote_id ORDER BY quote_id, -- ACCOUNT) -- WHEN 1 -- THEN 'Y' -- ELSE 'N' -- END deleted_flag FROM temp ORDER BY quote_id, captured_date;
WITH temp AS (SELECT '1-11TWQL' quote_id, 'COPS' ACCOUNT, 'Ordered' status, TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM' ) captured_date, 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-11TWQL', 'COPS', 'RFS', TO_DATE ('12/23/2009 3:37:50', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-11TWQL', 'COPS', 'Rejected', TO_DATE ('12/23/2009 3:37:52', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-11TWQL', 'COPS', 'Validated', TO_DATE ('12/23/2009 3:37:51', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-11TWQL', 'D1', 'Ordered', TO_DATE ('12/23/2009 3:04:24', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-11TWQL', 'D1', 'RFS', TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-11TWQL', 'D1', 'Rejected', TO_DATE ('12/23/2009 3:04:22', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-11TWQL', 'D1', 'Validated', TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'RFS', TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'RFS', TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'RFS', TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Rejected', TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Rejected', TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Rejected', TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Validated', TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Validated', TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'COPS', 'Validated', TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'Ordered', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'Ordered', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'RFS', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'RFS', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'Validated', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8X', 'D1', 'Validated', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8Z', 'COPS', 'Validated', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL UNION ALL SELECT '1-249A8Z', 'COPS', 'Ordered', TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag FROM DUAL) SELECT quote_id, ACCOUNT, status, captured_date, deleted_flag FROM temp ORDER BY quote_id, captured_date;
This gives a shot:
SELECT quote_id , account , status , captured_date , CASE WHEN account_cnt = 1 OR account != first_account THEN 'N' ELSE 'Y' END AS deleted_flag FROM ( SELECT quote_id , account , status , captured_date , FIRST_VALUE(account) OVER (PARTITION BY quote_id ORDER BY captured_date) AS first_account , COUNT(DISTINCT account) OVER (PARTITION BY quote_id) AS account_cnt FROM temp ) ORDER BY quote_id, captured_date;
Maybe you are looking for
-
need 32-bit drivers for windows 7 for G7-2240us
I need software for 32-bit Windows 7 for my laptop HP G7-240us
-
Re: Portege R500 - FN keys no longer works
Hello I have a laptop Portege R500, and suddenly the fn keys stopped working. I looked for off site Web from Toshiba, but no pilots have had no luck and also tried reinstalling the common Modules (I just re-installed, it is necessary to uninstall any
-
How to make a slider in my chart?
How to create a vertical slider that is mobile? I really need some help with that! I need the cursor should move and read my chart readings. Can someone teach how me? Thank you! Here's my vi!
-
Transfer rate maximum by using IEEE 1394
Hello I use an IEEE 1394 camera and I want to know how to be able to access the maximum transfer speed. Currently in the measurement and automation program I get access only to 100 Mbps, even though I know that the camera can do 800 Mbps. The initial
-
I know this question has been asked several times, but I did these steps and still not get Defragmenter to work. My Disk Doctor said I don't have problems with my Defragler work program - but I don't have a C: drive not 'dirty '. I have Windows XP