Select works in SQL Workshop, but not as an LOV

I want all venues to appear in my LOV
With their affiliated Performing Arts Center, if one exists.
I get the perfect results when I run it in SQL Workshop.
When I try to create the LOV, I'm told it's invalid, because it includes an in-line query and the first FROM clause must not belong in the in-line query.
Not quite sure what it means, but I'm sure I don't know how to fix it...
SELECT
v.VENUE_NAME, p.pac_name d,
v.VENUE_ID r
from pac p, VENUES v
where v.venue_pacid = p.pac_id(+)
thanks
Marion

I'm told it's invalid, because it includes an in-line query and the first FROM clause must not belong in the in-line query.Think that's just an example of why a query might be invalid, as this query clearly doesn't have that.
Jari's right, it has to only return 2 columns, so the venue and PAC values need merged somehow, like:
SELECT
         v.VENUE_NAME || nvl2(p.pac_name, ' (', null) || p.pac_name || nvl2(p.pac_name, ')', null) d,
         v.VENUE_ID r
from     pac p, VENUES v
where    v.venue_pacid = p.pac_id (+)

Similar Messages

  • Select works with SQL Server but not with Oracle!

    Hello
    this select works on SQL Server correct, but it don't work on Oracle!
    Can someone help me?
    Select * from Tabelle, Tabelle as XXX Where Tabelle.ID=XXX.IDTabelle
    Thanks
    Thomas

    Hi,
    These are the things which I have noticed, which wont work in Oracle ..
    Table As XXX ?? Are you giving alias name for the table .. The syntax which you have givne doesnt work in Oracle
    Regards

  • SQL works in SQL workshop but not in APEX

    Hi All,
    I'm trying some sample sql to get around the 32k limit in APEX and even though the sql works in SQLWorkshop, when I use it as a source for textarea object in APEX I get an error. Here's the SQL:
    declare
    l_code clob := empty_clob;
    l_clob_source2 clob;
    offset int:=1;
    begin
         select replace("CHNL_PRTNR_XML_TRAN"."XML_TRAN", '<', '<') into l_code from "CHNL_PRTNR_XML_TRAN" where "CHNL_PRTNR_XML_TRAN"."VITRIA_DROP_OFF_SEQ_ID" = :P2_TRAN_ID;
    loop
    l_clob_source2 := dbms_lob.substr(l_code,4000,offset);
    htp.prn(l_clob_source2);
    exit when offset + 4000 >= nvl(dbms_lob.getlength (l_code),0);
    offset := offset + 4000;
    end loop;
    end;
    Here's the error message I get APEX:
    ORA-06550: line 13, column 17: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; The symbol ";" was substituted for "end-of-file" to continue.
    Error ERR-1019 Error computing item default value: page=2 name=P2_XMLTRAN.

    Try to set it to SQL Query (PL/SQL-Functions Body), then it should work

  • 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

  • Query works in SQL Developer but not in Oracle APEX

    The query below runs and produces the correct result in SQL Developer, but when I try to put it into a PL/SQL process in Apex I get the error shown. There is no semi-colon at the end of the query in APEX.
    The error is:
    ORA-06550: line 10, column 54: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 2, column 1: PL/SQL: SQL Statement ignored ORA-06550: line 11, column 21: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ( begin case declare end exception exit for goto if loop mod null pragma raise return select update while with.
    The query is:
    SELECT *
    FROM
    (SELECT *
    from T3_LEADS
    WHERE
    (SYSDATE - Last_Mailed_Date) > 60 OR Last_Mailed_Date is null
    WHERE MARKET_ID = 'Salt_Lake_City' AND rownum <= 100

    That is because when you run a SQL in SQL*Plus or SQLDeveloper the output is displayed on the screen, but in Apex you need to select those values into variables so you can do something with the data.
    delcare
      v_emp_id    employee.emp_id%type;
    begin
      select emp_id
        into v_emp_id
        from employee
      where lname = 'JOHNSON' and fname = 'BILLY';
      -- Then do something with that data
      if v_emp_id between 1 and 10 then
      end if;
    end;Probably a bad SQL for an example. For your SQL though, you are selecting * which you would be able to select into a rowtype variable, but you are probably going to start having problems like "Exact fetch returns more that one row" since your query will probably return more that one value. In those cases you want to use cursors, and loop through the data one record at a time. You can Google all of that.

  • Select from sys.all_ind_columns works in sql*plus but not in stored proc

    I'm writing a query to find duplicate rows in a temporary table which has no unique index defined before I insert the data into the real table. I'm trying to query the sys.all_ind_columns view for the target table which belongs to a different schema:
    SELECT column_name colnm
    FROM sys.all_ind_columns i
    WHERE i.table_owner = 'SUSDB'
    AND i.index_name LIKE '%LUK'
    AND i.table_name = &tbnm
    ORDER BY i.column_position;
    This works from my GUI interface and returns five rows but when I put it into a stored procedure I get now data returned. I have granted my userid SELECT ANY DICTIONARY authority. What else do I need?

    CREATE OR REPLACE FUNCTION bog_elsa2_leslie.diag_msg_1000_cursor(i_rept_inst IN VARCHAR2,
    i_rept_time_frame IN VARCHAR2,
    i_table_name IN VARCHAR2,
    i_column_name IN VARCHAR2,
    i_domain_table IN VARCHAR2,
    i_domain_column IN VARCHAR2,
    i_domain_code IN VARCHAR2,
    i_trace_flg IN NUMBER := 0)
    RETURN VARCHAR2 IS
    cursor_stg VARCHAR2(4000);
    || File name: diag_msg_1000_cursor.fnc
    || Created by: ELSA.LESLIE
    || Created on: 20071215 4:08:20 AM
    || Purpose: Build the string that will retrieve PRIKEY and CONTENTS
    || from the target table, university, time frame, submission
    || and table passed as parameters for the 1000 dignostic.
    || Diagnostic 1000:
    || Validate that the table's logical unique key constraint
    || is not violated.
    || In: ***
    || *** ALL INPUT VARIABLES MUST BE DECLARED EVEN IF THEY ARE
    || *** NOT USED IN THIS PARTICULAR FUNCTION BECAUSE THE
    || *** EDIT_ANY_TABLE PROCEDURE CALLS THE FUNCTION IN AN
    || *** EXECUTE IMMEDIATE STATEMENT THAT REQUIRES THE 'USING'
    || *** PHRASE BE PART OF THE CALLING PROGRAM RATHER THAN BEING
    || *** INCLUDED IN THE RETURNED CURSOR_STG.
    || ***
    || i_rept_inst = reporting institution (eg. UF, FSU)
    || i_rept_time_frame = reporting time frame (eg., 200608, 20062007)
    || i_table_name = target table to be edited (eg. BUILDINGS, ENROLLMENTS)
    || i_trace_flg is optional and is used for debugging (values: TRUE/FALSE)
    || [not used] i_column_name = eg. ALTER_YR, BASE_YR
    || [not used] i_domain_table = the name of the domain table containing valid values
    || [not used] (eg. DOMAIN_MAIN_VALUES, DOMAIN_UNIV)
    || [not used] i_domain_column = the name of the column in the domain table that
    || [not used] contains the valid values (eg. CODE, OPEID_CD)
    || [not used] i_domain_code = the 5-digit domain code (eg. 10021, 01045)
    || Out: cursor_stg = executable SQL to return error row information
    || Dependencies: Logical Unique Key for tables must be have the string 'LUK'
    || postpended to it's name.
    || Exceptions: none
    || Copyright: BOG 2007
    || ***************************************************
    || Modifications:
    || Userid - Date - Modification description
    -- Constants and special assignments
    rept_inst VARCHAR2(4) := upper(i_rept_inst);
    rept_time_frame VARCHAR2(8) := i_rept_time_frame;
    table_name VARCHAR2(30) := upper(i_table_name);
    column_name VARCHAR2(30) := upper(i_column_name);
    domain_table VARCHAR2(30) := upper(i_domain_table);
    domain_column VARCHAR2(30) := upper(i_domain_column);
    domain_code VARCHAR2(5) := upper(i_domain_code);
    trace_flg NUMBER := i_trace_flg;
    file_name VARCHAR2(100) := 'diag_msg_1000_cursor: ';
    unq_cols VARCHAR2(1000) := NULL;
    unq_contents VARCHAR2(4000) := NULL;
    unq_where VARCHAR2(4000) := NULL;
    -- Accounting of process n/a all contained in the for loop
    row_num NUMBER := 0;
    -- Object types - n/a
    -- Cursors
    CURSOR ix_cols_curr(tbnm VARCHAR2 := table_name) IS
    SELECT column_name colnm
    FROM sys.all_ind_columns i
    WHERE i.table_owner = 'SUSDB'
    AND i.index_name LIKE '%LUK'
    AND i.table_name = tbnm
    ORDER BY i.column_position;
    -- Cursor variables n/a
    -- errors and exceptions
    sql_code NUMBER;
    sql_errm VARCHAR2(255);
    BEGIN
    -- output trace information if requested
    IF trace_flg = 1
    THEN
    dbms_output.put_line(file_name || 'rept_inst = ' || rept_inst);
    dbms_output.put_line(file_name || 'rept_time_frame = ' || rept_time_frame);
    dbms_output.put_line(file_name || 'table_name = ' || table_name);
    dbms_output.put_line(file_name || 'column_name = ' || column_name);
    dbms_output.put_line(file_name || 'domain_table = ' || domain_table);
    dbms_output.put_line(file_name || 'domain_column = ' || domain_column);
    dbms_output.put_line(file_name || 'domain_code = ' || domain_code);
    END IF;
    -- ix_cols_loop builds a string of the columns contain in the
    -- logical unique key which is then later incorporated into the
    -- select cursor returned to the calling program.
    FOR this_col IN ix_cols_curr(table_name)
    LOOP
    <<ix_cols_loop>>
    -- output trace information if requested
    IF trace_flg = 1
    THEN
    row_num := ix_cols_curr%ROWCOUNT;
    dbms_output.put_line(file_name || 'row=' || row_num ||
    'column_name=' || this_col.colnm);
    END IF;
    IF unq_cols IS NOT NULL
    THEN
    unq_cols := unq_cols || ', ';
    unq_contents := unq_contents || ', ';
    END IF;
    unq_cols := unq_cols || this_col.colnm;
    unq_contents := unq_contents || q'[']' || this_col.colnm ||
    q'['=]' || this_col.colnm;
    unq_where := unq_where || 'AND tbl.' || this_col.colnm ||
    ' = dups.' || this_col.colnm;
    END LOOP ix_cols_loop;
    IF trace_flg = 1
    THEN
    dbms_output.put_line(file_name || 'unq_cols =' || unq_cols);
    dbms_output.put_line(file_name || 'unq_contents =' || unq_contents);
    dbms_output.put_line(file_name || 'unq_where =' || unq_where);
    END IF;
    cursor_stg := 'SELECT prikey, ' || unq_contents || ' AS contents ' ||
    'FROM univdb.' || table_name || ' tbl, (SELECT ' ||
    unq_cols || ', COUNT(*) FROM univdb.' || table_name ||
    q'[ WHERE rept_inst = ']' || rept_inst || q'[']' ||
    q'[AND rept_time_frame = ']' || rept_time_frame || q'[']' ||
    ' GROUP BY ' || unq_cols || ' HAVING COUNT(*) > 1) dups' ||
    q'[ WHERE tbl.rept_inst = ']' || rept_inst || q'[']' ||
    q'[ AND tbl.rept_time_frame = ']' || rept_time_frame ||
    q'[']' || unq_where;
    -- output trace information if requested
    IF trace_flg = 1
    THEN
    dbms_output.put_line(file_name || 'cursor_stg = ' || cursor_stg);
    END IF;
    RETURN(cursor_stg);
    EXCEPTION
    -- block exception
    WHEN OTHERS THEN
    sql_code := SQLCODE;
    sql_errm := SQLERRM;
    IF trace_flg = 1
    THEN
    dbms_output.put_line(file_name || ' ROW NUM ' || row_num || ' sql code ' ||
    sql_code || ' sql message ' || sql_errm);
    END IF;
    END diag_msg_1000_cursor;

  • SQL statement works with SQL/Plus - but not with ODBC

    Hi all,
    I have a rather copmplex SQL statement:
    BEGIN
    UPDATE ContentDataTable
    SET SYMBOLIC_PATH_PARENT = N'/Test',
    SYMBOLIC_NAME = N'HAWK01.GIF',
    VERSION_NUMBER = 1 +
    SELECT MAX(VERSION)
    FROM
    (SELECT MAX(VERSION_NUMBER) AS VERSION
    FROM ContentDataTable WHERE
    SYMBOLIC_PATH_PARENT = N'/Test' AND
    SYMBOLIC_NAME = N'HAWK01.GIF'
    UNION
    SELECT MAX(VERSION_NUMBER) AS VERSION
    FROM RevisedContentDataTable WHERE
    SYMBOLIC_PATH_PARENT = N'/Test' AND
    SYMBOLIC_NAME = N'HAWK01.GIF'))
    WHERE SYMBOLIC_PATH_PARENT = N'/Test' AND SYMBOLIC_NAME = N'HAWK02.GIF' AND VERSION_NUMBER = 1;
    END;
    It works fine in SQL/Plus or SQL Worksheet and does what it should do ;-)
    But when using it via ADO (ODBC Driver) I get the following error:
    PLS-00103 found 'string' but expected one of the following: 'string'"}
    Any idaes?
    Thanx,
    Christian
    null

    Pardon my ignorance, but what's the significance of the N'<string>' construction? That's not one I'm familar with.
    Justin

  • 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

  • SQL Query works in SQL Developer, but not always in MII

    Hi all,
    I encountered a strange behaviour with a query in MII 12.0.2. Maybe someone has a guess what happens.
    I have created a SQL query which runs against Oracle 10g tables. I have tested the query using SQL Developer, and it throws a couple of lines, depending on the contents of the where clause.
    Next I have copied the query to a MII SQL Query (FixedQuery). However, the output is empty most of the time, without showing any errors. After some testing I got the impression that older data are not displayed, but there is no time or date setting in MII.
    As the SQL Developer always returns rows, I am unsure where to search for the error.
    Regards
    Michael

    Michael,
    I would imagine that you have sub-select statements in your FixedQuery, all which will fall subject to the RowCount property of the query template (SQL defaults to 100), which is issued through the driver and typically honored by the database when returning the data from your request.
    Most of the native database query tools allow you to make unbound query requests with no limit on rows, which would probably account for the difference between SQL Developer and the query template.
    For SQLServer it's ROWCOUNT:  http://msdn.microsoft.com/en-us/library/ms188774.aspx
    For Oracle it's ROWNUM:  http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
    So the answer would be not to make the query template row count some rediculous number, but more appropriately refine the way that the database request is issued.
    Regards,
    Jeremy

  • Why does the query work in SQL Developer, but not in APEX?

    Hi, guys:
    I have a silly question. I have a complicated query, and I tested it successfully with SQL developer, and result is correct. However, when I put it into APEX to generate a report, it always reports no data found. I also know the condition related to "other marks" select list in the where clause part causes this problem. It also looks strange: before I add this condition, everything works OK; after I add this condition, even I do not choose the "other marks" select list, other components do not work neither. I always got no data found result. Could anyone help me on this problem? You can also visit our developing site as http://lsg-solutions.com:8888/apex/f?p=206 to check the problem.
    Thanks a lot
    Sam
    select distinct 'MAP','Detail',so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
    so.date_of_birth as "Date of Birth",
    (select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
    (select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
    (select sc8.description from sor_code sc8 where sc8.code_id=so.hair_color) as "Hair Color",
    (select sc9.description from sor_code sc9 where sc9.code_id=so.eye_color) as "Eye Color",
    replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
    replace(replace(nvl2(sl.physical_address1,sl.physical_address1||' '||sl.physical_city ||' '||sl.physical_county||' '||(select sc4.description from sor_code sc4 where sc4.code_id=sl.physical_state)||' '||sl.physical_zip, 'No Known Address'),'#'),',') as "Physical Address",
    sl.status as "Status",
    sl.jurisdiction as "Jurisdiction",
    to_char(sl.ADDRESS_LATITUDE) as "Address Latitude",to_char(sl.address_longitude) as "Address Longitude",
    to_char(sl.physical_address_latitude) as "Physical Latitude",to_char(sl.physical_address_Longitude) as "Physical Longitude",
    decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
    decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
    rox.status as "Registration Status",
    rox.registration_date as "Registration Date",
    rox.end_registration_date as "End Registration Date"
    from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv
    where rox.offender_id=so.offender_id
    and sllv.offender_id(+)=so.offender_id
    and sl.location_id(+)=sllv.location_id
    and rox.status not in ('Merged')
    and rox.reg_type_id=1
    and upper(rox.status)='ACTIVE'
    and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
    and (((select sc11.description from sor_code sc11 where sc11.code_id=so.race and sc11.description=:P5_SL_RACE) is not null ) or (:P5_SL_RACE is null))
    and (((select sc12.description from sor_code sc12 where sc12.code_id=so.sex and sc12.description=:P5_SL_SEX) is not null ) or (:P5_SL_SEX is null))
    and (((select sc13.description from sor_code sc13 where sc13.code_id=so.hair_color and sc13.description=:P5_SL_HAIR_COLOR) is not null ) or (:P5_SL_HAIR_COLOR is null))
    and (((select sc14.description from sor_code sc14 where sc14.code_id=so.eye_color and sc14.description=:P5_SL_EYE_COLOR) is not null ) or (:P5_SL_EYE_COLOR is null))
    and (( so.offender_id in(select sm.offender_id from sor_code sc15, sor_mark sm, sor_offender so1 where sm.offender_id=so1.offender_id and sc15.code_id=sm.code and sc15.description=:P5_SL_OTHER_MARKS and sm.description is not null)) or (:P5_SL_OTHER_MARKS is null))

    My suggestion would be to put some instrumentation into your query and see what values you are using.. Or even simpler take out ALL the where clauses you can until data starts to sho wup and then add them back in one at a time until you find the culprit..
    My bet would be on any date comparisons you are doing between page items and database columns..
    Thank you,
    Tony Miller
    Dallas, TX

  • Query works in SQL Developer but not in APEX

    The query below runs fine in SQL Developer. I have tried entering it both as a Report Region based on SQL Query and in a Dynamic PL/SQL Region. I get different error messages in each. In the Dynamic PL/SQL Region I get the error that an INTO clause is expected in the select
    statement. When I place it in a Report based on SQL query I get an error that there is an invalid column and to use column alias. What I am attempting to do is add the first query result to the second query result.
    Select (select count(lead_id) from t3_leads
    WHERE
    t3_leads.market_id = 'Gurnee'
    AND (T3_Leads.Last_Campaign = 'Hand Addressed' OR T3_Leads.Last_Campaign is null)
    AND
    ((TRUNC(sysdate) - TRUNC(T3_Leads.LAST_MAILED_DATE)) > 60
    OR T3_Leads.Last_Mailed_Date is null))
    +
    (select count(lead_id)from t3_leads where zip in (select zip from t3_overlap where t3_leads.zip = t3_overlap.zip)
    and
    market_id <> 'Gurnee'
    and ((TRUNC(sysdate) - TRUNC(T3_Leads.LAST_MAILED_DATE)) > 60
    OR T3_Leads.Last_Mailed_Date is null))
    from dual

    Hi,
    you need a column alias for your "result" before the final 'from dual':
    Select (select count(lead_id) from t3_leads
    WHERE
    t3_leads.market_id = 'Gurnee'
    AND (T3_Leads.Last_Campaign = 'Hand Addressed' OR T3_Leads.Last_Campaign is null)
    AND
    ((TRUNC(sysdate) - TRUNC(T3_Leads.LAST_MAILED_DATE)) > 60
    OR T3_Leads.Last_Mailed_Date is null))
    +
    (select count(lead_id)from t3_leads where zip in (select zip from t3_overlap where t3_leads.zip = t3_overlap.zip)
    and
    market_id 'Gurnee'
    and ((TRUNC(sysdate) - TRUNC(T3_Leads.LAST_MAILED_DATE)) > 60
    OR T3_Leads.Last_Mailed_Date is null)) result
    from dualPlease let me know if this works.
    Thanks
    Sandro

  • Can we keep APEX open? Query works in SQL Developer but not Oracle APEX

    Hi Sirini,
    Just my thoughts -- but if one of these is closed, I think it should be the other one {thread:id=2496751} where he's getting the run-around. This one {thread:id=2496754} (APEX!) should be the one kept open. Don't you think?
    My 2 cents,
    Howard

    ..where he's getting the run-around...What runaround? The posters there determined that he needed a semi-colon at the end of the statement and then that he had forgotten the INTO clause. Both are beginner errors. OP has closed the thread as answered and has gone 'off to Google' to learn more about creating SQL queries in PL/SQL. This seems resolved -- at least until he comes back from his Googlequest with another question.

  • Site works in the app, but not in the browser.

    Hello iWeb experts,
    I've got problems.
    Last night I published my site. And while it appears, and functions, properly in my iWeb app, it doesn't do the same in Safari, Firefox, and Internet Explorer.
    Two issues...
    FONTS
    I chose Bellamie, Univers Condensed, and Marydale as my fonts. From reading these forums, I've discovered those won't wysiwyg on other computers if the fonts aren't available and open on them. So my two choices are to make every bit of text a graphic or to use a set of more universal fonts, correct? So my questions are...One, is there a list somewhere of fonts that will work in any browser? And, two, is there a short-cut, or easy way to transform type into a graphic without having to create image files?
    FUNCTIONS
    Here are the functions that work fine in iWeb but have gone haywire in all of the browsers I tested...
    • The type in one nav link appears smaller than all the rest.
    • Some links are active, others are not.
    • Rollover highlighting works on some links, but not others.
    • Most of the rollover links appear in the proper static color, a few do not.
    I've tested these functions on three Macs, one PC, and in the three browsers mentioned above. All of them show the exact same problems. So something must be going wrong with iWebs coding, or my host server musn't like iWeb.
    Any thoughts, suggestions on these two issues? Thanks much for any advice.
    John
    PS - For reference, see: www.johnrunk.com

    Fascinating, Kirk (+he types with one raised eyebrow+).
    QuickTimeKirk wrote:
    When I drag across your page most of your links do not change. The "text" portion of them doesn't change, either. Something is covering them.
    I can see that. But for the life of me, I don't know what could be covering those links. In my app, when I click in the area of the links, the type is the first item selected. Unless, possibly, it could somehow be the faint reflection of my black-and-white image (me & the ground I stand on). Hmmm...
    QuickTimeKirk wrote:
    Single click (outside the boundaries of your page contents) and an "outline" will appear. It shows the image file dimensions and locations.
    This I don't see. An outline? As in "an object outline," or as in "a list of dimensions and locations?" When I click outside my page contents, I get nothing.
    Thanks, QTK. I truly appreciate your troubleshooting here.
    John

  • When I send an email with bcc recipients, the bcc does not show in my sent mail so I can't reference back later who I sent the email to. Worked in Snow Leopard but not in Yosemite. Please advise if their is fix for that.

    When I send an email with bcc recipients, the bcc does not show in my sent mail so I can't reference back later who I sent the email to. Worked in Snow Leopard but not in Yosemite. Please advise if their is fix for that.

    Did you select View->Bcc Address Field from the menu bar?

  • Windows 8.1 64bit. Webcam works with "Camera" app but not with Skype.

    I've spent a few hours googling and trying out various things - all listed below. I give up - any ideas??? OS: Windows 8.1 64bitMemory: 32GBWebCam: Microsoft VX-7000. As per subject - the webcam works with the "Camera" app but not with Skype for desktop or for Modern UI (or the Microsoft Lifecam software for that matter).  Already attempted: 1) Uninstall webcam drivers - download latest from microsoft (Windows 7) and install in Windows 7 compatibility mode.2) Close (from taskmgr) anything that looks like it might use Webcam. 3) Run Skype for Desktop in Windows 7 and 8 compatibility modes None of the above work. In Skype for Modern UI the webcam doesn't appear in the drop down in Settings - so I can't even select it. In Skype for desktops (version 6.11.32.102) the webcam is found but instead of image I get "Can't start video. Try closing other programs that might be using your webcam". I see from a bit of googling that various people seem to have the same issue (i.e. Webcam works with Camera app but not Skype) - so I'm hopeful someone has found a workaround / fix to this issue and I've just not had the googling skills to find it  Thanks, - Matt Symes

    OK - I appear to have resolved the issue.  I restricted my google terms to [vx-7000 site:microsoft.com "windows 8.1"] Which uncovered this article: http://support.microsoft.com/kb/933311 I noticed there were a couple of Windows 7 x64 specific registry settings that were mentioned so I checked these and they weren't as per the article. In fact - one of the Registry Keys was already used by other software "AI Charger+" which is some ValueAdd software that came with my motherboard. I uninstalled AI Charger+, uninstalled LifeCam driver. Reinstalled LifeCam driver in Windows 7 compatibility mode. Still not working. I returned to the registry and noticed the settings still differed from the above article. I corrected them (which involved not just amending Data but having to add new Values). I then disabled and reenabled the LifeCam from dvcmgmt.msc I was then able to get video from the webcam in the Skype for Desktop preview screen.    

Maybe you are looking for

  • Urgent!! My screen has quit on me and I need navigational help!

    A couple days ago the screen of my iPod nano stopped working. It lights up but I can't see anything. I know the iPod itself still works because yesterday I luckily found my way to a nike+ workout. Having joined a challenge, I really need to keep logg

  • My Ipod keeps skipping songs

    While i was listening to my ipod (it was in my pocket) i accidentally knocked the buttons. Now when i play my songs it just skips every song. Only when i press pause it stops but when i press play it starts skipping really fast again. I think this is

  • Call System Command

    I am executing the following command from a abap program to execute a Unix Script. The script executes successfully but it comes back to the program with a sy-subrc return code of -1????? Anyone have any ideas? We are on 4.6c Thank You *&      Form 

  • Lightbox stays dark

    I'm having problems with Muse lightbox functionality in Safari on an iMac. Seems to work OK on my MacBook (Safari too), and OK in Firefox. When a thumbnail is clicked, the screen goes dark as if it's about to show a full image - but just hangs there,

  • HELP ! WiFi Adapter Card for Thinkpad T42 ?

    Hi everyone,  I am new to this site, and new to laptops. I just bought a used IBM LENOVO T42 1,7GHZ 512MB 30 GB HD with XP PRO. I am confussed about the WiFi issue, as it seems like two cards are required (internal / external) to get wireless. I have