Please Help with the sql below for hierarchies

Hi all.
I have a table named stg_org_hier whose data looks like this
i would like to build the hierarchy from BU,AREA,REGION,DISTRICT,TERR
There are data cyles in the data below
stg_org has this data
QTR_CD     HIER_LVL_CD CURR_RDT_ID     DISTRICT_RDT_ID
2007Q4     AREA     E0F7B00000000     E0F7B00000000
2007Q4     BU     E0F7B00000000     E0F7B00000000
2007Q4     AREA     E0F7B40000088     E0F7B40000000
2007Q4     REGION     N0F7B40400000     E0F7B40000000
2007Q4     REGION     E0F7B40700000     E0F7B40000000
2007Q4     AREA     E0F7B00000088     E0F7B00000000
2007Q4     AREA     E0F7B40000000     E0F7B00000000
2007Q4     DISTRICT     N0F6B40405C99     N0F7B40400000
2007Q4     REGION     N0F7B40400088     N0F7B40400000
2007Q4     DISTRICT     N0F7B40405M99     N0F7B40400000
2007Q4     TERR     N0F1B40405201     N0F7B40405M99
they would like to see the output in the below in the below form
QTR_CD     HIER_LVL_CD CURR_RDT_ID     DISTRICT_RDT_ID
2007Q4     BU     E0F7B00000000     E0F7B00000000
2007Q4     AREA     E0F7B00000000     E0F7B00000000
2007Q4     AREA     E0F7B00000088     E0F7B00000000
2007Q4     AREA     E0F7B40000000     E0F7B00000000
2007Q4     AREA     E0F7B40000088     E0F7B40000000
2007Q4     REGION     E0F7B40700000     E0F7B40000000
2007Q4     REGION     N0F7B40400000     E0F7B40000000
2007Q4     DISTRICT     N0F6B40405C99     N0F7B40400000
2007Q4     REGION     N0F7B40400088     N0F7B40400000
2007Q4     DISTRICT     N0F7B40405M99     N0F7B40400000
2007Q4     TERR     N0F1B40405201     N0F7B40405M99
Here is the sql i have written :
select curr_terr_rdt_id,district_rdt_id,hier_lvl_cd,level from STG_ORG_QTR_SF_HCHY
connect by prior
curr_terr_rdt_id=district_rdt_id

qtr_cd,hier_lvl_cd,curr_rdt_id,  district_rdt_id
2007Q4,BU,         E0F7B00000000,E0F7B00000000
2007Q4,AREA,       E0F7B00000000,E0F7B00000000
2007Q4,AREA,       E0F7B00000088,E0F7B00000000
2007Q4,AREA,       E0F7B40000000,E0F7B00000000
2007Q4,AREA,       E0F7B40000088,E0F7B40000000
2007Q4,REGION,     E0F7B40700000,E0F7B40000000
2007Q4,REGION,     N0F7B40400000,E0F7B40000000
2007Q4,DISTRICT,   N0F6B40405C99,N0F7B40400000
2007Q4,REGION,     N0F7B40400088,N0F7B40400000
2007Q4,DISTRICT,   N0F7B40405M99,N0F7B40400000
2007Q4,TERR,       N0F1B40405201,N0F7B40405M99Not having a database at hand right now is helpful this time ;)
Indenting the data clearly shows that the hierarchy rules are being violated (cycles you are mentioning do not matter in this case):
Each node must have a unique predecessor except the root having none (in your case data on lines 3 and 4 both point to lines 1 and 2)
2007Q4,BU,         E0F7B00000000,E0F7B00000000
2007Q4,AREA,       E0F7B00000000,E0F7B00000000
       2007Q4,AREA,       E0F7B00000088,E0F7B00000000
       2007Q4,AREA,       E0F7B40000000,E0F7B00000000
              2007Q4,AREA,       E0F7B40000088,E0F7B40000000
              2007Q4,REGION,     E0F7B40700000,E0F7B40000000
              2007Q4,REGION,     N0F7B40400000,E0F7B40000000
                     2007Q4,DISTRICT,   N0F6B40405C99,N0F7B40400000
                     2007Q4,REGION,     N0F7B40400088,N0F7B40400000
                     2007Q4,DISTRICT,   N0F7B40405M99,N0F7B40400000
                            2007Q4,TERR,       N0F1B40405201,N0F7B40405M99Removing the first data line or changing it's curr_rdt_id will make hierarhical queries work (lines 1 and 2 would better not point to themself)
Regards
Etbin
Message was edited by: Etbin
user596003

Similar Messages

  • Please help with the sql logic

    The below is going to be a record set from for a view from the FROM CLAUSE
    1. Find component DOCUMENT where the document type = Square Metres (DOC.UOM_STD_ID = 'METR_MTR) If any components are found, retrieve the Document records for these components ONLY.
    2. Otherwise, if no components exist with a Document type = Square Metres, look for components with a Document type of Acres (DOC.UOM_STD_ID = 'ACRE'). If found, retrieve the Space Lease records for these components ONLY.
    3. Otherwise, if the Document does not have components with a type = Square Metres or Acres, look for components with the type of (DOC.UOM_STD_ID = 'PARK'). Then retrieve the departments associated with these parking components.
    For Space Lease records above, retrieve the associated Org ID (SPACE.SPORG).
    Return all departments where
    the associated Org Type (ORG.ORGCLASS) = 'NON'
    or the associated Org Type (ORG.ORGCLASS) = 'GD'
    Thank you

    maybe something like:
    SQL> select emp.empno, emp.ename, emp.deptno
      2    from emp,
      3         (select case when (select 1 from emp where deptno = 10 and rownum  = 1) = 1 then 1
      4                      when (select 2 from emp where deptno = 60 and rownum  = 1) = 2 then 2
      5                      else 3
      6                 end case_col
      7            from dual) d1
      8   where deptno = decode(d1.case_col,1,10,
      9                                     2,60,
    10                                     3,70);
         EMPNO ENAME          DEPTNO
          7839 KING               10
          7782 CLARK              10
          7934 MILLER             10
    SQL> in you code it will be something like:
    select ...
       from document t1,        
            (select case when (select 1 from document doc where DOC.UOM_STD_ID = 'METR_MTR' and rownum  = 1) = 1 then 1
                         when (select 1 from document doc where DOC.UOM_STD_ID = 'ACRE' and rownum  = 1) = 2 then 2
                         else 3
                    end case_col
               from dual) d1
    where t1.uom_std_id = decode(d1.case_col,1,'METR_MTR',
                                             2,'ACRE',
                                             3,'PARK',
                                               null);note: untested

  • Please help with the sql

    Hi ALL,
    Test_dpnt is a table.from this i want to find the total no.of applications
    (ssc,ssa,ssb,ssd,map,maq,oet,oet)---total 8.
    parent - 2(since oet is indepentdent)
    children---4
    independent-2
    source_app is the parent applications
    dpnt_app---child application of parent
    source_app dpnt_app
    ssc ssa
    ssc ssb
    ssc ssd
    mad map
    mad maq
    oet oet
    I want the output likethis
    total parent child independent
    8 2 4 2
    How to write the sql for this

    still unclear to me on how you will be able to get the output as
    total parent child independent
    8     2      4     2based on the sample data you have posted below:
    app_srce app_dpnt app_dpnt-typ-c
    43       190      R
    43       191      R
    150      200      R
    150      201      R
    300      300      Rdo you mean by the output should look something like this:
    srce count dpnt count
    2          1        
               1        
    2          1
               1
    1          1or that it needs to count all the rows for each of the 3 columns

  • Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be ab

    Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be able to download the srtony adobe.

    Adobe - Lightroom : For Macintosh
    Hal

  • Please help with an sql to show more than one records into single row for each student

    From the following data I would like to create an sql to get the information  as the following layout
    studentid,  firstTerm,  EnglishMark1,ScienceMark1,MathsMark1, Secondterm,EnglishMark2,ScienceMark2,MathsMark2,
    ThirdTerm,EnglishMark3,ScienceMark3,MathsMark3 // As single rows for each student
    Example
    1 First, 30,40,20,Sec,30,40,20,  simillarly next row for next row for another sudent. Please help to generate the sql for the same.
    Please help it would be very appreciate.
    With Thanks
    Pol
    polachan

    create table yourdata (studentid int, term varchar(10), section varchar(50), Mark int)
    insert into yourdata values
    (1,'First','Math',20),(1,'First','English',30),(1,'First','Science',40),
    (2,'First','Math',20),(2,'First','English',30),(2,'First','Science',40),
    (3,'First','Math',20),(3,'First','English',30),(3,'First','Science',40),
    (1,'Sec','Math',20),(1,'Sec','English',30),(1,'Sec','Science',40),
    (2,'Sec','Math',20),(2,'Sec','English',30),(2,'Sec','Science',40),
    (3,'Sec','Math',20),(3,'Sec','English',30),(3,'Sec','Science',40)
    Select studentid
    ,max(case when term='First' and section='English' Then Mark End) as EnglishMark1
    ,max(case when term='First' and section='Science' Then Mark End) as ScienceMark1
    ,max(case when term='First' and section='Math' Then Mark End) as MathMark1
    ,max(case when term='Sec' and section='English' Then Mark End) as EnglishMark2
    ,max(case when term='Sec' and section='Science' Then Mark End) as ScienceMark2
    ,max(case when term='Sec' and section='Math' Then Mark End) as MathMark2
    ,max(case when term='Third' and section='English' Then Mark End) as EnglishMark3
    ,max(case when term='Third' and section='Science' Then Mark End) as ScienceMark3
    ,max(case when term='Third' and section='Math' Then Mark End) as MathMark3
    From yourdata
    Group by studentid
    drop table yourdata

  • Please help with the FOR loop and the array..

    I was trying to place some words in the Movie Clip
    "TextPanel" and set a
    random position to each of them.
    But it's not working.
    1) I created a Movie Clip "word" and inside that MC I created
    a text field
    and gave it an identifier "textFiled".
    2) The linkage name for Movie Clip "word" I set to "word".
    3) In the actionscript I created an Array called "aWords".
    4) Then I created a FOR loop that should
    place (attach) Movie Clips "word0", "word1", "word2" and
    "word3" to the
    movie clip TextPanel, and set the textField text for each of
    them to the
    text from the Array.
    But the script attaches 4 Movie Clips with a name
    "Undefined", instead of 4
    different names (from the Array).
    What is wrong with this script?
    var aWords:Array = [apple,banana,orange,mango];
    for(i=0;i<aWords.length;i++){
    var v = TextPanel.attachMovie("word","word"+i,i);
    v.textFiled.text = aWords
    v._x = randomNumber(0,Stage.width);
    v._y = randomNumber(0,Stage.height);
    Thanks in advance

    But in my Post I already wrote v.textFiled.text = aWords
    so I don't understand what were you correcting..
    And one more:
    I have tested it by changing the
    v.textFiled.text = aWords; to v.textFiled.text = "some
    word";
    and it's working fine.
    So there is something wrong with the Array element, and I
    don't know why..
    "aniebel" <[email protected]> wrote in
    message
    news:ft2d5k$lld$[email protected]..
    > Change:
    > v.textFiled.text = aWords;
    >
    > to:
    > v.textFiled.text = aWords
    >
    > It needs to know which element inside the array you want
    to place in the
    > textfield (or textfiled) :)
    >
    > If that doesn't work, double check that your instance
    name is correct
    > inside
    > of "word".
    >

  • Help with structuring SQL databases for multiple photo galleries..help!?!

    Hello all,
    As a new PHP/SQL developer I have found great technical assistance from both this forum and from David Powers and his wonderful books. I am at a crucial point in my web development and although I believe I know which direction I need to go, I am still uncertain and so I appeal to you all for your help, especially David Powers.
    The website I am building is one which will house many photo galleries. I was able to successfully modify the code provided in David Powers’ book ‘php Solutions’ so that I got the photo galleries constructed and working in the manner I desired.
    That being said, a person browsing my website will be presented with a link to see the photo galleries. There will be five (5) categories in which the photos will be separated, all based on specific styles. Now that I have the galleries working, I need to know how to structure things so that I can create a page, like a TOC (table o’ contents) that shows all photo galleries by displaying a thumbnail image or two along with the description. Perhaps I’ll limit the TOC page to only show the latest 25 galleries, arranged with the most current always on top.
    The way I have my galleries set up, I have a separate database for each one, containing the photo filenames and other relevant data. To build my TOC structure, should I have an overall database that contains each gallery database filename along with category? This is where I have no idea what I’m doing so if my question sounds vague, please understand I have no other idea how to ask.
    The site will grow to the point of having hundreds, if not thousands of photo galleries. I simply want to know how to (organize them) or otherwise allow me to build a method to display them in a TOC page or pages.
    I know this is a bit dodgy, but with some info and questions back from you, I feel confident that I should be able to get my point across.
    Lastly, I am still developing this site locally, so I have no links to provide (though I feel that shouldn’t be necessary right now).
    Many sincere thanks to you all in advance,
    wordman

    bregent,
    I'm chewing this over in my head, reading up on DB's in 'phpSolutions' and I think that things are slowly materializing.
    Here is the structure of the website that I have planned:
    MAIN PAGE
    User is presented with a link on the main page to select photo galleries (other links are also present). Clicking the link takes them to the Category Page.
    CATEGORY PAGE
    On this page, the User will then have 5 choices based on categories (photo style). CLicking any of these 5 links will take them to respective TOC pages.
    TOC PAGE
    On this page, the user is greeted with a vertical list of galleries or photosets; one to three thumbs on the left, a small block of descriptive text on the right (ideally containing date/time info to show how recent the gallery is). Newest galleries appear at the top. Eventually, when there are tens or hundreds of galleries in any given catrgory, I'll need to adopt a method for breaking up the qualntity in groups (we can pick 20 for example) that can be scrolled through using a small navbar. This will keep the TOC Pages from getting endlessly long and avoid endless scrolling. User selects a gallery on this page to view.
    THUMBNAIL PAGE
    On choosing a gallery, a thumbnail page is generated (I have this working already)
    IMAGE PAGE
    On selecting any thumbnail in the grid, the user is taken to the full-sized photo with a navbar and photo counter at the top. Navlinks allow forward and back, a link to the first image, a link to the last image and one link back to the thumbnail page. (I have this working already).
    I provide this info in an effort to help understand the basic structure of my site. The description above is as close to a step-by-step illustration as possible.
    Thank you!
    Sincerely,
    wordman

  • Newbie - help with a SQL query for a bar chart  - Originally posted in APEX

    I originally posted this in the APEX forum but someone there suggested this is more of a SQL question.  Anyone out there who can provide some assistance?
    Hi,
    I'm a new user on APEX with no real SQL knowledge and I'm trying to build a dashboard with charts into an existing APEX application. Based on another application, I have come up with the following SQL code:
    select null link
    , CATEGORY label
    , count (decode(PROJECT_STATUS,'1',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'2',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'3',PROJECT_ID))"On Hold"
    , count (decode(PROJECT_STATUS,'4',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'5',PROJECT_ID))"Pending Review"
    from GRAPO_PROHEADTRK
    where (PROJECT_STATUS='1' or PROJECT_STATUS='2' or PROJECT_STATUS='3' or PROJECT_STATUS='4' or PROJECT_STATUS='5' or PROJECT_STATUS='6')
    group by CATEGORY
    Order by COUNT(PROJECT_ID) DESC
    The code from the other app was:
    select null link
    , FUNCTIONAL_AREA label
    , count (decode(PROJECT_STATUS,'Active',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'Complete',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'On Hold',PROJECT_ID)) "On Hold"
    , count (decode(PROJECT_STATUS,'Recurring',PROJECT_ID))"Recurring"
    , count (decode(PROJECT_STATUS,'Pipeline',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'Not Approved',PROJECT_ID))"Not Approved"
    from PM_V2
    where LOB='S2S' and (FUNCTIONAL_AREA='Accounts Payable' or FUNCTIONAL_AREA='Expense' or FUNCTIONAL_AREA='Procurement' or FUNCTIONAL_AREA='Fixed Assets')
    group by FUNCTIONAL_AREA
    Order by COUNT(PROJECT_ID) DESC
    I'm getting a "Failed to parse SQL query!" error when I try to run validation.
    Is this enough info for some assistance? Any help would really be appreciated.
    Thanks,
    Rachel

    Hi, Rachel,
    user10774102 wrote:
    I originally posted this in the APEX forum but someone there suggested this is more of a SQL question.  Anyone out there who can provide some assistance?
    Hi,
    I'm a new user on APEX with no real SQL knowledge and I'm trying to build a dashboard with charts into an existing APEX application. Based on another application, I have come up with the following SQL code:
    select null link
    , CATEGORY label
    , count (decode(PROJECT_STATUS,'1',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'2',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'3',PROJECT_ID))"On Hold"
    , count (decode(PROJECT_STATUS,'4',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'5',PROJECT_ID))"Pending Review"
    from GRAPO_PROHEADTRK
    where (PROJECT_STATUS='1' or PROJECT_STATUS='2' or PROJECT_STATUS='3' or PROJECT_STATUS='4' or PROJECT_STATUS='5' or PROJECT_STATUS='6')
    group by CATEGORY
    Order by COUNT(PROJECT_ID) DESCIs there a problem with the code above?
    It's curious that the WHERE clause includes "PROJECT_STATUS='6'", but there is no pivoted column for project_status='6', like there is for '1' through '5'. That's not necessarily a mistake, and it wouldn't raise an error in any case.
    Instead of
    where (PROJECT_STATUS='1' or PROJECT_STATUS='2' or PROJECT_STATUS='3' or PROJECT_STATUS='4' or PROJECT_STATUS='5' or PROJECT_STATUS='6')you could say
    where PROJECT_STATUS  IN ('1', '2', '3', '4', '5', '6')but that probably has nothing to do with your current problem.
    The code from the other app was:
    select null link
    , FUNCTIONAL_AREA label
    , count (decode(PROJECT_STATUS,'Active',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'Complete',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'On Hold',PROJECT_ID)) "On Hold"
    , count (decode(PROJECT_STATUS,'Recurring',PROJECT_ID))"Recurring"
    , count (decode(PROJECT_STATUS,'Pipeline',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'Not Approved',PROJECT_ID))"Not Approved"
    from PM_V2
    where LOB='S2S' and (FUNCTIONAL_AREA='Accounts Payable' or FUNCTIONAL_AREA='Expense' or FUNCTIONAL_AREA='Procurement' or FUNCTIONAL_AREA='Fixed Assets')
    group by FUNCTIONAL_AREA
    Order by COUNT(PROJECT_ID) DESC
    I'm getting a "Failed to parse SQL query!" error when I try to run validation.Is that an Apex error message? Sorry, I don't know anything about Apex.
    If you can't get a more specific error message from Apex, then try debugging this statement in SQL*Plus. When you get it fixed, then you can copy it back into Apex.
    If this is a SQL problem, then you should be able to re-create the problem in pure SQL.
    If you can't re-create the problem in pure SQL, then it's probably an Apex problem, and belongs in the Apex forum, not here.
    I don't see anything obviously wrong with your code, but I can't tell if, for example, you spelled a column name wrong, or if something has the wrong data type
    Is this enough info for some assistance? Any help would really be appreciated.It wiould be better if you posted a completE script that people could run to re-create the problem, and to test their ideas.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle (and any other software, such as Apex) you're using.

  • Please help with PL/SQL

    Hi All,
    This is driving me nuts but I can't see what I am doing wrong....
    I have a simple PL/SQL with :
    DECLARE
    xxx NUMBER;
    BEGIN
    FOR z in 1..htmldb_application.g_f02.count loop
    xxx:=htmldb_application.g_f02(z);
    select task_id into present_task from dm_process_steps where process_id=:P34_ID AND task_id = xxx;
    htp.p(xxx);
    IF htmldb_application.g_f02(z) = present_task THEN
    htp.p('PRESENT');
    ELSE
    htp.p('NOT PRESENT');
    END IF;
    END;
    The above fails with:
    ORA-01403: no data found
    However if I replace the marked xxx with the number then the code works fine.
    I do not understand the reason for this since I know that xxx has in fact a value and the select should be valid!
    Kindly asking for any help on this!
    Pawel.

    Scott,
    This will probably be a quite extended but I'll try to make it as clear as possible. I took a different approach to find the element which is causing the problem.
    I have 2 TABLES defined as:
    DM_PROCESS_STEPS
    ID Number
    PROCESS_ID Number
    TASK_ID Number
    TASK_ORDER Number
    DM_TASKS
    TASK_ID Number
    TASK_TITLE Varchar2
    ...and some more columns ...
    On the page I have a PL/SQL Region with:
    DHTML_SHUTTLE (
    pSQL_1=>'select "TASK_TITLE","TASK_ID" from "DM_TASKS"',
    pSQL_2=>'select t.task_title, p.task_id from dm_tasks t,dm_process_steps p where t.task_id = p.task_id and process_id = :P34_ID order by p.task_order',
    pID_1=>'1',
    pID_2=>'2',
    pSort1=>'N',
    pSort2=>'Y',
    pFixed1=>'Y',
    pHeight=>'300',
    pWidth=>'400',
    pImagePrefix=>v('WORKSPACE_IMAGES')
    NOTE: All above code comes from a working shuttle_sample code. The only things I modified were pSQL_1 and pSQL_2
    - In this case I want to have "All available tasks in the first list"
    - Since the syntax for pSQL_2 item must return two columns I wrote a joined queary so that I can see the Task_Title on the second list although this column doesn't directly come from DM_PROCESS_STEPS.
    I also have a After Submit Process which is fired upon pressing an apply button:
    DECLARE
    BEGIN
    -- Clean the Tasks from current Process --
    delete from dump where process_id = :P34_ID;
    -- Populate the Process with new list
    FOR z in 1..htmldb_application.g_f02.count loop
    INSERT INTO DUMP
    (ID,TASK_ID,PROCESS_ID,TASK_ORDER)
    VALUES (DM_PROCESS_STEPS_SEQ.nextval,htmldb_application.g_f02(z),:P34_ID,z);
    END LOOP;
    END;
    Now, the problem is with htmldb_application.g_f02(z) element. If understand correctly (please verify this!) the value of this element is whatever the pSQL_2 returns in the second column. In this case, htmldb_application.g_f02(z) returns the Task_Id.
    However, when I view the contents of the DM_PROCESS_STEPS table I can see that the first row (or rows) contain PROCESS_ID under TASK_ID column !!! This is were I am most confused as I cannot figure out were these htmldb_application.g_f02(z) come from !!!
    For example:
    1. I am trying to edit tasks for a process with process_id = 421:
    2. In my select list I have 3 tasks (who's task_id are 746,782 and 785)
    When executing the above update process I get the following results:
    ID TASK_ID PROCESS_ID TASK_ORDER
    1737 421 421 1
    1738 421 421 2
    1739 421 421 3
    1740 746 421 4
    1741 782 421 5
    1742 785 421 6
    If I am not mistaken the value of
    htmldb_application.g_f02(1) - should be the Task_Id of the first element on my select list
    htmldb_application.g_f02(2) - should be the Task_Id of the second element on my select list and so on....
    Why does htmldb_application.g_f02(1-3) hold a different value is beyond me !
    Questions which bother me:
    - Is there any way to lookup to 'contents' of htmldb_application.g_f02(1) from a separate SQL session or does it has to be in run-time?
    - Perhaps there is a way to flush or clean the htmldb_application.g_f02 ?
    Your help would be greatelly appriciated !
    Regards,
    Pawel.

  • Please help with a few drivers for z60m after fresh install

    I got a bad virus(several actually) that I could not eradicate. I was advised to just wipe and reinstall the OS since it is not under warranty anymore. I could not find the recovery disk, must have been lost inthe last military move could not find a replacement recovery disk at the IBM website so  I went out and bought an xpprof OS thinking it should not be that hard to find any drivers XP does not provide . I had no problems doing that on our acer laptop and a friends HP laptop before so was pretty confident.. Boy was I wrong this has been the reinstall from hell. I reinstalled the audiodrivers from theIBM website but the speakers still don't work. The laptop will not recognize the wireless, even after installing the drivers for that and I can't find anything out about why the dock does not work, I assume there are drivers for that too. I also have 4 ugly yellow question marks that I can't seem to get rid of in device manager.  At this point I am already out the price of XP Prof but I really need this laptop my husband took the acer laptop when he deployed to Afghanistan, only because I was confident I could get this one fully functional.  I see now my self confidence was badly misplaced ,even though I am working on a degree in computer technology this laptop is kicking my tush.
    Is there anyone that could help please
    1. help me find why my speakers still dont work even though they are recognized as soundmax in device manager
              I found several references to this issue in the forums but there does not seem to be a resolution
    2. help me figure out why my laptop suddenly (after the fresh install)does not know it even has a wireless capability even after numerous attempts at installing the driver(driver seems to install just finebut upon reboot there is still no wireless available
    3. figure out how I can get my dock to work again
    the laptop has always worked great til now and all these things were functional before the virus and reinstall of the OS)
    4.  get rid of ugly yellow exclamation points under Other Devices, I am sure they must be important( I am sure at least one or more of them has to do with the wireless)
    sorry this is so long Im  just frustrated thanks so much for anyone that can give some guidance on this

    hanaleia, welcome to the forum,
    download and install ThinkVantage System Update, it should get the drivers for you. Please ensure you read down the site as you may need to install a patch for XP SP2.
    Let us know how you get on.
    Regards
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • Please help with the URL class

    Hello,
    I am trying to write a Java app that will take a url and download it.
    I believe you can do this with the URL class but I don't understand how to. For example, if the http url location points to a picture file, how would I code the app to retrieve this picture and save it to a specified directory?
    Also, is there a way that my java app could open another program, let's say Microsoft Internet Explorer?
    Please be as specific as possible, thanks!

    You'll see below an example to download a file
    private static String copyFile (String url, String nomFichier){
         // construction du fichier de sortie
         File outputFile = new File(repertoire + "\\fichiers\\" + nomFichier);
         // si le fichier existe d�j�, il ne sert � rien de le t�l�charger !
    if (outputFile.exists())
         return "fichiers/" + nomFichier;
              try {     
         HttpURLConnection connect = (HttpURLConnection)new URL(url).openConnection();
    boolean connected = false;
    while (!connected){
    try {
    connect.connect();
    connected = true;
         catch (java.io.IOException e1) { System.out.print("...Tentative de connection"); }     
    DataInputStream reader = new DataInputStream(
    connect.getInputStream());
         FileOutputStream out = new FileOutputStream(outputFile);
         int length = 1024;
         byte[] buf = new byte[length];
         int offset = 0;
         long offsetCourant = 0;
         int nb=0;
         while ((nb=reader.read(buf,offset,length))!= -1) {
              out.write(buf,0,nb);
         out.close();
         catch (java.net.MalformedURLException e) { System.out.println("pb d'url"); }
         catch (java.io.IOException e1) { System.out.println(e1.getMessage()); }
         return "fichiers/" + nomFichier;
    }

  • Newbie - need help with a SQL query for a bar chart

    Hi,
    I'm a new user on APEX with no real SQL knowledge and I'm trying to build a dashboard with charts into an existing APEX application. Based on another application, I have come up with the following SQL code:
    select null link
    , CATEGORY label
    , count (decode(PROJECT_STATUS,'1',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'2',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'3',PROJECT_ID))"On Hold"
    , count (decode(PROJECT_STATUS,'4',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'5',PROJECT_ID))"Pending Review"
    from GRAPO_PROHEADTRK
    where (PROJECT_STATUS='1' or PROJECT_STATUS='2' or PROJECT_STATUS='3' or PROJECT_STATUS='4' or PROJECT_STATUS='5' or PROJECT_STATUS='6')
    group by CATEGORY
    Order by COUNT(PROJECT_ID) DESC
    The code from the other app was:
    select null link
    , FUNCTIONAL_AREA label
    , count (decode(PROJECT_STATUS,'Active',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'Complete',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'On Hold',PROJECT_ID)) "On Hold"
    , count (decode(PROJECT_STATUS,'Recurring',PROJECT_ID))"Recurring"
    , count (decode(PROJECT_STATUS,'Pipeline',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'Not Approved',PROJECT_ID))"Not Approved"
    from PM_V2
    where LOB='S2S' and (FUNCTIONAL_AREA='Accounts Payable' or FUNCTIONAL_AREA='Expense' or FUNCTIONAL_AREA='Procurement' or FUNCTIONAL_AREA='Fixed Assets')
    group by FUNCTIONAL_AREA
    Order by COUNT(PROJECT_ID) DESC
    I'm getting a "Failed to parse SQL query!" error when I try to run validation.
    Is this enough info for some assistance? Any help would really be appreciated.
    Thanks,
    Rachel

    Hello,
    This is more of an SQL question, rather than specifically APEX-related. It's notable that you say: I'm a new user on APEX with no real SQL knowledgeWhich is fine (we all have to start somewhere, afterall) but it might be worth de-coupling the problem from APEX in the first instance. I'd also strongly recommend either taking a course, reading a book (e.g. http://books.google.co.uk/books?id=r5vbGgz7TFsC&printsec=frontcover&dq=Mastering+Oracle+SQL&hl=en#v=onepage&q=Mastering%20Oracle%20SQL&f=false) or looking for a basic SQL tutorial - it will save you a whole lot of heartache, I promise you. Search the oracle forums for the terms "Basic SQL Tutorial" and you should come up with a bunch of results.
    Given that you've copied your query template from another, I would suggest ensuring that the actual query works first of all. Try running it in either:
    * SQL Editor
    * SQL*Plus
    * an IDE like SQL Developer (available free from the OTN: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html ) or TOAD or similar.
    You may find there are syntax errors associated with the query - it's difficult to tell without looking at your data model.
    select null link
    , CATEGORY label
    , count (decode(PROJECT_STATUS,'1',PROJECT_ID))"Active"
    , count (decode(PROJECT_STATUS,'2',PROJECT_ID))"Complete"
    , count (decode(PROJECT_STATUS,'3',PROJECT_ID))"On Hold"
    , count (decode(PROJECT_STATUS,'4',PROJECT_ID))"Pipeline"
    , count (decode(PROJECT_STATUS,'5',PROJECT_ID))"Pending Review"
    from GRAPO_PROHEADTRK
    where (PROJECT_STATUS='1' or PROJECT_STATUS='2' or PROJECT_STATUS='3' or PROJECT_STATUS='4' or PROJECT_STATUS='5' or PROJECT_STATUS='6')
    group by CATEGORYNote that your "order by" clause references a field called "PROJECT_ID", which exists in the old query but you've changed other similar references to "PROJECT_STATUS" - is it possible you've just missed this one? The perils of copy-paste coding I'm afraid...

  • Please help with the query (INSERT RETURNING BULK COLLECT INTO)

    I am trying to write a query inside the C# code where I would insert values into a table in bulk using bind variables. But I also I would like to receive a bulk collection of generated sequence number IDs for the REQUEST_ID. I am trying to use RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs clause where :REQUEST_IDs is another bind variable
    Here is a full query that use in the C# code
    INSERT INTO REQUESTS_TBL(REQUEST_ID, CID, PROVIDER_ID, PROVIDER_NAME, REQUEST_TYPE_ID, REQUEST_METHOD_ID, SERVICE_START_DT, SERVICE_END_DT, SERVICE_LOCATION_CITY, SERVICE_LOCATION_STATE, BENEFICIARY_FIRST_NAME,
    BENEFICIARY_LAST_NAME, BENEFICIARY_DOB, HICNUM, CCN, CLAIM_RECEIPT_DT, ADMISSION_DT, BILL_TYPE,
    LANGUAGE_ID, CONTRACTOR_ID, PRIORITY_ID, UNIVERSE_DT, REQUEST_DT, BENEFICIARY_M_INITIAL,
    ATTENDING_PROVIDER_NUMBER, BILLING_NPI, BENE_ZIP_CODE, DRG, FINAL_ALLOWED_AMT, STUDY_ID, REFERRING_NPI)
    VALUES
    (SQ_CDCDATA.NEXTVAL, :CIDs, :PROVIDER_IDs, :PROVIDER_NAMEs, :REQUEST_TYPE_IDs,
    :REQUEST_METHOD_IDs, :SERVICE_START_DTs, :SERVICE_END_DTs, :SERVICE_LOCATION_CITYs,
    :SERVICE_LOCATION_STATEs, :BENEFICIARY_FIRST_NAMEs, :BENEFICIARY_LAST_NAMEs, :BENEFICIARY_DOBs,
    :HICNUMs, :CCNs, :CLAIM_RECEIPT_DTs, :ADMISSION_DTs, :BILL_TYPEs, :LANGUAGE_IDs,
    :CONTRACTOR_IDs, :PRIORITY_IDs, :UNIVERSE_DTs, :REQUEST_DTs, :BENEFICIARY_M_INITIALs,
    :ATTENDING_PROVIDER_NUMBERs, :BILLING_NPIs, :BENE_ZIP_CODEs, :DRGs, :FINAL_ALLOWED_AMTs,
    :STUDY_IDs, :REFERRING_NPIs) RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs
    However, when I run this query, it gives me a strange error ORA-00925: missing INTO keyword. I am not sure what that error means since I am not missing any INTOs
    Please help me resolve this error or I would appreciate a different solution
    Thank you

    You cannot use (and do not want to in this case) the BULK COLLECT.
    create table for_testing
       the_id      number not null primary key,
       some_data   number
    declare
       l_return_value for_testing.the_id%type;
    begin
      4 
       insert into for_testing
          the_id,
          some_data
       values
          1,
          5
       returning the_id into l_return_value;
       dbms_output.put_line('the return values is ' || l_return_value);
    end;
    20  /
    the return values is 1
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.02
    TUBBY_TUBBZ?Is a simple example. In the future, please use the tags to preserve formatting on your code like i have so it remains readable .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Please help with the GUI quiz question!

    Hi Folks,
    Please help me with the code for the following GUI.
    The display window of the application should have two panels at the top level (you could have multiple panels contained within a top-level panel). The first top level panel should have a grid or a border layout and should include apart from various label objects: 1) a textfield to store the info entered, 2) a combobox 3) a combobox or a list box , 4) a radio-button group , 5) a combo box 6) checkboxes for additional accessories, and 7) checkboxes .
    The second top-level panel that is placed at the bottom of the window should have a submit button, a clear button and a textarea for output.
    Thanks a lot.

    Please be a little more explicit about what you're doing, what you expect to happen, and what you actually observe.
    Please post a short, concise, executable example of what you're trying to do. This does not have to be the actual code you are using. Write a small example that demonstrates your intent, and only that. Wrap the code in a class and give it a main method that runs it - if we can just copy and paste the code into a text file, compile it and run it without any changes, then we can be sure that we haven't made incorrect assumptions about how you are using it.
    Post your code between [code] and [/code] tags. Cut and paste the code, rather than re-typing it (re-typing often introduces subtle errors that make your problem difficult to troubleshoot). Please preview your post when posting code.
    Please assume that we only have the core API. We have no idea what SomeCustomClass is, and neither does our collective compiler.
    If you have an error message, post the exact, complete error along with a full stack trace, if possible. Make sure you're not swallowing any Exceptions.
    Help us help you solve your problem.

  • Can anyone please help with the 2.3 update in UK?

    Can anyone please help?  I have an unbranded x10 in the UK.  PC companion constantly tells me my phone software is up to date (with android 2.1) so I cannot upgrade to 2.3.  I've tried all the tips on the SE support page like deleting the database content and looking for the setting to update the phone next time it's connected which doesn't exist (very informative SE!).  I'm not keen on this independent software installation through the rapidshare download, it seems full of glitches looking at the forums.  http://www.sonyericsson.com/update/?lc=en&cc=gb&pid=xperiax10  This link clearly tells us the update is available through PC companion, no joy for me though.  Any help is welcome.

    Have a look at this and check your version number see if its listed
    http://forum.xda-developers.com/showthread.php?t=1186045
    As for generic roms you have probable read about custom roms
    See this thread it is a stock SE rom not a custom rom and will give you just that a stock SE rom if you want
    http://talk.sonyericsson.com/thread/19762

Maybe you are looking for

  • Questions about SPML Web Service ( OIM 9.1 )

    I need to launch a provisioning process on a target by using a generic connector (Web Service). Scenario: ========== Host A is where the OIM server is installed. A generic connector is defined here. Host B is the target where users must be created. A

  • Panther to Leopard

    I've seen this topic discussed but haven't seen my particular problem. I can't get the computer to accept the Leopard DVD as it is ejected after a few moments. I have no clue what other problems I may run into but I would at least like to start the p

  • How to keep customer Pattern/Die Equipment in our plant without value

    Hi!   Anybody help me to sort out my problem. The scenario is, How to keep customer Pattern/Die Equipment in our plant without value 1.My client manufacturing material (A), which is used to produce actual finished goods (B). First material (A) is pro

  • Database link works for form but not report

    I have created a database link to the scott.emp table in a remote database then created a local synonym in my Portal. I then created a Form and a Report referencing the local synonym. The for works and allows me to insert record but the form does not

  • Inventory aged reports are taking a very long time to run

    We are using Standard delievered extractors for Inventory.  We have build an Aged report and it is taking a very long time to run as more an more data is added.  We put the inventory in buckets 0-30, 31-60, .... >365 days.  We are aging based on a ba