'lag' works in normal SQL statement, but not when in a view (resolved)

hi,
got a problem when using 'lag' in a view.
if i set up a select statement using 'lag' and execute it, all the results are correct.
when i stick the exact same select into a view, then the results for the 'lag' entries are not correct any more.
has anyone experienced this ?
any hints would be good.
thanks
Martin
using Oracle 10g Express
version 10.2.0.1.0
can not download the patch because i can not log into metalink - no CSI
setting to resolved.
Message was edited by:
user614086

Hi again,
I think the problem is more with your expectation of what LAG should be doing than with LAG itself.
LAG must calculate based on the result set, in your stand alone query that means what's left after the WHERE clause is applied.
In the view that means across all rows the view produces. THEN you apply the where clause to the calculated values. You can see this in the example below.
So what you'd need to do is define this view in a manner in which the WHERE clause won't make a difference to the logical window produced.
That would mean using some columns in the partition by clause and order by clause, or leaving the lag function outside the view.
create table test_lag (column1 number, column2 varchar2(10), column3 date);
insert into test_lag values (1, 'ONE', trunc(sysdate,'DD') - 1);
insert into test_lag values (2, 'TWO' trunc(sysdate,'DD') );
insert into test_lag values (3, 'THREE', trunc(sysdate,'DD') + 1);
insert into test_lag values (4, 'FOUR', trunc(sysdate,'DD') + 2);
commit;
create or replace view test_lag_v
as
select column1, column2, lag(column2, 1) over (order by column1 asc) AS laggery, lag(column1) over (order by column3 desc) as laggery_2
from test_lag;
ME_XE?select *
  2  from test_lag_v
  3  where column1 <> 3;
           COLUMN1 COLUMN2                        LAGGERY                                 LAGGERY_2
                 4 FOUR                           THREE
                 1 ONE                                                                            3
2 rows selected.
Elapsed: 00:00:00.50
ME_XE?
ME_XE?select *
  2  from test_lag_v;
           COLUMN1 COLUMN2                        LAGGERY                                 LAGGERY_2
                 4 FOUR                           THREE
                 3 THREE                          ONE                                             4
                 1 ONE                                                                            3
3 rows selected.
Elapsed: 00:00:00.68

Similar Messages

  • PDF form submission problem - works in Acrobat and Reader, but not when embedded in browser

    Hello everyone,
    I am trying to submit a PDF form to an application server.
    To do this, I added a "Submit" button to the PDF, configured the server's address and submit format, and tested the button.
    I opened the PDF in Acrobat Pro, clicked the button, and my web application received the form in PDF format just as I wanted.
    To make it work in Reader, I had to extend user rights via Acrobat Pro, and then the form worked inside Reader as well.
    Up to here, everything went fine.
    Then I embedded the PDF in a web page (which will be the final scenario) and it all stopped working.
    The submit button doesn't do anything anymore, and no data is sent to the application server.
    I even tried switching from the form's submit mechanism to calling event.target.submitForm(...) in Javascript directly, but nothing changed (meaning this too worked only when opening the form as an "offline" pdf, but not when embedding it in a web page).
    Is there something I am missing? Something else that must be configured/activated in order to be able to submit the PDF when it is in the form of an embedded object?
    Many thanks in advance,
    Alex

    Thanks for your reply, Paul.
    I tested the submit button both in Reader 9.3 and Acrobat 8 (which is the same I used to RE the PDF).
    Apparently I got it working too, but only by deploying my embedding web page to an application server.
    The final environment the PDF will be embedded into will be inside a web application deployed to an application server, so I guess my problem is solved.
    It didn't work only when embedded into a local test.html web page saved on my PC...
    Thanks again, have a good day.
    Alex

  • SQL script works in SQL Developer but not when scheduled

    I have a script that I can run, logged onto my server as a user with full permissions and into my database as SYSDBA, that produces a CSV file on the server when I run it from SQL Developer ON the server. HOWEVER, when I set it up as a scheduled job, using those SAME CREDENTIALS (same Windows/network user; same database user), I get no output. The job indicates that it's running successfully, but no file gets created.
    Any advice is greatly appreciated.
    Here's the script:
    WHENEVER SQLERROR EXIT FAILURE;
         set serveroutput on
         DECLARE
         my_query varchar2(5000);
         BEGIN
         my_query := q'[
    SELECT client_id, JOB_NAME, SCHEDULE_TYPE, TO_CHAR(START_DATE,'MM/DD/YYYY HH24:MM') AS START_DATE,
    REPEAT_INTERVAL, ENABLED, STATE, RUN_COUNT,
    TO_CHAR(LAST_START_DATE,'MM/DD/YYYY HH24:MM') AS LAST_START, LAST_RUN_DURATION,
    TO_CHAR(NEXT_RUN_DATE,'MM/DD/YYYY HH24:MM') AS NEXT_RUN
    FROM DBA_SCHEDULER_JOBS
    WHERE instr(client_id,'10.') is not null
    ORDER BY LAST_START_DATE DESC
         p2k.ccsd_any_query_to_csv('HRISEDB_E_OUTPUT_MK', 'dbserver_job_output.csv',my_query);
         end;
    =================================================================
    Here's the called procedure (I don't really understand it -- I gleaned it from others on the internet):
    -- DDL for Procedure CCSD_ANY_QUERY_TO_CSV
    set define off;
    CREATE OR REPLACE PROCEDURE "CCSD_ANY_QUERY_TO_CSV" (p_dir in varchar2, p_filename in varchar2, p_query in varchar2) AUTHID CURRENT_USER
    is
    l_output utl_file.file_type;
    l_theCursor integer default dbms_sql.open_cursor;
    l_columnValue varchar2(4000);
    l_status integer;
    l_query long;
    l_colCnt number := 0;
    l_separator varchar2(1);
    l_col_desc dbms_sql.desc_tab;
    l_col_type varchar2(30);
    l_datevar varchar2(8);
    BEGIN
    l_query := 'SELECT SYSDATE FROM DUAL; ';
    dbms_sql.parse(l_theCursor, p_query, dbms_sql.native);
    dbms_sql.describe_columns(l_theCursor, l_colCnt, l_col_desc);
    l_output := utl_file.fopen( p_dir, p_filename, 'w' );
    dbms_sql.parse( l_theCursor, p_query, dbms_sql.native );
    for i in 1..l_col_desc.count LOOP
    utl_file.put( l_output, l_separator || '"' || l_col_desc(i).col_name || '"' );
    dbms_sql.define_column( l_theCursor, i, l_columnValue, 4000 );
    l_separator := ',';
    end loop;
    utl_file.new_line( l_output );
    l_status := dbms_sql.execute(l_theCursor);
    while ( dbms_sql.fetch_rows(l_theCursor) > 0 ) loop
    l_separator := '';
    for i in 1 .. l_colCnt loop
    dbms_sql.column_value( l_theCursor, i, l_columnValue );
    utl_file.put( l_output, l_separator || '"' || l_columnValue || '"');
    l_separator := ',';
    end loop;
    utl_file.new_line( l_output );
    end loop;
    dbms_sql.close_cursor(l_theCursor);
    utl_file.fclose( l_output );
    execute immediate 'alter session set nls_date_format=''dd-MON-yy'' ';
    exception
    when others then
    execute immediate 'alter session set nls_date_format=''dd-MON-yy'' ';
    raise;
    end;
    /

    hello,
    does oracle showing any errors in user_scheduler_job_run_details for this job ? I would advise try inserting some debug statement to identify where exactly its stuck. Also please check sample configurations syntax for user_scheduler_jobs.
    Cheers
    Sush

  • User can Execute SQL Statement but not Stored Procedure

    I have a function in Access that calls a stored procedure to update a table. When I run it, it works fine but when the users try to run it, they get an error.
    If I change it run the actual SQL syntax that is in the stored procedure then the users can run it and update the table without any problems, which makes no sense to me. It's doing the same exact thing as the stored procedure. I'd much rather have them be
    able to run the procedures then writing the SQL in VBA modules because that's going to end up being a lot of code.
    Any idea on why it's like this and how to correct it? Any assistance would be appreciated.

    Hello,
    When you give a user permission to run a stored procedure, everything on that procedure but Dynamic SQL will be executed
    without evaluating user permissions on the objects the stored procedure deals with.
    On the link I provided above, you will see how to provide permissions to stored procedures. Try creating database roles, add user to database roles, then assign permissions to database roles.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Weird: Backup file works fine from the network but not when moved into sandbox environment

    We have a valid full backup of a database. We know it is valid, we have restored it twice from the network with no problems, but we do not have access to the network location from our sandbox environment.
    The .bak file is sizable at about 9GB. The .bak file resides on our internal network, in a SAN drive. No problems there. When we copy the file from there into a sandbox environment to attempt the restore in the sandbox environment it gets corrupted. We've
    tried three different times and all three different times it gets corrupted. First time we copied the file over to the sandbox the restore went up to 50% and failed. The second time we copied the file again and attempted the restore again it failed at 70%.
    The third time it failed at 60%. The error message we get during the restore is "...Read on ... failed: 13(The data is invalid) Msg 3013, Level 16, State 1, Line 1 Restore database is terminating abnormally."
    Now some background here. To move the file our network team is doing this: they have this .vmdk file that they mount out in our production environment (which has access to the network location where the .bak file is), copy the file into the drive, then move
    the .vmdk file into the sandbox environment(which does not have access to the network location), mount the drive in the sandbox environment, and then I have access to the .bak file from within the sandbox environment.
    Something in the process of using the .vmdk file to move the .bak file from production into the sandbox is causing the file to get corrupted.
    Any thoughts? Has anyone seen this before? Any idea? TIA,
    Raphael
    rferreira

    Original server that generated the .bak file:
    Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) 
    Jun 11 2012 16:41:53 
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
    Server where I CAN restore the .bak file from the network location (not inside the sandbox):
    Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64) 
    Dec 28 2012 20:23:12 
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
    Server inside the sandbox where I get the error when attempting to restore the backup:
    Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64)   Jun 11 2012 16:41:53   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor) 
    rferreira

  • Procedure runs in SQL Plus, but not when called from my Oracle Form

    Hi. I have this code to send an email alert as the user updates a record on my base table from my Oracle Form. I use dbms_scheduler so that it's submitted as a background job and so the email processing does not delay my Oracle Form from saving quickly. If I submit this code in SQL Plus it executes and I receive the email as expected.
    begin
    dbms_scheduler.create_job ( 
         job_name            => 'IMMEDIATE_JOB', 
         job_type            => 'PLSQL_BLOCK', 
         job_action          => 'begin TTMS.dropperVacationConflict_Notify (62547, ''01-SEP-11'', ''02-SEP-11''); end;', 
         number_of_arguments => 0, 
         start_date          => sysdate +1/24/59, -- sysdate + 1 minute 
         enabled             => TRUE, 
         auto_drop           => TRUE, 
         comments            => 'Immediate, one-time run');
    end;However if I submit this code from a Post-Update trigger in my form the code runs without error, but my email is never received (the same parameter values would be passed to this trigger):
    begin
    -- Submit the email notification in the background so as to not slow down the screen while saving.   
    dbms_scheduler.create_job ( 
         job_name            => 'IMMEDIATE_JOB', 
         job_type            => 'PLSQL_BLOCK', 
         job_action          => 'begin TTMS.dropperVacationConflict_Notify (:dropper_vacations.dropper_id, :dropper_vacations.begin_dt, :dropper_vacations.end_dt); end;', 
         number_of_arguments => 0, 
         start_date          => sysdate +1/24/59, -- sysdate + 1 minute 
         enabled             => TRUE, 
         auto_drop           => TRUE, 
         comments            => 'Immediate, one-time run');
    end;     Any ideas why this might be happening?

    Wow, so I changed the two procedures so that I'm only passing in one number parameter and one char parameter...
    CREATE OR REPLACE procedure TTMS.job_vacationconflict_notify (p_dropper_id number, p_other char) IS
    CREATE OR REPLACE PROCEDURE TTMS.dropperVacationEmailURL_new (in_dropper_id number, in_other char) ISIf I execute it like this it works and I get the email:
    TTMS.job_vacationconflict_notify(62547, 99999);or like this it works and I get the email:
    TTMS.job_vacationconflict_notify(62547, '99999');But if I execute it like this (I get no errors) the email is not sent:
    TTMS.job_vacationconflict_notify(62547, 'ababa');So this problem really has nothing to do with date formats. It seems to have to do with whether parameter two has characters in it!!! What the heck.
    Any ideas on this?
    Here is the procedure I'm calling:
    CREATE OR REPLACE procedure TTMS.job_vacationconflict_notify (p_dropper_id number, p_other char) IS
    begin
      dbms_scheduler.create_job ( 
         job_name            => 'IMMEDIATE_JOB', 
         job_type            => 'PLSQL_BLOCK', 
         job_action          => 'begin TTMS.dropperVacationemailurl_new ('||p_dropper_id||','||p_other||'); end;', 
         number_of_arguments => 0, 
         start_date          => sysdate +1/24/59, -- sysdate + 1 minute 
         enabled             => TRUE, 
         auto_drop           => TRUE, 
         comments            => 'Immediate, one-time run');
    end;
    /And the above procedure is calling this procedure which should be sending the email alert:
    CREATE OR REPLACE PROCEDURE TTMS.dropperVacationEmailURL_new (in_dropper_id number, in_other char) IS
          myguid varchar2(15):=null;
          pcm_contact varchar2(3):=null;
          guid_contact varchar2(15):=null;
          conflict_cnt number(8):=0;
          -- Various declarations
          PSENDER VARCHAR2(200);            --  From
          PRECIPIENT VARCHAR2(200);         --  To
          P_CC_RECIPIENT VARCHAR2(200);     --  CC
          P_BCC_RECIPIENT VARCHAR2(200);    --  BCC
          PSUBJECT VARCHAR2(200);           --  Subject
          PMESSAGE VARCHAR2(6000);          --  Message Body
          PPARAMETER NUMBER;                --  Parameter Value
          guid_valid varchar2(15);          --  Used to grab the validation value of
          -- Grab name details of e-mail targets
          cursor targets is
          select guid, initcap(first_name) first_name, initcap(first_name)||' '||initcap(last_name) fullname
          from pwc_employee
          where upper(guid) = upper(guid_contact);
    BEGIN
            select count(*)
            into conflict_cnt
            from dropper_bundle_assign
            where
                dropper_sched = in_dropper_id and
                trunc(sched) <> '31-DEC-29' AND        
                trunc(sched) between '01-SEP-11' and '02-SEP-11' and
                trunc(sched) > trunc(sysdate);
            select distinct pcm
            into pcm_contact
            from dropper_bundle_assign
            where
                  dropper_sched = in_dropper_id and
                  trunc(sched) <> '31-DEC-29' AND        
                  trunc(sched) between '01-SEP-11' and '02-SEP-11' and
                  trunc(sched) > trunc(sysdate);
            select guid
            into guid_contact
            from pwc_employee
            where initials = pcm_contact;
        -- Ensure required parameters have been passed
        if guid_contact is not null
           and in_dropper_id is not null then
               Begin
                    select guid
                    into guid_valid
                    from pwc_employee
                    where upper(guid) = upper(guid_contact);
               Exception
                    when no_data_found then
                    raise_application_error(-20000,'Invalid Recipient.  Please check the employee table.  Please try again.');
               End;
               -- In the event there are multiple targets then we will loop thru and send individual emails
               for thisone in targets loop
                    PSENDER := lower(user)||'@us.ibm.com';
                    PRECIPIENT := lower(thisone.guid)||'@us.ibm.com';
                    P_CC_RECIPIENT := lower(thisone.guid)||'@us.ibm.com';
                    P_BCC_RECIPIENT := 'ssbuechl'||'@us.ibm.com';
                    PPARAMETER := TO_NUMBER(lower(in_dropper_id));
                    PSUBJECT := 'TEST: Dropper Vacation '||in_other||' Conflict Notification for dropper '||in_dropper_id||' - Action Required';
                    PMESSAGE := thisone.first_name||'-<br><br>There is an induction conflict due to a new or updated dropper vacation.<br><br>Click here to the dropper''s vacation conflicts: <u><a href="http://9.35.32.205:7777/forms/frmservlet?config=TTMSMENU&form=dropper_vacations&otherparams=p_dropper='||PPARAMETER||'">Dropper Id: '||PPARAMETER||'</a></u> (note: use your Oracle credentials when prompted for log-on information).<br><br>Thanks.';
                    SEND_MAIL ( PSENDER, PRECIPIENT, P_CC_RECIPIENT, P_BCC_RECIPIENT, PSUBJECT, PMESSAGE );  -- Procedure to physically send the e-mail notification
               end loop;
        else
              raise_application_error(-20001,'Recipient and Parameter Value are required. Please try again.');
        end if;
    exception
        when no_data_found then
             raise_application_error(-20002,'Note: Email will not be sent because no PCM was identified as the manager or the PCM does not have a record in the Employee table.  See ITS for assistance.');
         when too_many_rows then
             raise_application_error(-20003,'Note: Email will not be sent because multiple PCMs manage this dropper. Please notify each PCM manually.');
    END dropperVacationEmailURL_new;
    /Edited by: sharpe on Aug 17, 2011 4:38 PM
    Edited by: sharpe on Aug 17, 2011 5:03 PM

  • TS2771 why are we hearing only background sounds when using earbuds?  works fine on ipod dock but not when earbud plug is pushed all the way in, it works when just barely pushed in.  please someone tell me it is a "cheap" fix.  :)

    Just wanna know if anybody knows what might be wrong???  earbuds work but sounds like background music only when plug is in all the way.  just barely in and it sounds normal. also works fine on the dock. 
    any input will be appreciated.  the teenager is having a spasm.

    The headphones work with other devices it would appear the the headphone jack is bad and needs to be replaced.
    A third-party place is a lot less expensive than Apple. Here is one:
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Apple - Support - iPod - Repair pricing

  • Javascript works in Designer preview mode, but not when invoked via process

    I have a fragment consisting of a subform and a text object. The subform has the following Javascript for its initialize event:
    var cars = $data.input.cars.car.all;
    var showMe = false;
    for (var i = 0; i < cars.length; i++) {
    if(cars.item(i).color && cars.item(i).color.value == 'RED')
    showMe = true;
    break;
    if(!showMe) {
    this.presence = 'hidden';
    The code is supposed to loop through all my input XML data's cars, see if each car has a color element, and if so, see if the color is RED. If any of the cars have a color of RED, the fragment should be visible. Otherwise, it should be hidden.
    The Javascript works fine when I preview the fragment in Designer using a sample XML input file with no color element (i.e. the text in the fragment is hidden).
    The Javascript works fine in my main document (which has the fragment included in it) when in preview mode in Designer.
    The Javascript does not work when I invoke my process in LiveCycle server. I pass in data that has 1 car without a color element, and for some reason my fragment is visible.
    Is there something wrong with my Javascript? Is this the wrong way to check to see if an XML element is present? Is something else wrong?
    Any help would be appreciated!
    Thanks,
    Andy

    I guess a more appropriate question might be:<br /><br />How can I tell if my XML input data does or does not contain an element?  Let's say I have<br /><br /><input><br />  <cars><br />   <car><br />     <make>VW</make><br />   </car><br />  </cars><br /></input><br /><br />How can I use Javascript to safely determine if the car has a <color> element?

  • Blank page generated from export to pdf but not when sent to viewer

    I have a report where I am suppressing a subreport when no data is found and it works correctly when sending it directly to the CrystalReportViewer.  However if I Export it directly to a pdf it is creating a blank page.  Can someone please tell me how to fix this issue?

    Not enough info, need version and patch level.

  • All of a sudden, files are brown in Lightroom, but not when exported or viewed in Bridge.

    Look at the Histogram. The color layer on top is usually gray tones (not brown). The thumbnails are white dishes on white. As a yesterday, all the images displayed correctly. I opened LR4 today to this. I have not changed or updated my OS since.
    I had to export some images for a client today. I already did touchups. When export them, they look perfect. I also viewed all the photos in Bridge - color is correct. Any thoughts? Thank you.

    Corrupt Monitor Profile. If you calibrate, then recalibrate. If you don't calibrate (you should), change the monitor profile temporarily to sRGB, which will fix things until you get a proper calibration done.

  • Reports work in Crystal Server XI, but not in XI Rel 2.

    Hello All. <br><br>
    We have recently migrated Crystal Reports Server from 11.0 to 11.5 (Release 2).
    While most of the reports work okay, there are some that generate an error message when we try to run them from Infoview or the Central Management Console.  They work okay on the old server, and in Developer XI:-
    <br><br>
    CrystalReportViewer<br>
    Cannot determine the queries necessary to get data for this report. Failed to retrieve data from the database. Error in File C:\WINDOWS\TEMP\{D7C16401-7B2A-4A95-AAAF-B6C16BEE11A8}.rpt: Failed to retrieve data from the database.
    ERROR: Cannot determine the queries necessary to get data for this report. Failed to retrieve data from the database. Error in File C:\WINDOWS\TEMP\{D7C16401-7B2A-4A95-AAAF-B6C16BEE11A8}.rpt: Failed to retrieve data from the database.
    <br><br>
    I've compared some of the reports, and the only difference I can see between them is, the number of Oracle SQL statements which are used.  All the reports I've checked, that don't work; have five SQL statements.  Also, when I chopped out a few fields that are used by the lookups, the report worked (this removes one the SQL statements).
    <br><br>
    Are there any changes that I need to make to web.config, machine.config or the Oracle driver settings?
    <br><br>
    I've tried searching the forums, but cannot find the same sort of problem.  (Originally, a lot of the reports were not working, but after checking the forums, I was able to change a timeout in web.config, so that was very helpful, thanks).
    <br><br>
    Thanks for looking.  I'd be really grateful for any help.
    <br><br>
    Report doesn't work<br>
    SELECT "STMAOS_Course"."ACAD_PERIOD", "STMAOS_Course"."AOS_CODE", "STMAOS_Course"."AOS_PERIOD", "STMAOS_Course"."STAGE_IND", "STCSTATD"."FULL_DESC", "STCSTATD"."AOS_TYPE", "STMAOS_Course"."STAGE_CODE", "STMAOS_Course"."ATTEND_MODE", "STCSTATD"."DEPT_CODE", "STACREDT"."APL_CREDITS", "STCSTATD"."AOS_CODE", "STMAOS_Course"."STUDENT_ID"
    FROM   ("QLSDBA"."STMAOS" "STMAOS_Course" LEFT OUTER JOIN "QLSDBA"."STACREDT" "STACREDT" ON ((("STMAOS_Course"."ACAD_PERIOD"="STACREDT"."ACAD_PERIOD") AND ("STMAOS_Course"."AOS_CODE"="STACREDT"."AOS_CODE")) AND ("STMAOS_Course"."AOS_PERIOD"="STACREDT"."AOS_PERIOD")) AND ("STMAOS_Course"."STUDENT_ID"="STACREDT"."STUDENT_ID")) INNER JOIN "QLSDBA"."STCSTATD" "STCSTATD" ON "STMAOS_Course"."AOS_CODE"="STCSTATD"."AOS_CODE"
    WHERE  "STMAOS_Course"."ACAD_PERIOD"='09/10' AND "STMAOS_Course"."STAGE_IND"='E' AND "STCSTATD"."AOS_TYPE"='C' AND ("STMAOS_Course"."STAGE_CODE"='E1RF' OR "STMAOS_Course"."STAGE_CODE"='EXAM' OR "STMAOS_Course"."STAGE_CODE"='FULL' OR "STMAOS_Course"."STAGE_CODE"='FULL2' OR "STMAOS_Course"."STAGE_CODE"='FULL3' OR "STMAOS_Course"."STAGE_CODE"='FULLE' OR "STMAOS_Course"."STAGE_CODE"='FULLR' OR "STMAOS_Course"."STAGE_CODE"='PROV') AND "STMAOS_Course"."ATTEND_MODE"='02' AND "STCSTATD"."DEPT_CODE"='A'
    ORDER BY "STMAOS_Course"."ACAD_PERIOD", "STMAOS_Course"."AOS_CODE", "STMAOS_Course"."AOS_PERIOD"
    <br><br>
    select * from qlsdba.STSCMC10
    where mapping_id = '22007042'
    <br><br>SELECT "STMBIOGR"."STUDENT_ID", "STMBIOGR"."FORENAME", "STMBIOGR"."SURNAME", "STFSTFEE"."TOTAL_FEE", "STMENDET"."DDL_FIELD2", "STMENDET"."AOS_PERIOD", "STMENDET"."AOS_CODE", "STMENDET"."ACAD_PERIOD", "STMENDET"."STUDENT_ID"
    FROM   "QLSDBA"."STMBIOGR" "STMBIOGR" CROSS JOIN ("QLSDBA"."STMENDET" "STMENDET" LEFT OUTER JOIN "QLSDBA"."STFSTFEE" "STFSTFEE" ON ((("STMENDET"."ACAD_PERIOD"="STFSTFEE"."ACAD_PERIOD") AND ("STMENDET"."STUDENT_ID"="STFSTFEE"."STUDENT_ID")) AND ("STMENDET"."AOS_CODE"="STFSTFEE"."AOS_CODE")) AND ("STMENDET"."AOS_PERIOD"="STFSTFEE"."AOS_PERIOD"))
    ORDER BY "STMBIOGR"."STUDENT_ID"
    <br><br>
    select * from QLDBA.CMPGENCD
    where mod_id = 'SAS'
    and category_id = 'DDL_FIELD2'
    <br><br>
    SELECT "STCSTDET"."COLL_SGEN2", "STCSTDET"."AOS_CODE"
    FROM   "QLSDBA"."STCSTDET" "STCSTDET"
    WHERE  "STCSTDET"."COLL_SGEN2"='U'
    <br><br><br>
    Report Works okay<br>
    SELECT "STMAOS_Module"."AOS_CODE", "STMAOS_Course"."ACAD_PERIOD", "STMAOS_Course"."AOS_CODE", "STMAOS_Course"."AOS_PERIOD", "STMAOS_Course"."STAGE_IND", "STCSTATD"."FULL_DESC", "STCSTATD"."DEPT_CODE", "STCSTATD"."AOS_TYPE", "STMAOS_Module"."STAGE_CODE", "STMAOS_Course"."STAGE_CODE", "STMAOS_Course"."ATTEND_MODE", "STACREDT"."APL_CREDITS", "STMAOS_Module"."STUDENT_ID", "STMAOS_Module"."ACAD_PERIOD", "STMAOS_Module"."AOS_PERIOD", "STCSTATD"."AOS_CODE"
    FROM   (("QLSDBA"."STMAOS" "STMAOS_Course" LEFT OUTER JOIN "QLSDBA"."STACREDT" "STACREDT" ON ((("STMAOS_Course"."ACAD_PERIOD"="STACREDT"."ACAD_PERIOD") AND ("STMAOS_Course"."AOS_CODE"="STACREDT"."AOS_CODE")) AND ("STMAOS_Course"."AOS_PERIOD"="STACREDT"."AOS_PERIOD")) AND ("STMAOS_Course"."STUDENT_ID"="STACREDT"."STUDENT_ID")) INNER JOIN "QLSDBA"."STMAOS" "STMAOS_Module" ON ((("STMAOS_Course"."STUDENT_ID"="STMAOS_Module"."STUDENT_ID") AND ("STMAOS_Course"."ACAD_PERIOD"="STMAOS_Module"."ACAD_PERIOD")) AND ("STMAOS_Course"."AOS_CODE"="STMAOS_Module"."RAOSCD_LINK")) AND ("STMAOS_Course"."AOS_PERIOD"="STMAOS_Module"."RPROCD_LINK")) INNER JOIN "QLSDBA"."STCSTATD" "STCSTATD" ON "STMAOS_Course"."AOS_CODE"="STCSTATD"."AOS_CODE"
    WHERE  "STMAOS_Course"."ACAD_PERIOD"='09/10' AND "STMAOS_Course"."STAGE_IND"='E' AND "STCSTATD"."AOS_TYPE"='C' AND ("STMAOS_Module"."STAGE_CODE"='E1RF' OR "STMAOS_Module"."STAGE_CODE"='EXAM' OR "STMAOS_Module"."STAGE_CODE"='FULL' OR "STMAOS_Module"."STAGE_CODE"='FULL2' OR "STMAOS_Module"."STAGE_CODE"='FULL3' OR "STMAOS_Module"."STAGE_CODE"='FULLE' OR "STMAOS_Module"."STAGE_CODE"='FULLR' OR "STMAOS_Module"."STAGE_CODE"='PEND' OR "STMAOS_Module"."STAGE_CODE"='PROV' OR "STMAOS_Module"."STAGE_CODE"='RECS') AND ("STMAOS_Course"."STAGE_CODE"='E1RF' OR "STMAOS_Course"."STAGE_CODE"='EXAM' OR "STMAOS_Course"."STAGE_CODE"='FULL' OR "STMAOS_Course"."STAGE_CODE"='FULL2' OR "STMAOS_Course"."STAGE_CODE"='FULL3' OR "STMAOS_Course"."STAGE_CODE"='FULLE' OR "STMAOS_Course"."STAGE_CODE"='FULLR' OR "STMAOS_Course"."STAGE_CODE"='PROV') AND "STCSTATD"."DEPT_CODE"='A' AND "STMAOS_Course"."ATTEND_MODE"<>'01'
    ORDER BY "STMAOS_Course"."ACAD_PERIOD", "STMAOS_Course"."AOS_CODE", "STMAOS_Course"."AOS_PERIOD"
    <br><br>
    select * from qlsdba.STSCMC10
    where mapping_id = '22007042'
    <br><br> SELECT "STMBIOGR"."STUDENT_ID", "STMBIOGR"."FORENAME", "STMBIOGR"."SURNAME", "STCASDET"."CREDIT_NUM", "STCSESSD"."AOS_TYPE", "STCSTDET"."COLL_SGEN2", "STRDEPRT"."DESCRIPTION", "STCSTDET"."AOS_CODE", "STRDEPRT"."DEPT_CODE", "STCASDET"."AOS_PERIOD", "STCASDET"."AOS_CODE", "STCASDET"."ACAD_PERIOD", "STCSESSD"."AOS_PERIOD", "STCSESSD"."ACAD_PERIOD", "STCSESSD"."AOS_CODE"
    FROM   ((("QLSDBA"."STCSTDET" "STCSTDET" CROSS JOIN "QLSDBA"."STRDEPRT" "STRDEPRT") CROSS JOIN "QLSDBA"."STCASDET" "STCASDET") CROSS JOIN "QLSDBA"."STCSESSD" "STCSESSD") CROSS JOIN "QLSDBA"."STMBIOGR" "STMBIOGR"
    WHERE  "STCSESSD"."AOS_TYPE"='M' AND "STCSTDET"."COLL_SGEN2"='U'
    ORDER BY "STMBIOGR"."STUDENT_ID"
    <br><br>

    Post Author: Argan
    CA Forum: .NET
    Honestly I have never used the server explorer for anything, so I am not sure what is needed for that to work.
    You need to install the Enterprise SDK on your dev box.
    Do a custom server install on your dev machine, unchecking everything except for the .NET SDK and Help files.

  • Load swf works in Publish Preview but not when published

    Hi Folks,
    I having a problem where im trying to load two 1mb SWF movies into my Flash piece. It works fine in Publish Preview but not when I finally publish. I get this error in IE:
    SecurityError: Error #2000: No active security context.
    I have googled around and there is some talk online of a hack where by you get a timeout to overcome this. However im not so technical do I dont really know how to do this to my code in AS3. My code at the moment is below.
    Any help would be much appreciated and rewarded with Karma
    movieClip_12.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_9);
    var fl_Loader_9:Loader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_9:Boolean = true;
    function fl_ClickToLoadUnloadSWF_9(event:MouseEvent):void
    if(fl_ToLoad_9)
      fl_Loader_9 = new Loader();
      fl_Loader_9.load(new URLRequest("search.swf"));
      addChild(fl_Loader_9);
    else
      fl_Loader_9.unload();
      removeChild(fl_Loader_9);
      fl_Loader_9 = null;
    // Toggle whether you want to load or unload the SWF
    fl_ToLoad_9 = !fl_ToLoad_9;
    movieClip_14.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_10);
    var fl_Loader_10:Loader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_10:Boolean = true;
    function fl_ClickToLoadUnloadSWF_10(event:MouseEvent):void
    if(fl_ToLoad_10)
      fl_Loader_10 = new Loader();
    fl_Loader_10.load(new URLRequest("refunds.swf"));
      addChild(fl_Loader_10);
    else
      fl_Loader_10.unload();
      removeChild(fl_Loader_10);
      fl_Loader_10 = null;
    // Toggle whether you want to load or unload the SWF
    fl_ToLoad_10 = !fl_ToLoad_10;

    I think this is either a problem with my site preLoader or my external .swf Loader. I was checking out the bandwith profiler and saw something weird and I wondered if anyone could explain...I've added a picture. I have a blank frame on only my actions layer to export classes to and it seems that frame 2 is "bleeding" into frame 1. Could this be my problem? Why would this happen? Thanks

  • Why will a query work in SQL Developer but not in Apex?

    Here's a good one. I created a dynamic LOV with the following query.
    select
    e.DESCR d,
    ee.ENTRD_EVNT_SK r
    from
    PT_EVNT_IN_DIV eid,
    PT_ENTRD_EVNT ee,
    PT_EVNT e
    where ee.PGNT_SK = :PGNT_SK
    and ee.CNTSNT_SK = :CNTSNT_SK
    and ee.EVNT_IN_DIV_SK = eid.EVNT_IN_DIV_SK
    and eid.EVNT_SK = e.EVNT_SK
    and ee.ENTRD_EVNT_SK not in
    (select js.ENTRD_EVNT_SK
    from PT_JDG_SCR js
    where js.JDG_SK = :JDG_SK
    and js.PGNT_SK = :ai_pgnt_sk
    and js.CNTSNT_SK = :CNTSNT_SK)
    order by 1
    The query works fine in SQL Developer, but Apex gives the following error when compiling it in the LOV editor.
    "1 error has occurred
    - LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query."
    I tried rearranging the entries in the From clause, but that didn't do any good.
    Do you see what I can do to make Apex accept it?
    Thanks,
    Kim

    Kim
    Kim2012 wrote:
    select
    e.DESCR d,
    ee.ENTRD_EVNT_SK r
    from
    PT_EVNT_IN_DIV eid,
    PT_ENTRD_EVNT ee,
    PT_EVNT e
    where ee.PGNT_SK = :PGNT_SK
    and ee.CNTSNT_SK = :CNTSNT_SK
    and ee.EVNT_IN_DIV_SK = eid.EVNT_IN_DIV_SK
    and eid.EVNT_SK = e.EVNT_SK
    and ee.ENTRD_EVNT_SK not in
    (select js.ENTRD_EVNT_SK
    from PT_JDG_SCR js
    where js.JDG_SK = :JDG_SK
    and js.PGNT_SK = :ai_pgnt_sk
    and js.CNTSNT_SK = :CNTSNT_SK)
    order by 1
    The column named ENTRD_EVNT_SK is used twice in a select. Once in the main select and once in the inline query.
    The validation maybe choking on that.
    Try giving the column in the inline query an alias and see if that helps.
    Nicolette

  • Gmail question.  I'm getting an error message that states my username or password are incorrect.  I haven't changed anything and the gmail is working fine on the mac book.  The mail function worked yesterday on the iphone but not today - any solutions??

    Gmail question.  I'm getting an error message that states my username or password are incorrect.  I haven't changed anything and the gmail is working fine on the mac book.  The mail function worked yesterday on the iphone but not today - any solutions??

    Try Restarting / rebooting  your Mac before doing anything more drastic..
    S.

  • Sound through hdmi to my tv works but not when watching video online like 4OD

    the sound through hdmi to my tv works with music and videos I have downloaded, but not when watching video online like 4OD and youtube.
    How can I get it to work?

    Ok so I happened to figure it out while on the phone to apple support. Even though the guy was very nice, I think I knew more than him! He was explaining very basic resolution principles I played about. I had the second option in displays resolution. All I did was unplug the HDMI cable, click on 'best for display' then plugged the HDMI in and my resolution on the normal monitor changed to the normal blue, then went black momentarily and then changed to a strange resolution but another window appeared that said SONY BRAVIA HDMI at the top! Hey presto! Don't know why it didn't do it yesterday - I probably left the HDMI cable in or something! Oh well. Problem solved!

Maybe you are looking for