Pivot query, phantom behavior, possible bug?

Hi experts,
Oracle 11g
We are trying to construct a binary type table using a pivot query. (I know there will be no 0's, I will fill that in later.)
The query to create this table is as follows:
create table TEMP_T1 as
            select * from (
            select master_id, mbr_id
                    sub_id,
                    NVL(max(den_flag),0) DF,
                    NVL(max(num_flag),0) NF,
                    NVL(sum(den_flag),0) DXF,
                    NVL(sum(num_flag),0) NXF
            from MEM_SUM
            group by master_id, mbr_id,
                    sub_id
            pivot ( max(DF) D_FLAG,
                      max(NF) N_FLAG,
                      sum(DXF) D_COUNT,
                      sum(NXF) N_COUNT
                      FOR sub_id in
                    ( 'MEAS-1' AS "MEAS1",'MEAS-2' AS "MEAS2",'MEAS-3' AS "MEAS3",'MEAS-4' AS "MEAS4"))I am seeing unusual results when I run this query, and am unsure why. Wanted to get some thoughts.
First issue:
Although the query selects master_id and mbr_id, I only get master_id with the pivoted results (when it should be master_id, mbr_id & pivot results). Not sure why.
Second issue:
And this is where it gets even more strange, if I
1) do something to the code to make it have a syntax problem, re-run, it will fail, naturally.
then
2) fix the syntax back to the original query above, it will run and return master_id, mbr_id & the pivoted results.
Has anyone encountered such a strange issue before? Any suggestions on a solution welcome.
Edited by: chris001 on Feb 22, 2013 8:09 AM

I've experienced a similar problem with my FaderPort controller but only under odd circumstances.
If I accidentally unplugged my FaderPort and then plugged it back in, the Control Surfaces preferences that I had assigned it would get deleted and the MIDI messages would come through as note data and other really weird stuff depending on what track I had selected in the arrange window...
What I noticed was that when I just went in and re-did my Control Surfaces stuff for that controller it would reset and work perfectly.
Eventually I had to contact PreSonus and let them know what was happening. Turns out it was a problem with the driver, and the driver had to be updated to accomodate 8.0.2.
I can only imagine that this is still the case for many companies (including the ones who made your volume pedal) since Logic 9 came so suddenly, without even a 8.1 ever being released....Try contacting that company and seeing if there are any known issues with the driver for the device and Logic 9... might help, can't hurt.

Similar Messages

  • Power Pivot Bug: Can't Save Edits to Power Pivot Query without checking Teradata Connection's "Save my password" Option

    Can't edit and re-Save Power Pivot query with Teradata connection (using LDAP security mechanism) unless "Save my password" option was checked.  Without this option I receive this error upon attempt to Save changes made to the query ...
    The following exception occurred while the managed IDbConnection interface was being used: [TeraGSS Security Library] [115022] Exception occurred in TERAGSS layer.  See inner exception for details.;TdgssAuthenticationTokenExchange delegate threw an exception.
     See the inner exception for details.
    ErrorCode: -452984642 Severity: Error Facility: DotNet
    [Teradata Database] [8017] The UserId, Password or Account is invalid..
    A connection could not be made to the data source with the DataSourceID of '6a06124c-496f-4887-bf39-d2582173d499', Name of 'Teradata fsltdprd'.
    An error occurred while processing table 'Query'.
    The current operation was cancelled because another operation in the transaction failed.

    Sorry you're right, the Office category isn't currently accepting bug reports in which case Olaf's suggestion to use the smiley face is the way to go. In Excel please go to File > Options > Trust Centre > 'Trust Centre Settings...' and check
    that the Feeeback Tool is enabled.
    If the option is greyed out like this...
    ... then you should be able to enable it by changing the value of the 'Enabled' registry key from a 0 to a 1 which you will find under: HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Feedback. You will then need to close all Office applications
    and re-launch Excel 2013.
    Once the Feeback Tool has been enabled, you should see the smile face(s) in the top right hand corner of the Excel window and be able to send your feedback.
    Regards,
    Michael
    Please remember to mark a post that answers your question as an answer...If a post doesn't answer your question but you've found it helpful, please remember to vote it as helpful :)
    Website: nimblelearn.com, Blog:
    nimblelearn.com/blog, Twitter:
    @nimblelearn

  • Possible Bug In Apex 4.0.2

    Hi Everyone.
    I would like to report what I think is a bug in Apex 4.0.2.
    If you go to my workspace on apex.oracle.com:
    Workspace = EEG
    Username = [email protected]
    Password = galaxy (all lowercase)
    Run the application: 37796 - Elie_Various_Goodies [no credentials are required]
    This app was imported from my 4.0.1 workspace at my job. On the page I created two Date Picker items, P1_BEGIN_DATE and P1_END_DATE. I set them up so that whenever a user selects a begin date, a dynamic action "MANAGE_DATES" fires and automatically sets P1_END_DATE to this selected begin date value. Now when a user goes to select an end date, the displayed calendar starts at the previously selected begin date rather than the default of "Today".
    All of this worked fine on my office (4.0.1) workspace. However, after exporting this app and then importing onto apex.oracle.com, none of this functionality would work. Even worse, whenever I try to select a begin date or even an end date, the selected dates never make it into the date picker fields. Displaying the "Session" window shows these fields as empty.
    It was only after I copied the two date picker fields and also re-created my dynamic action (P1_BEGIN_DATE2, P1_END_DATE2, MANAGE_DATES) did my functionality return.
    This behavior is quite strange. I can only think this is some sort of bug attributed to the export/import process when exporting a 4.0.1 app into a 4.0.2 workspace. I am not sure if this bizarre behavior happens with non-date picker items. Nor am I sure if this beavior would be repeated if I export/import from 4.0.2 into the another 4.0.2 environment.
    Another strange thing I noticed. If I change my date picker items to be "date picker (classic)" type items, the dynamic action does not work at all. This is true in both 4.0.2 and 4.0.1. I'm not sure if this a bug or not. It could be that the classic date picker is just not "javascript" enabled so to speak. If that is true, then it would have been nice if the docs would have warned us about this.
    Has anyone else seen this behavior?
    Thank you.
    Elie

    Hi Joel.
    First let me thank you for the warning about allowing "everyone" access to my workspace.
    You're correct, of course. Anyone could destroy anything within my workspace. I guess I was too trusting especially as I have seen many posts on the Forum where others have given access to their workspace so that responders can offer help. I really should be more discreet about this. Again, thank you. Needless to say, I have changed my password.
    With respect to the possible bug, the MANAGE_DATES dynamic action is intended to be a submit page because that is the only way I can see to get BOTH the P1_END_DATE date picker item as well as the end date textual field to be assigned the selected P1_BEGIN_DATE. I tried to use a dynamic action in which javascript sets the value of the end date textual field to the selected P1_BEGIN_DATE value. This works without the need to submit the page. Unfortunately, this does not cause the P1_END_DATE date picker item to default to this value. Instead, the default remains at today's date. This is why I finally resorted to a dynamic action that submits the page whenever a new value is selected (that is, a "change" event) from the P1_BEGIN_DATE date picker item.
    All of this works in my office 4.0.1 environment. However, I was puzzled when this fails under 4.0.2 on the hosted web site at apex.oracle.com. This is why I posted a "possible" bug in 4.0.2.
    I hope this all makes sense.
    One more thing, as already mentioned in my original post, this "defaulting a date picker" functionality does NOT work at all for the "classic" date picker items in both 4.0.1 nor in 4.0.2. I realize one can implement this functionality (I' guessing) my using, say, a "onChange" javascript call to submit the page. It's just funny that the "classic" date picker items are not acted upon by the dynamic action MANAGE_DATES that submits the page.
    Thank you.
    Elie

  • 11G Pivot Query with Oracle EBS

    Hello all,
    We are trying to use the 11G pivot query function with data from Oracle E-Business Suite. We have an 11G database installed with our Oracle APEX. We cannot seem to get the pivot function to work. At a glance, would anyone be able to see any glaring errors in our syntax. I am not certain it is possible to provide test data so...
    We are trying to have column headings with the Period Names SEP-08 OCT-08 NOV-08, with rows of segment2 007751 and accounted_dr as the dataset.
    When we run the sql we get an error ORA-00904: "PERIOD_NAME": invalid identifier.
    Any help or insight would be greatly appreciated.
    select * from (
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 = '007751')
    pivot
    sum(accounted_dr)
    for period_name in ('SEP-08','OCT-08','NOV-08')
    group by segment2, period_name

    lilhelp wrote:
    Hello all,
    We are trying to use the 11G pivot query function with data from Oracle E-Business Suite. We have an 11G database installed with our Oracle APEX. We cannot seem to get the pivot function to work. At a glance, would anyone be able to see any glaring errors in our syntax. I am not certain it is possible to provide test data Why not?
    >
    We are trying to have column headings with the Period Names SEP-08 OCT-08 NOV-08, with rows of segment2 007751 and accounted_dr as the dataset.
    When we run the sql we get an error ORA-00904: "PERIOD_NAME": invalid identifier.
    Any help or insight would be greatly appreciated.
    select * from (
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 = '007751')
    pivot
    sum(accounted_dr)
    for period_name in ('SEP-08','OCT-08','NOV-08')
    group by segment2, period_nameDon't use GROUP BY. When you use PIVOT, the grouping is implied by what is in the PIVOT clause and what is not.
    Try this:
    select    *
    from        (
           select  segment2
           ,       accounted_dr
           ,       period_name
           from       gl_je_lines          a
           ,       gl_code_combinations     b
           where       b.code_combination_id = a.code_combination_id
           and       segment2 = '007751'
    pivot       (
           sum (accounted_dr)
           for period_name in ('SEP-08','OCT-08','NOV-08')
    ;which is just your posted query without the GROUP BY clause.

  • Using PIVOT query in ViewObject

    I was wondering if it's possible to create a ViewObject based on a query with PIVOT. The query looks like
    SELECT * FROM myTable
    PIVOT ( SUM(myTable.VALUE) FOR TIME IN ('2010', '2011'));
    And I get the following error:
    ORA-00907: missing right parenthesis.
    The query works in SQL Developer.
    JDev 11.1.1.6.0

    My working query in SQL Developer is
    SELECT * FROM (
      SELECT TIME, VALUE
      FROM MYTABLE
      WHERE CODE = :pCode
    PIVOT (
      SUM(VALUE) FOR TIME IN (2009)
    with TIME as NUMBER.
    But if I copy it in a ViewObject I get the right parenthesis error. The '^' points to the T of PIVOT, not sure the location is accurate. My goal is then to use that VO with getEstimatedRowCount, executeQuery and also apply some ViewCriteria on it. I never worked with PIVOT query, so I am not sure if it makes a difference on what I can do with the VO.

  • 11G Pivot Query with parameters

    Hello all,
    I would like to find some way, any way to pass parameters to a pivot query. The following pivot query works, but I would like segment2 to be a variable as well as the period names so....
    select * from
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 >='007611' and segment2 <='007751' AND period_name in ('SEP-08','OCT-08','NOV-08'))
    pivot
    sum(accounted_dr)
    for period_name in ('SEP-08','OCT-08','NOV-08') )
    ....would be something like....
    select * from
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 >= :P4_OBJECT_FROM AND and segment2 <=:P4_OBJECT_TO AND period_name in &P4_EPSB_PERIOD_HOLD.)
    pivot
    sum(accounted_dr)
    for period_name in (&P4_EPSB_PERIOD_HOLD.) )
    It is our understanding that we have to hardcode period names and objects, but we would like to get around that. Does anyone have any ideas or tricks?
    Thanks

    lilhelp wrote:
    Hello all,
    We are trying to use the 11G pivot query function with data from Oracle E-Business Suite. We have an 11G database installed with our Oracle APEX. We cannot seem to get the pivot function to work. At a glance, would anyone be able to see any glaring errors in our syntax. I am not certain it is possible to provide test data Why not?
    >
    We are trying to have column headings with the Period Names SEP-08 OCT-08 NOV-08, with rows of segment2 007751 and accounted_dr as the dataset.
    When we run the sql we get an error ORA-00904: "PERIOD_NAME": invalid identifier.
    Any help or insight would be greatly appreciated.
    select * from (
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 = '007751')
    pivot
    sum(accounted_dr)
    for period_name in ('SEP-08','OCT-08','NOV-08')
    group by segment2, period_nameDon't use GROUP BY. When you use PIVOT, the grouping is implied by what is in the PIVOT clause and what is not.
    Try this:
    select    *
    from        (
           select  segment2
           ,       accounted_dr
           ,       period_name
           from       gl_je_lines          a
           ,       gl_code_combinations     b
           where       b.code_combination_id = a.code_combination_id
           and       segment2 = '007751'
    pivot       (
           sum (accounted_dr)
           for period_name in ('SEP-08','OCT-08','NOV-08')
    ;which is just your posted query without the GROUP BY clause.

  • Getting counts and divide by sum in a single Pivot query

    Hi,
    I have a pivot query which gives the counts of all codes. I also have to divide the count with the total in the same query.
    e.g
      col1          col2                   col3
    error_1       05-Jun-2012       parts
    error_1      05_june_2012     parts
    error_1      04_june_2012     consumables
    error_2      04_june_2012     consumables
    error_3      03_june_2012     parts
    .Now the output should have the counts/divided by sum multiplied by 100. Basically, the percentage.
    output will be something like
    error                     June-2012                                 May-2012                              Feb-2012 ....      headers
    error_1                    60%                                          0 %                                         0%
    error_2                    20%                                          0                                             0%
    error_3                    20%                                           0%                                         0%Any suggestions please?
    Thanks,
    Sun

    with
    t1 as
    (select 'error_1' col1,trunc(sysdate) - 1 col2 from dual union all
    select 'error_1',trunc(sysdate) - 1 from dual union all
    select 'error_1',trunc(sysdate) + 30 from dual union all
    select 'error_2',trunc(sysdate) + 31 from dual union all
    select 'error_3',trunc(sysdate) - 2 from dual union all
    select 'error_3',trunc(sysdate) + 30 from dual union all
    select 'error_1',trunc(sysdate) - 3 from dual union all
    select 'error_2',trunc(sysdate) - 2 from dual union all
    select 'error_3',trunc(sysdate) + 30 from dual union all
    select 'error_4',trunc(sysdate) - 6 from dual
    select col1,
           count(case to_char(col2,'mon') when 'jul' then 1 end) one,
           100 * ratio_to_report(count(case to_char(col2,'mon') when 'jul' then 1 end)) over () x,
           count(case to_char(col2,'mon') when 'jun' then 1 end) two,    
           100 * ratio_to_report(count(case to_char(col2,'mon') when 'jun' then 1 end)) over () y
      from t1
    group by col1
    order by col1Regards
    Etbin
    Edited by: Etbin on 8.6.2012 14:15
    used next month to keep english and slovenian 'mon' the same ;)

  • Dynamic SQL and Pivot Query in 11G

    Hello all,
    I am using APEX and 11G I am trying to create a report based on the results of a pivot query. Below is the code to build the query string. The :P4_EPSB_PERIOD_HOLD holds data like (SEP-08') for example.
    declare
    q varchar2(4000);
    begin
    q:=q ||' select * FROM';
    q:=q ||' ( ';
    q:=q ||' select segment2, ';
    q:=q ||' accounted_dr, ';
    q:=q ||' period_name ';
    q:=q ||' from gl_je_lines a, ';
    q:=q ||' gl_code_combinations b';
    q:=q ||' where b.code_combination_id = a.code_combination_id';
    q:=q ||' and segment2 >= :P4_EPSB_OBJECT_FROM';
    q:=q ||' and segment2 <= :P4_EPSB_OBJECT_TO';
    q:=q ||' and period_name IN :P4_EPSB_PERIOD_HOLD';
    q:=q ||' and segment4 >= :P4_EPSB_LOCATION_FROM';
    q:=q ||' and segment4 <= :P4_EPSB_LOCATION_TO';
    q:=q ||' )';
    q:=q ||' PIVOT';
    q:=q ||' (';
    q:=q ||' sum(accounted_dr)';
    q:=q ||' for period_name IN :P4_EPSB_PERIOD_HOLD';
    q:=q ||' )';
    return q;
    end;
    I get the missingfailed to parse SQL query:
    ORA-00906: missing left parenthesis
    If I print the sql statement that the query generates, I get the following code, which, if the varaibles are hard-coded, works fine.
    select * FROM ( select segment2, accounted_dr, period_name from gl_je_lines a, gl_code_combinations b where b.code_combination_id = a.code_combination_id and segment2 >= :P4_EPSB_OBJECT_FROM and segment2 <= :P4_EPSB_OBJECT_TO and period_name IN :P4_EPSB_PERIOD_HOLD and segment4 >= :P4_EPSB_LOCATION_FROM and segment4 <= :P4_EPSB_LOCATION_TO ) PIVOT ( sum(accounted_dr) for period_name IN :P4_EPSB_PERIOD_HOLD )
    Any advice as to how to tackle this would be most welecome and appreciated.
    Thanks

    P4_EPSB_PERIOD_HOLDcome with single quotes? like 'SEP-08' or SEP-08

  • How to find bottleneck in pivot query

    I have the following table and query I am running against that table.
    CREATE TABLE StagingTable(
    DateKey int NOT NULL,
    VersionNumber smallint NOT NULL,
    SetID varchar(10) NULL,
    ClassID char(5) NULL,
    VariableName varchar(50) NULL,
    VariableDescription varchar(255) NULL,
    PeriodNumber int NULL,
    PeriodData decimal(18, 6) NULL,
    Column1 varchar(50) NULL,
    Column2 varchar(50) NULL,
    Column3 varchar(50) NULL,
    Column4 varchar(50) NULL,
    Column5 int NULL,
    Column6 varchar(25) NULL,
    Column7 int NULL,
    Column8 int NULL,
    Column9 varchar(50) NULL,
    Column10 varchar(50) NULL,
    Column11 varchar(50) NULL,
    Column12 int NULL,
    RowNumber int NULL
    GO
    WITH cte as (
    SELECT
    DateKey ,
    VersionNumber ,
    SetID ,
    ClassID ,
    VariableName ,
    PeriodNumber ,
    PeriodData
    from StagingTable
    SELECT
    DateKey ,
    VersionNumber ,
    SetID ,
    ClassID ,
    VariableName,
    [0], [1], [2], [3], ,,,, [360]
    from cte
    pivot (SUM(PeriodData)
    FOR PeriodNumber IN (
    [0], [1], [2], [3], ..., [360]
    ) as pvt;
    CREATE UNIQUE NONCLUSTERED INDEX IX_StagingTable ON dbo.StagingTable
    DateKey,
    VersionNumber,
    SetId,
    ClassID,
    VariableName,
    PeriodNumber
    INCLUDE ([PeriodData])
    I have about 5 million rows in StageTable and the pivot query returns 32,000 rows.  It takes about 3 and a half minutes to run this query, whether I am outputting the results to the results window in SSMS or selecting into a new table.
    I checked the execution plan for this query (outputting to results window) and the only operation that takes any time is the non-clustered index scan (84% with Stream aggregate showing 14%).
    Here are the things I compared this to.  I ran a select from this table using just the columns in the index. The results returned in less than one minute and as expected the most expensive operation (100%) was the non-clustered index scan. 
    By the way, a select into returned almost immediately.
    If I take the pivot results (after a select into) and create a new table by select into, it takes almost no time for the query to finish.
    I did an estimated execution plan on these three queries (where PivotTable is a dump of the pivot query into a heap):
    WITH cte as (
    SELECT
    DateKey ,
    VersionNumber ,
    SetID ,
    ClassID ,
    VariableName ,
    PeriodNumber ,
    PeriodData
    from StagingTable
    SELECT
    DateKey ,
    VersionNumber ,
    SetID ,
    ClassID ,
    VariableName,
    [0], [1], [2], [3], ,,,, [360]
    from cte
    pivot (SUM(PeriodData)
    FOR PeriodNumber IN (
    [0], [1], [2], [3], ..., [360]
    ) as pvt;
    SELECT * from PivotTable;
    SELECT
    DateKey ,
    VersionNumber ,
    SetID ,
    ClassID ,
    VariableName ,
    PeriodNumber ,
    PeriodData
    from StagingTable;
    The first query (pivot query) had a cost of 41%, the second 25% (select pivottable) and the third 34% (select base table).  These are nowhere close to the ratios of the amount of time that it takes to run these queries (pivot query 3.5 minutes,
    select  PivotTable 5 seconds and select base table almost one minute).
    For the following:
    WITH cte as (
    SELECT
    DateKey ,
    VersionNumber ,
    SetID ,
    ClassID ,
    VariableName ,
    PeriodNumber ,
    PeriodData
    from StagingTable
    SELECT
    DateKey ,
    VersionNumber ,
    SetID ,
    ClassID ,
    VariableName,
    [0], [1], [2], [3], ,,,, [360]
    into newTable1
    from cte
    pivot (SUM(PeriodData)
    FOR PeriodNumber IN (
    [0], [1], [2], [3], ..., [360]
    ) as pvt;
    SELECT *
    into newTable2
    from PivotTable;
    SELECT
    DateKey ,
    VersionNumber ,
    SetID ,
    ClassID ,
    VariableName ,
    PeriodNumber ,
    PeriodData
    into newTable3
    from StagingTable;
    The distribution of query cost is strikingly different.  The pivot query has a cost of 98% and the other two queries have costs of 1%.  The big difference between these queries and the versions that just output the results (in the execution plan)
    is in the table insert.  The pivot query shows a cost of 26,000 while the select from pivottable shows cost of 160 and select from StagingTable shows cost of 280.
    What else can I look at?  Also, what else can I try to optimize the pivot query.
    For now, I am going to see if I get better performance letting SSRS do the pivoting.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

    I have finally nailed down what is causing the bottleneck.
    The Compute Scalar step for some reason shows almost no cost to the execution plan.  But I noticed that the actual number of rows is 5 million (the same as the scan).  It appears that SQL Server expands every row to 360+ columns, all 5 million
    of them.
    So I did an experiment.  I took the table that I was populating and did a cross join to a number table.  This table has 30 K rows and 360 columns.  I figured that if I select 150 rows from the number table it will generate around 5 million
    rows.  The results were almost identical to using the MAX(CASE WHEN ...) construct:  1 minute and some change.
    I then cross joined with only 75 rows.  It took 30 seconds.  37 rows took about 15 seconds.
    So the Compute Scalar costs a lot more then the Execution plan analyzer says.
    SSIS appears to gather one row at a time.  Once it finishes one row, one group by set, it sends the row on its way.  So, in my case, the 5 million rows is read in with 7 columns and 30 K rows are output with 365 columns or so.
    SQL Server creates 5 million rows with 365 columns, then aggregates them down to 30 K rows.
    Thank you, Tom for you discussion with me on this.  I think that I can present my thoughts to my lead.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • Possible bug found in Mac Os X Tiger 10.4.11 in conjuction with iPod Touch

    Dears,
    I think I've found a possible bug in Mac Os X version 10.4.11 in conjunction with iPod Touch.
    When the iPod is connected during boot, my Bluetooth hardware fails to be detected. When I restart the portable without the iPod connected, my Bluetooth hardware is recognised & activated again. It is reproduceable.
    1. Attach iPod Touch before starting the MacBook Pro
    2. Boot the Macbook
    3. Bluetooth hardware should be rendered inoperative
    Restore functionality:
    1. Detach the iPod Touch
    2. Reboot the portable
    3. Bluetooth hardware is restarted / recognised.
    Regards
    Cedric

    wrong category

  • Possible Bug with Drag-and-Drop Being Published via HTML5 - Getting "Undefined" Error When Dragging Object

    Hello,
    I came up with a way to use drag-and-drop interactions that will take advantage of file input so that I may create a drag-and-drop interaction that uses one draggable object over and over allowing multiple scoring/tracking possibilities.  Example use...is having the draggable object be dynamic in that it randomly changes its text so that a learner can drag a term it's possible classification.........thus allowing the possibility of having many terms easily loaded without having to redo a drag-and-drop interaction for each needed terms/classifications updates/changes.
    My Issue: When using a variable to represent the text for a draggable Smart Shape object, I'm getting the error message "undefined" when, clicking/pressing on the object, as well as during the drag of the object. This issue occurs when publishing the project in an HTML5 format.  Flash interestingly enough seems to work perfect...but we are not interested in publishing via Flash any longer.
    To better help you explore this error message, I've set up a test project so that you can see when and how the "undefined" message shows up during a drag-and-drop interaction.  I've also included the Captivate 8 project file used to make the exploration project I'm sharing in this post.
    Link to Captivate project I created for you all to explore "undefined" error message": http://iti.cscc.edu/drag_and_drop_bug/
    Link to this Captivate 8 Project file: http://iti.cscc.edu/drag_and_drop_bug.cptx
    It's pretty interesting how things react in this demo, please try the following actions to see some interesting happenings:
    Drag the Yellow (or variable drag box) to the drag target.
    Drag Black Hello square to Drag target and click undo or reset - watch the undefined message come up on the Yellow (or variable drag box).
    Drag the Yellow (or variable drag box) to the drag target and then use the undo or reset.
    Move both draggable boxes to the drag target and use the undo and reset buttons...
    Anyhow, I know you all are sharp and will run the demo through its paces.
    I'd really be very honored if anyone help me figure out how I could (when publishing out to HTML5) no longer have the "undefined" error message show up when using drag-and-drop with a variable for shape text. This technique has been well received at the college I work at...and I have many future project requests for using such an idea on a variety of similar interactions. I'd love see a solution or see if this might be a bug Adobe may be able to fix!
    I tried to find a solution to the issue documented here for quite some time, but I was not able to find anyone with this problem much less attempting the idea I'm sharing in the help request -  save the darn "undefined" message that comes up!
    Many thanks in advance for any help and/or direction that you all may be able to provide,
    Paul

    Hello,
    I just wanted to supply a minor update related to my drag-and-drop question/issue stated above:
    I did another test using Captivate 7, and found that the undefined error (publishing as HTML5) does not appear and the variable data remains visible - except the variable data turns very small and does not honor any font size related settings.
    I did go ahead and submit this to Adobe as a possible bug today.
    Thanks again for any help related to this issue.  If the issued documented above is solved, it will allow many amazing things to be done using Captivate's drag-and-drop for both regular type projects as well as interaction development for iBooks! 
    Matter of fact if this issue gets fixed, I'll publish a Blog entry (or video) on way's I've used Captivate's drag-and-drop to create dynamic learning activities for Higher Ed. and for use in iBooks.
    ~ Paul

  • Setting Column Names in Dynamic Pivot Query

    Hi all,
    I'm having trouble setting column names in a dynamic pivot query and was wondering if someone could please help me figure out what I need to do.
    To help you help me, I've setup an example scenario in my hosted account. Here's the login info for my hosted site at [http://apex.oracle.com]
    Workspace: MYHOSTACCT
    Username : DEVUSER1
    Password : MYDEVACCTAnd, here is my test application info:
    ID     : 42804
    Name   : dynamic query test
    Page   : 1
    Table 1: PROJECT_LIST         (Alias = PL...  Listing of Projects)
    Table 2: FISCAL_YEAR          (Alias = FY...  Lookup table for Fiscal Years)
    Table 3: PROJECT_FY           (Alias = PF...  Intersection table containing project fiscal years)
    Table 4: PROJECT_FY_HEADCOUNT (Alias = PFH... Intersection table containing headcount per project and fiscal year)Please forgive the excessive normalization for this example, as I wanted to keep the table structure similar to my real application, which has much more going on.
    In my sample, I have the "Select Criteria" region, where the user specifies the project and fiscal year range that he or she would like to report. Click the Search button, and the report returns the project headcount in a pivoted fashion for the fiscal year range specified.
    I've got it working using a hard-coded query, which is displayed in the "Hardcoded Query" region. In this query, I basically return all years, and set conditions on each column which determines whether that column should be displayed or not based on the range selected by the user. While this works, it is not ideal, as there could be many more fiscal years to account for, and this is not very dynamic at all. Anytime a fiscal year is added to the FISCAL_YEAR table, I'd have to update this page.
    So, after reading all of the OTN SQL pivot forums and "Ask Tom" pivot thread, I've been able to create a second region labeled "Dynamic Query" in which I've created a dynamic query to return the same results. This is a much more savvy solution and works great; however, the column names are generic in the report.
    I had to set the query to parse at runtime since the column selection list is dynamic, which violates SQL rules. Can anyone please help me figure out how I can specify my column names in the dynamic query region to get the same column values I'm getting in the hardcoded region?
    Please let me know if you need anymore information, and many thanks in advance!
    Mark

    Hi Tony,
    Thanks so much for your response. I've had to study up on the dbms_sql package to understand your function... first time I've used it. I've fed my dynamic query to your function and see that it returns a colon delimited list of the column names; however, I think I need a little more schooling on how and where exactly to apply the function to actually set the column names in APEX.
    From my test app, here is the code for my dynamic query. I've got it in a "PL/SQL function body returning sql query" region:
    DECLARE 
      v_query      VARCHAR2(4000);
      v_as         VARCHAR2(4);
      v_range_from NUMBER;
      v_range_to   NUMBER;         
    BEGIN
      v_range_from := :P1_FY_FROM;
      v_range_to   := :P1_FY_TO;
      v_query      := 'SELECT ';
      -- build the dynamic column selections by looping through the fiscal year range.
      -- v_as is meant to specify the column name as (FY10, FY11, etc.), but it's not working.
      FOR i IN v_range_from.. v_range_to  LOOP
        v_as    := 'FY' || SUBSTR(i, 3, 4);
        v_query := v_query || 'MAX(DECODE(FY_NB,' || i || ',PFH_HEADCOUNT,0)) '
          || v_as || ',';
      END LOOP;
      -- add the rest of the query to the dynamic column selection
      v_query := rtrim(v_query,',') || ' FROM ('
        || 'SELECT FY_NB, PFH_HEADCOUNT FROM ('
        || 'SELECT FY_ID, FY_NB FROM FISCAL_YEAR) A '
        || 'LEFT OUTER JOIN ('
        || 'SELECT FY_ID, PFH_HEADCOUNT '
        || 'FROM PROJECT_FY_HEADCOUNT '
        || 'JOIN PROJECT_FY USING (PF_ID) '
        || 'WHERE PL_ID = ' || :P1_PROJECT || ') B '
        || 'ON A.FY_ID = B.FY_ID)';
      RETURN v_query;
    END;I need to invoke GET_QUERY_COLS(v_query) somewhere to get the column names, but I'm not sure where I need to call it and how to actually set the column names after getting the returned colon-delimited list.
    Can you (or anyone else) please help me get a little further? Once again, feel free to login to my host account to see it first hand.
    Thanks again!
    Mark

  • Possible bug: Saving array with extended and double precision to spreadshee​t

    If one concatenates a double precision array and an extended precision array with the "build array" vi and then saves using "Write to Spreadsheet File" vi any digits to the right of the decimal place are set to zero in the saved file. This happens regardless of the format signifier input (e.g. %.10f) to the  "Write to Spreadsheet File" vi.
    I am on Vista Ultimate 32 bit and labview 9.0
    This is a possible bug that is easily circumvented by converting to one type before combining arrar to a spreadsheet. Nonetheless, it is a bug and it cost me some time.
    Solved!
    Go to Solution.
    Attachments:
    Spreadsheet save bug.vi ‏9 KB

    Hi JL,
    no, it's not a bug - it's a feature
    Well, if you would look more closely you would recognize the "Save to Spreadsheet" as polymorphic VI. As this polymorphic VI doesn't support EXT numbers internally (it only supports DBL, I64 and String) LabVIEW chooses the instance with most accuracy: I64 (I64 has 64 bits precision, DBL only 53...). So your options are:
    - set the instance to use as DBL (by right-click and "Select type...")
    - make a copy of this VI, save it with a different name and make it support EXT numbers (don't rework the polymorphic VI as you would break compatibility with other LV installations or future revisions)
    And yes, those coercion dots always signal some conversions - you should atleast check what's going on there...
    Message Edited by GerdW on 05-21-2010 10:01 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Possible bug? formatted number 0 displays as  4,294,967,295

    This is really two questions in one. First, I have a routine
    that sometimes provides a result of 0, which is *sometimes*
    displayed in an AdvancedDataGrid column as 4,294,967,295, which I'm
    assuming is somehow a meaningful number (largest int?). Anyway, I
    have an ADG with a column defined as:
    <mx:AdvancedDataGridColumn headerText="Remaining work"
    labelFunction="rem_work_fmt" textAlign="right" />
    The labelFunction called is shown below:
    private function rem_work_fmt(item:Object,
    column:AdvancedDataGridColumn):String
    var num:String =
    numberFormatter.format(item.get_remaining_work());
    trace ("result: " + num);
    return num;
    The trace output prints: "result: 0" as expected, but the
    number displayed in the grid is sometimes 0 and sometimes
    4,294,967,295.
    More weirdness, this only happens to the last column in the
    ADG. I call the same format logic on a different column and have
    never seen the wrong result. Also, the same underlying function
    "get_remaining_work()" is called elsewhere on the same data and the
    result is correctly displayed in a text field as 0.
    Second question, I've run into some other possible bugs,
    which I haven't reported because I found a work around. How does
    one do that in the beta program?

    lw1001,
    Bugs can be filed in the public bug base at
    http://bugs.adobe.com/flex/
    You'll need to sign up before you can submit bugs.
    Also, if you can attach the bug files to the bug report, it
    makes it a lot easier for Adobe to investigate.
    Let me know if you have any further questions/problems.
    Peter

  • APEX 3.2 -ORACLE 10G - PIVOT QUERY

    Hello, i searched around the forum and i cound't find an answer to this specific matter, although i saw some replies that were close...
    i need to creat a form based on a pivot query. but oracle 10g doesn't support that feature so i hope someone can help me.
    my problem is that the number of columns will be variable. here's an example:
    ORIGINAL TABLE
    NAME     KMS     VEHICLE
    Joe     100     AUDI
    Tom     300     VW
    Mark     150     FORD
    Ann     250     FORD
    Joe     200     VW
    Tom     123     AUDI
    Mark     345     AUDI
    Ann     45     VW
    Joe     6     FORD
    Tom     67     FORD
    Mark     46     VW
    Ann     99     AUDI
    DESIRED RESULT
    Joe     Tom     Mark     Ann     Vehicle
    100     123     345     99     AUDI
    6     67     150     250     FORD
    200     300     46     45     VW
    the new columns will be the values in the old NAME column. BUT these values are variable. today its joe,tom,mark and ann tomorrow it could be silvia, tony,richard,harry , william and jane. this means the usuall replies i saw, using MAX and DECODE will not apply because i never know what values or how many values are in this column. with pivot i can get this done.... how can i do this in oracle 10g? is there a way to creat a ser function Pivot somehow? ideas?
    thanks!
    Mark Pereira
    Edited by: 899716 on Jul 18, 2012 12:02 PM

    This is the Oracle Forms forum. Post your question in the SQL forum.
    Tip: check the latest Oracle Magazine (July/August 2012). There is an article by Tom Kyte about the same question.
    http://www.oracle.com/technetwork/oramag/magazine/home/index.html

Maybe you are looking for