Each column value from a game based on the presence of value non-zero treatment

Hi all

My oracle db has the following properties:
NLS_LANGUAGE     AMERICAN
NLS_TERRITORY     AMERICA
NLS_CURRENCY     $
NLS_ISO_CURRENCY     AMERICA
NLS_NUMERIC_CHARACTERS     .,
NLS_CHARACTERSET     AL32UTF8
NLS_CALENDAR     GREGORIAN
NLS_DATE_FORMAT     DD-MON-RR
NLS_DATE_LANGUAGE     AMERICAN
NLS_SORT     BINARY
NLS_TIME_FORMAT     HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY     $
NLS_COMP     BINARY
NLS_LENGTH_SEMANTICS     BYTE
NLS_NCHAR_CONV_EXCP     FALSE
NLS_NCHAR_CHARACTERSET     AL16UTF16
NLS_RDBMS_VERSION     11.2.0.3.0
I need to implement complex logic for which I am unable to gather ideas. I need help with it:

I select a distinct combination for 2 columns of a table, something like - [maximum length of column 1 is 4 characters, maximum length of column 2 is 160 characters]:
WITH tab_initialdataset AS
SELECT 
'7913     ' PLANID, 'WL00WM99WL000099009995000000000000000000009900009999000000009900000000000000000000990000000000000099W70000000099IIWL98008799000000999900000000990000000000000000' RULESET FROM DUAL
UNION SELECT '7921','WL00WM99WL000099009995000000000000000000009900009999000000009900000000000000000000990000000000000099WI0000000099IIWL98008799000000999900000000990000000000000000' FROM DUAL UNION SELECT
'4500     ', 'FW00FZ00FZ00009900990000000000000000000000000000000000000000000000990000000000000000000000000000009900000000PM9999FZ99009799000000970000000000000000000000000000'
FROM DUAL

-- some logic here
I need to check each Ruleset (2nd column) above for each 2 bytes determine if the value is different from '00'. For example in the first row:
WL00WM99WL000099009995000000000000000000009900009999000000009900000000000000000000990000000000000099W70000000099IIWL98008799000000999900000000990000000000000000

post 1 (WL), 3 (WM), 4 (99) etc. are NOT EQUAL to "00".

So my output should be like this:
PLANID  NON_ZERO_OFFSET_POSITION
7913 1
7913 3
7913 4
... and so on
7921 1
7921 3
... and so on
Any ideas please?

THX

Published by: Chaitanya on July 24, 2012 04:27

Published by: Chaitanya on July 24, 2012 21:23

Hello

It is a solution based on a recursive subquery, I prefer this to connect to solutions for efficiency reasons.

WITH tab_initialdataset AS (
SELECT
'7913' PLANID,
 'WL00WM99WL000099009995000000000000000000009900009999000000009900000000000000000000990000000000000099W70000000099IIWL98008799000000999900000000990000000000000000' RULESET FROM DUAL
UNION SELECT '7921','WL00WM99WL000099009995000000000000000000009900009999000000009900000000000000000000990000000000000099WI0000000099IIWL98008799000000999900000000990000000000000000' FROM DUAL UNION SELECT
'4500', 'FW00FZ00FZ00009900990000000000000000000000000000000000000000000000990000000000000000000000000000009900000000PM9999FZ99009799000000970000000000000000000000000000'
FROM DUAL
)
, rec(p, r, res, pos) as (
select
planid, ruleset r, 0 res, 0 pos
from
tab_initialdataset
union all
select
p, substr(r,3) r, case when substr(r,1,2) = '00' then 0 else 1 end res , pos + 1
from rec
where
length(r) is not null
)
select p planid,pos pos from rec
where res = 1
order by p,pos

I just show the results for 7913

PLANID POS
...
7913 1
7913 3
7913 4
7913 5
7913 8
7913 10
7913 11
7913 22
7913 25
7913 26
7913 31
7913 42
7913 50
7913 51
7913 56
7913 57
7913 58
7913 59
7913 61
7913 62
7913 66
7913 67
7913 72
...

You can easily change this by changing the when the condition in the instruction box.
concerning

Tags: Database

Similar Questions

  • Client debugging flood * apfMsConnTask_0:... Update statistics: value Non-zero

    Hello

    We have two controllers 5508 with 7.4.100.0. When we try to debug client this message flooding the console:

    Is there a way to stop it? Thank you.

    I * apfMsConnTask_2: 12:17:21.729 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.754 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.756 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.758 Aug 23: update the Stats: value Non-zero

    s * apfMsConnTask_0: 12:17:21.809 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.948 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.949 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.949 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.949 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.949 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.949 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.950 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.950 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.951 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.951 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.952 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.952 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_0: 12:17:21.953 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_2: 12:17:21.956 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_2: 12:17:21.958 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_2: 12:17:21.962 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_2: 12:17:21.962 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_2: 12:17:21.963 Aug 23: update the Stats: value Non-zero

    * apfMsConnTask_2: 12:17:21.963 Aug 23: update the Stats: value Non-zero

    This occurs only when you enable client debugging? and does not occur when you turn it off?

    Rating of useful answers is more useful to say "thank you".

  • read the max and min of each column value

    Dear qudoe

    I'm doing a program in labview that challenge me to fight with a time.

    Here, I enclose my labview code in which I have a data file, which includes 500 columns that I need to find the values min and max of each column.

    I tried my best, but it takes 30 seconds to find the min and max value of each column.

    I want to do this in less than a second.

    so can anyone suggest me any necessary correction that can stimulate my program.

    You don't have to open and close the file in a loop all the time and also you don't really need some time for this. Check the related code.

    Of course, you can still optimize it for best performance, I just did a quick project to show how simple it is.

  • Get the multiplication of values in column on an attached table based on the condition

    The title was the best I could find to explain my question, I do not think that it does help. in any case, I have two tables:

    CREATE TABLE YEARLY_RATES

    ( RATE_YEAR NUMBER(4,0),

    RATE NUMBER(6,4)

    );

      CREATE TABLE PERSON_ACCOUNT

    ( PAID_YEAR NUMBER(4,0),

    PAID_AMOUNT(10,2)

    );

    I need select PERSON_ACCOUNT. PAID_YEAR, PERSON_ACCOUNT. PAID_AMOUNT, PERSON_ACCOUNT. PAID_AMOUNT * multiplication of the YEARLY_RATES. RATE WHERE YEARLY_RATES. RATE_YEAR > = PERSON_ACCOUNT. PAID_YEAR. So for example if I have the following data in PERSON_ACCOUNT

    PAID_YEAR|PAID_AMOUNT

    ---------------------

    2006   2150.69

    2007   3290.40

    2008   3000.35

    and YEARLY_RATES tables

    RATE_YEAR|RATE

    ---------------------

    2006   1.067

    2007   1.208

    2008   1.057

    Then I should be able to have the following result:

    PAID_YEAR|PAID_AMOUNT|INDEXED_AMOUNT

    ----------------------------------------------------

    2006    2150.69    2150.69*1.067*1.208*1.057

    2007    3290.40    3290.40*1.208*1.057

    2008    3000.35    3000.35*1.057

    with

    yearly_rates as

    (by selecting RATE_YEAR 2006, double the RATE of 1.067 in union all the)

    Select 2007,1.208 from all the double union

    Select double 2008,1.057

    )

    indexed_rate Select rate_year, rate, exp (sum (ln (rate)) (order by rate_year desc))

    of yearly_rates

    RATE_YEAR RATE INDEXED_RATE
    2008 1,057 1.05699999999999999999999999999999999999
    2007 1,208 1.27685600000000000000000000000000000001
    2006 1,067 1.36240535200000000000000000000000000001

    Concerning

    Etbin

    model clean air solution

    Select rate_year, indexed_rate

    of yearly_rates

    dimension of the model by (rate_year)

    measures (rate, 1 indexed_rate)

    rules

    (

    indexed_rate [any] rate_year desc = order rate [cv ()] * nvl (indexed_rate [cv () + 1], 1)

    )

    RATE_YEAR RATE INDEXED_RATE
    2006 1,067 1.362405352
    2007 1,208 1.276856
    2008 1,057 1,057

    Update of the first solution proposed by ChrisHunt


    What about recursive with

    with

    yearly_rates as

    (by selecting rate_year 2006, double the rate of 1.067 in union all the)

    Select 2007,1.208 from all the double union

    Select double 2008,1.057

    ),

    indexed_rates (rate_year, spleen, indexed_rate) as

    (select rate_year, indexed_rate

    (select rate_year, rates, indexed_rate, row_number () over (order by rate_year desc) step

    of yearly_rates

    )

    the stage where = 1

    Union of all the

    Select yr.rate_year, yr.rate, ir.indexed_rate * yr.rate

    to indexed_rates ir,.

    yearly_rates year

    where yr.rate_year = ir.rate_year - 1

    )

    Select rate_year, indexed_rate

    of indexed_rates

    RATE_YEAR RATE INDEXED_RATE
    2008 1,057 1,057
    2007 1,208 1.276856
    2006 1,067 1.362405352

    Post edited by: recursive Etbin with solution added

  • Info from data store based on the location of the data center

    Hello

    I wrote a powershell script to get the amount of free space available in the stores of data butthis is too high

    I need the information broken down according to the opinion of the 'data warehouses' with the virtual Center

    EG - my eyes record data centre as

    Teir 1

    X-x-x-x-x-x-x data warehouses

    Teir 2

    X-x-x-x-x-x-x-x data warehouses

    Teir 3

    X-x-x-x-x-x-x-x data warehouses

    Can someone please

    Altogether.  The problem has to do with the Canal works and references that you are trying to use the output the way.  There are several ways to handle this, and I think that it can do what you want.

    Get-Datacenter  |  Foreach-Object { $dc=$_; $dc | Get-Datastore | Select-Object @{name="DC Name"; expression={$dc.name}},Name,FreeSpaceMB,CapacityMB}
    
  • validate a value non-zero in the table

    Hi all

    I need to make a base of validation on a single column for example. (colm_A) battery of the table.
    the scenario is:

    If there is a value to colmA, validation invites you to reject the new insertion of the error value.
    If there is no value to colmA, it will allow the new insertion of value.

    Kindly advice.
    Thank you

    Create a new validation.
    In the validation method, select PL/SQL.
    in select the posting type of PL/SQL that you want to create the select Function return Boolean
    in validation Textbox enter code similar to the below a

    declare
        i number;
    begin
        select count(colm_A) into i from tblA;
       if i = 0 then
           return true;
       else
           return false;
       end if;
    end;
    

    in the textbox for error... Enter the error message to display when validation fails.

    Kind regards
    Shijesh

  • Selectively hiding a row in a Table based on the value of the column

    I have a data control that is populated from pro-grammatically, based on the user's selection in the page one of wanting to hide some lines on page 2 at the same time, I don't want to delete the value binding, is there to hide the lines instead of column?

    To the table of the ADF, to hide the lines according to the requirement, use the visible property on each of the columns.

    For example, if you do not want to display all the lines that have IDs Director like 200 or 201.

     
                            
                                
                                    
                                
                            
                            
                                
                            
                            
                                
                            
                            
                                
                            
                        
    

    Thank you
    Nini

  • Amount based on certain letters in another column values

    Hello

    1. I would like to help to design a formula that sums values based on the presence of "coding" letters in another cell.

    Basically, I have an information line that contains several different values in individual columns. Then, I want to have a cell "coding" that relates to that particular line, when I hit a certain letter or more likely letters. These letters say provide more information on the values of the row. I want to summarize some columns that depends on the presence of certain letters in the "coding" cell, but my current use the SUMIF formula (e.g. SUMIF (g4:g6, "m =", A4: A6 "totals only values in A4: A6, if ONLY the letter am' is located in g4:g6 - while I need the formula for hunting the letter'm ' even if there is no other letters in the same cell with him - for example g6 cells which")) contains 'Sir'

    2. in addition, I would like to have the spreadsheet sum up occurrences of places (frequency) and sales of each place. I have maybe up to 40 locations to manage - so, how do I write a SUMIF formula that takes everywhere? Should be a long embrace formula that lists all of the 40 locations?

    I hope someone can help!

    Thanks in advance

    Matthew

    PS - It's just a spreadsheet example - real is normally 100 long lines for each month, so I have to get as automated as possible summary functions!

    You can use wildcards in SUMIF and SUMIFS, like this:

    = SUMIF(G,"*m*",A)

    BTW, your layout seems very "Excel-like". Suggest that you break your table to enjoy the design of the numbers. Here, my tier 6 is defined as a footer line.  This way I can simply reference to column G without worrying about which define a particular range.

    SG

  • How to find the value duplicate of each column.

    I have it here are four columns,
    How can I find the duplicate of each columns value.

    with All_files like)
    Select ' 1000 'like BILL, "2000" AS DELIVERYNOTE, CANDELINVOICE ' 3000', '4000' CANDELIVERYNOTE of all union double
    Select ' 5000 ', ' 6000', ' 7000 ', ' 8000' Union double all the
    Select '9000 ', '1000', '1100',' 1200' from dual union all
    Select ' 1200 ', ' 3400', ' 6700 ', ' 8790' Union double all the
    Select ' 1000 ', ' 2000', ' 3000 ', ' 9000' Union double all the
    Select '1230', '2340', ' 3450 ', ' 4560' double
    )
    SELECT * from All_files


    Output should be as shown below.

    1000 2000 3000 4000
    9000 1000 1100 1200
    1200 3400 6700 8790
    1000 2000 3000 9000

    Required to check uniqueness columns.

    Thank you.

    Hello

    If you are not too concerned about performance, this should give you the desired result:

    SELECT distinct INVOICE, DELIVERYNOTE, CANDELINVOICE, CANDELIVERYNOTE
    FROM (
      SELECT a.*,
             count(*) over(partition by t.column_value) cnt
      FROM All_files a,
           table(
             sys.odcivarchar2list( a.INVOICE
                                 , a.DELIVERYNOTE
                                 , a.CANDELINVOICE
                                 , a.CANDELIVERYNOTE ) ) t
    )
    WHERE cnt > 1
    ;
    
  • Auto-fill text box values field based on the selection of the menu drop-down

    Try to fill in address, city, province, zip from text fields based on the selected option in a select form field. The following code works fine in Internet Explorer, but in Chrome or Firefox, after selection, text, the fields are filled with the word "undefined."

    I found a PHP script Jquery here version that would probabably do the trick.
    http://StackOverflow.com/questions/3657127/jQuery-populate-text-input-from-table-based-on-select-Valeur

    Maybe someone has a version of CF. they could share?

    Thanks in advance to anyone who can point me to a solution for this code, or a better way to fulfill my need.

    <!--> destinations with address auto-fill, city, etc.
    < script type = "text/javascript" >
    function selectAddress (list) {}
    take the first element is empty
    If (list.selectedIndex > 0) {}
    var locationID = list.options [list.selectedIndex] .value;
    locationAddress var = list.options [list.selectedIndex] .locationAddress;
    var locationCity = list.options [list.selectedIndex] .locationCity;
    var locationState = list.options [list.selectedIndex] .locationState;
    var locationZip = list.options [list.selectedIndex] .locationZip;
    document.getElementById('locationID').value = locationID;
    document.getElementById('locationAddress').value = locationAddress;
    document.getElementById('locationCity').value = locationCity;
    document.getElementById('locationState').value = locationState;
    document.getElementById('locationZip').value = locationZip;
    }
    }
    < /script >
    < b >
    < td align = 'right' bgcolor = "#FFFFFF" valign = "top" > Destination name < table >
    < td align = "left" bgcolor = "#FFFFFF" valign = "top" >
    < select name = "locationID" onChange = "selectAddress (this)" class = "smallforms" > "
    < option value = "" > SELECT the DESTINATION ››› < / option >
    < cfoutput query = "allLocations" >
    "" < option value = "" #locationName # "locationAddress =" #allLocations.locationAddress # "locationCity =" "#allLocations.locationCity #" locationState = "#allLocations.locationState #" locationZip = "#allLocations.locationZip #" > #locationName # < / option >
    < / cfoutput >
    < / select >

    Others: cfinput name = "destinationNameOther" type = "text" class = "smallforms" size = "75" >
    < br / >
    < input id = "locationID" name = "locationID" type = "hidden" > < br >

    Address: < input class = "smallforms" id = "locationAddress" name = "locationAddress" type = "text" size = "30" >
    City: < input class = "smallforms" id = "locationCity" name = "locationCity" type = "text" size = "20" >
    State: < input class = "smallforms" id = "locationState" name = "locationState" type = "text" size = "2" >
    Postal code: < input class = "smallforms" id = "locationZip" name = "locationZip" type = "text" size = "8" > < br / >
    < br / >
    < table > < /tr >

    In your last code done selectAddress refers to "index" but I'm not declared or assigned. I think that you are missing 'var index = list.selectedIndex;' statement.

  • reading values each column 2

    Hi all

    I went through the directory of formulas and functions to solve my problem, but I couldn't write the thing properly using the functions of references.

    I have about 20 rooms (and more to come), and each room has different water meters.

    For the moment, I have read only a meter of each room. In the future I might have to read several in each room.

    What I have is:

    • each column is a room; name of the room in the head line
    • Under the name of each room are 2 columns: 1 for the global counter of the room, one for the specific counter
    • months, the lines are

    What I want to do is:

    read the value of a specific counter in each room and work it thoroughly the cost price unit in the fee table.

    In my case, this means:

    -go and read the value in the column-specific counter and insert it using calculation in the table of costs.

    -do it again in the next room (C + 2 column) and put it in the C + 1 table of costs.

    I tried to use the ADDRESS SEARCH function, ODD, etc, but I couldn't find my way to extract value all 2 columns in a table and insert it in every column in a table.

    If anyone is familiar with this, I'm all ears...

    Thank you very much for taking the time to read.

    Lopez

    PS: Since 1 room can contain several meters and therefore columns, it would be smarter to rooms in the lines and the months in columns...?

    Hey Lopez,

    Your merged cells as column headings are probably complicate things. The numbers does not do well with merged cells.

    If your counters are marked Global1, Meter1, bad2 metre2 it would be easy to find. You may need to Meter1.1, Meter1.2, if multiple counters in a room.

    I like to use INDEX MATCHES for my search needs. If you have specific questions Asur applying this to your table from the report itself, just give more details about what you need.

    Quinn

  • change the color of line based on the value of column 5 Apex in the classic report

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Hello

    I know this question has been asked several times here, but I'm working on 5 Apex and need to know the correct way to do it in this version.

    I need to change the color of the text of the entire line (no background color) based on the value in one of the columns of the classic report. I have just two conditions, if the value of column = Yes, color should be red, otherwise it must be green.

    I am new to jscript and css, so appreciate if someone can tell me the solution with steps.

    I have already checked this link that changes the value of the column, need to do something similar to the whole line.

    https://tylermuth.WordPress.com/2007/12/01/conditional-column-formatting-in-apex/

    Hi coolmaddy007-Oracle,.

    Here's an example set up on the apex.oracle.com according to the specifications you gave: https://apex.oracle.com/pls/apex/f?p=35467:1

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Here is how it is done:

    Create a dynamic action with the following specifications:

    Name: Give the appropriate name

    Event: After refresh

    Selection type: region

    Region: select your region classic report

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $('td[headers="JOB"]').each(function() {
      if ( $(this).text() === 'MANAGER' ) {
        $(this).closest('tr').find('td').css({"color":"red"});
      }
      if ( $(this).text() === 'SALESMAN' ) {
        $(this).closest('tr').find('td').css({"color":"green"});
      }
      if ( $(this).text() === 'CLERK' ) {
        $(this).closest('tr').find('td').css({"color":"blue"});
      }
    });
    

    NOTE: Download the selector appropriate for your knowledge $('td[headers="JOB"]') case using firebug/browser development tools.

    Items concerned: leave blank.

    PS: Changed the example to change the color of text instead of the background color.

    I hope this helps!

    Kind regards

    Kiran

  • Sort the rows based on column values

    Hello

    I have a table of applications in my jsff page. A columns displays the status for each line that can be successful, error, untreated.

    According to the requirement, the lines should be displayed alphabetically for different status values. First of all, all the lines with the status as "Not processed" should appear in alphabetical order. Then, all the lines with 'Error' status in alphabetical order and the latest ranks with the status of 'Success'

    Pointers how this can be achieved will be useful.

    Hello

    In the query of your view object, adds a clause: ordering by State, yourSecondColumnName.

    If the natural order of your status column is different from the order of your choice (untreated, error, success), you can:

    1 Add a calculated column in your query to use in the order of. For ex, add a column and named statusInt by the expression (case when status = Not_Processed then 1 when status = error then 2 3 another thing). So the order by clause will be: stautsInt, yourSecondColumnName.

    2 - a more dynamic solution is to have the priority of your articles set in the db (for ex a new column in the table where the statutes are defined) and include this priority column in your query to the order you want.

    Kind regards

    Elias.

  • Get the value based on the column names for the custom of the Webcenter content metadata field

    University Complutense of MADRID, I created a custom text metadata field.  I then activated optlist this area.  I fill the optList values, I use a view.  The view has three columns.  Let us call their ID, Key, Value.  OptList shows keys in its list.  I then create content (Content ID: MyContent) Webcenter content and choose the OptList values for my new field of metadata (MyField).

    WebCenter portal, I'm filling a selectOneChoice with MyField values in the content ID: MyContent.  Remember the previous step, the values entered in selectOneChoice lists them selected values from the field MyField optList.  The optList is filled from view.  After the user selects a value in selectOneChoice, in Javascript, I need to alert a message in this format "selected value - matching value from the view of the optList that fills MyField.

    In my opinion, only an example will be useful:

    This is a view that I created in Configuration Manager applet in Webcenter content Admin cmdlets :

    ID | State | Capital

    1. North Carolina | Raleigh

    2. California | Sacramento

    3. Illinois | Chicago

    Then I create a custom field (name: MyField).  MyField is an optList values are filled with view created above.  Internal value and the display value are the two State.  Then I have a new content with Content Id Check-In: MyContent.  To MyContent, I select these values in OptList MyField: {North Carolina, Illinois}.

    In my portal Webcenter application, I create a Taskflow presenter content.  I have set up as single content item presenter.  I attribute as content ID MyContent.  Then, in templateView, I get all the values of MyField in MyContent and display as selectOneChoice.  I created a javascript function that would get the value that the user selected in selectOneChoice.  In the view created in the Webcenter content Configuration Manager (see above), there is a value corresponding to each displayed value.  So, for the selected value, I need to get the corresponding Capital and display in my alert message.

    Starting from Javascript, how can I get the value of the Capital, since I have the status value.

    Hello.

    The idea to reach your requirement is planned:

    • Create an Assistant manage bean that will appeal as access map: #{stateUtil ['Calofironia']} (it will return Raleigh). This value will get calling GET_SCHEMA_VIEW_VALUES IDC service using RIDC in your managed bean.
    • Pass the result of #{stateUtil ["statename"]} to your JavaScript function to help

    I hope this information help you.

    Kind regards

  • How to get the total number of occurrences based on the value of a column.

    Hi all

    It is the first time I'll ask the question here on your forum, but since then followed several threads. I guess it's now my turn to ask a question. Anyway here's the thing, I have a query that should return to count the number of rows based on the value of HOUSING. Something like this:

    -----
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            3
    1-2                   TRALTEST43S1     2            3
    3                     TRALTEST43S1     3            3
    4-6                   TRALTEST43S2     1            4
    4-6                   TRALTEST43S2     2            4
    4-6                   TRALTEST43S2     3            4
    7                     TRALTEST43S2     4            4
    -----

    As you can see above, on the TRALTEST43S1 of the SLOT, there are three occurrences, so M (Total number of occurrences) must be three and this column N he's counting. It is the same with the TRALTEST43S2 of the SLOT. It's the query I have so far:
    SELECT DISTINCT
    WIPDATAVALUE, SLOT
    , LEVEL AS n
    , m 
    FROM
    (
      SELECT
        WIPDATAVALUE
        , SLOT
        , (dulo - una) + 1 AS m 
      FROM
      (
        SELECT 
          WIPDATAVALUE
          , SLOT
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, 1, INSTR(wipdatavalue, '-')-1) END AS una
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, INSTR(wipdatavalue, '-') + 1) END AS dulo
        FROM trprinting
        WHERE (containername = :lotID OR SLOT= :lotID) AND WIPDATAVALUE LIKE :wip
      )
    ) CONNECT BY LEVEL <= m
    ORDER BY wipdatavalue;
    And it leads to something like this:
    -----
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            2
    1-2                   TRALTEST43S1     2            2
    3                     TRALTEST43S1     1            1
    4-6                   TRALTEST43S2     1            3
    4-6                   TRALTEST43S2     2            3
    4-6                   TRALTEST43S2     3            3
    7                     TRALTEST43S2     1            1
    -----

    I think that my current query based results M and N on WIPDATAVALUE and not HOUSING that's why I get the wrong result. I also tried to use WITH instruction and it works well, but unfortunately, our system cannot accept the subquery factoring.

    I know that you guys will be of help because you are all awesome. Thank you all

    Published by: 1001275 on April 19, 2013 20:07

    Published by: 1001275 on April 19, 2013 20:18

    Hello

    1001275 wrote:
    Hi sb92075,

    You are right that it is available with this version. But our system doesn't put queries that use subquery factoring.

    What system are you talking about? If you really have something that prevents you from using all the features of Oacle, you should seriously think about fixing it.

    Any other ideas on how we can do this without help WITH clause?

    Yes; If a WITH clause is referenced that once, it can be re-written as a point of view online:

    SELECT       wipdatavalue
    ,       slot
    ,       ROW_NUMBER () OVER ( PARTITION BY  slot
                                 ORDER BY          low_number
                        )                    AS m
    ,       COUNT (*)     OVER ( PARTITION BY  slot )     AS n
    FROM       (     -- Begin in-line view (got_numbers)
                SELECT     wipdatavalue
              ,     slot
              ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                                        , 1
                                   , INSTR ( wipdatavalue || '-'
                                               , '-'
                                        ) - 1
                                   )
                            )          AS low_number
              ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                                        , 1 + INSTR ( wipdatavalue
                                                       , '-'
                                                )
                                   )
                            )          AS high_number
              FROM     trprinting
           )     -- End  in-line view got_numbers
    CONNECT BY     LEVEL               <= high_number + 1 - low_number
         AND     low_number          = PRIOR low_number
         AND     PRIOR SYS_GUID ()      IS NOT NULL
    ORDER BY  low_number
    ,            m
    ;
    

Maybe you are looking for

  • Cannot connect to Skype, Windows desktop application

    I can't connect to Skype Windows desktop App Win7, Skype 6.9.0.106. Username and password are good. I can log on with these on skype.com. Also I can log in using my address WP8 and hotmail.com. If I try to use my e-mail for loging hotmail.com address

  • disk utility

    Im trying to remove and restore the capacity of a hard drive partition, but I cannot do it. I el captain, and when I open the partition of my hard drivem the slice of the partition already deleted not whow. It shows the whole pie.

  • Impregnation to E &lt; CLOSED &gt; motorcycle test

    Dear friends do not share your personal information such as the IMEI number or impregnation test associated

  • Windows Easy Transfer ends with the restart Message

    I'm trying to use Windows easy transfer to transfer files from my old laptop Windows XP 32 - bit for my new laptop Wn7 64-bit. I downloaded the XP application usng the laptop Win7 and transferred on the XP laptop and installed there. I used my networ

  • Install Windows 8 could not get error - internal error. Cannot continue the installation.

    Windows 8 installation failed, now trying to install again, and when I hit the installation, I get "internal error: cannot continue installation." He could have a few errors during download. Please Try Again '... I continue to try and try, re-downloa