ranking of values in SQL calendar

Hi all

I have a sql of base calendar, which is used as a list. There are only a couple of entries in each day showing the names of the people. I have a custom view by defining such that the name is highlighted in different colors according to their status of guard.

My problem is that the calendar does not systematically display the values in a particular order and so, for example, in the calendar (monthly type) it might show:

LUN - Red | Green
Mar - Red | Green
Sea - green | Red
Thu - Red | Green
Frid - green | Red
Sat - green | Red
Sun - Red | Green

I am aware of a javascript sort() method but do not know how I would want (or if I should) implement this in my calendar.

Ideas or suggestions out there?

Thanks in advance,
Mike

Hi Mike,.

Have you tried to sort the data in the SQL statement itself? I did a similar thing where not there had more than one entry per day and sort the data itself kept compatible output - make sure you sort by the first date field, and then by the name field.

Andy

Tags: Database

Similar Questions

  • Is it possible to use the default value as sql expression in obiee 11g report?

    Hi all

    Is it possible to use the default value as sql expression in obiee 11g report?. Actually what I'm trying to make is that we send an ibot users. They want the same default values that are assigned in the command prompt in the report. So when we send the ibot it shows the report for default values assigned in the report criteria which is obsolute. As a solution, I kept the report in a dashboard page and send the dashboard like ibot page. But the problem here is that I can send only pdf format. Is it possible to do so at the level of the report (without using session variables). I want something like that

    Date between Date ' @{PV1} {Timestampadd (SQL_TSI_DAY,-90, CURRENT_DATE)} and Date ' @{PV2} {CURRENT_DATE}

    Thanks in advance

    Thank you

    AJ

    http://www.w3.org/2001/XMLSchema-instance"container ="http://www.w3.org/2001/XMLSchema"xmlVersion ="201201160' xmlns:sawx="com.siebel.analytics.web/expression/v1.1" > "

    "Question time '." Date '.

    "Question time '." Date '.

    BOX WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 1) THEN TIMESTAMPADD (SQL_TSI_DAY,-2, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 2) THEN TIMESTAMPADD (SQL_TSI_DAY,-3, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 3) THEN TIMESTAMPADD (SQL_TSI_DAY,-4, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 4) THEN TIMESTAMPADD (SQL_TSI_DAY-5 (, cast (max (CURRENT_DATE) date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 5) THEN TIMESTAMPADD (SQL_TSI_DAY,-6, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 6) THEN TIMESTAMPADD (SQL_TSI_DAY, 0, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 7) THEN TIMESTAMPADD (SQL_TSI_DAY-1, cast (max (CURRENT_DATE) date)) END

  • Is there a way to get v ('APP_USER') to return a value in sql developer?

    Hi all

    I had a vision that looked like this:

    select *
    from projects
    where prj_manager = SYS_CONTEXT('MY_CONTEXT', 'USER_NAME');
    

    I discovered that to replace the call to sys_context (as below) made my request 10 times faster.

    select *
    from projects
    where prj_manager = v('APP_USER');
    

    The question I have now tested my opinion of sql developer. Is there a way to get v ('APP_USER') to return a value in sql developer?

    Thank you

    René

    Version of database?

    Definition of the g_cape_context_pck.get_context_name function?

  • To meet a numeric value in SQL

    Dear friends

    I have a field in a table of characters. Values of a field as below

    col_value

    50/60

    103/104

    49/50

    I want to take the values before / eg 50,103,49 how can I do this in SQL.

    Concerning

    Kam

    As I suppose, you need like below.

    If you have 5686890 then you must display as is right?

    for this use it...

    Select SUBSTR (col_value, 1, (decode (INSTR(col_value,'/'), 0, length (col_value) + 1, INSTR(col_value,'/')))-1) doubles.

  • DBCA Script error: "Please enter a value:" @ xdb_protocol.sql @catqm.sql

    On Windows 7, I created a Script DBCA to automate the creation of databases identicall DB.

    I've run the cmd.exe bat I started as an administrator

    The xdb_protocol.sql script when catqm.sql is called, the cmd collapsed
    it asks for a value of ' give a value for 4 a: ' (In German, in fact ' as you are a f³r Wert ein 4: ")
    http://img62.imageshack.us/img62/1145/tempin.jpg
    Sound for *: user_opt_secfiles: = ' and 4' *; " must be YES or NO is not auto-ensemble. What I wear?
    ---------------------------------------------------------------------------------------------------------------------------------
    SQL > set xdb_pass = & 1
    SQL > set res_tbs = & 2
    SQL > set temp_tbs = & 3
    SQL >
    SQL > user_opt_secfiles variable varchar2 (30);
    SQL > variable usesecfiles VARCHAR2 (3);
    SQL >
    SQL > Rem determine if safe files will be used for xdb.xdb$ resource
    SQL > Rem
    SQL >
    SQL > declare
    + checkcompat 2 Boolean: = FALSE; +
    start + 3 +.
    + 4: usesecfiles: = 'NO '; +
    + 5: user_opt_secfiles: = 'and 4'; +
    + 6 +
    + 7 If no option has been passed, try to use secure files +.
    + 8 if (nvl(:user_opt_secfiles,'YES')! = 'NO') then +.
    + 9 checkcompat: = TRUE; +
    + 10 end if; +
    + 11 +.
    + 12 secure files can only be used for 11.0.0.0 less compatibility level.
    + if 13 (checkcompat) then +.
    + if ((dbms_metadata_util.get_canonical_vsn (dbms_metadata_util.get_compat+) 14))
    _vsn()) > = +.
    (+ 15 dbms_metadata_util.get_canonical_vsn ('11.0.0.0'))) then +.
    + 16: usesecfiles: = 'YES '; +
    + 17 end if; +
    + 18 end if; +
    + 19 +.
    + exception 20 +.
    + 21 then than others then +.
    + 22 return; +
    + 23 end; +
    + 24 / +.
    As you are a f³r Wert ein 4:
    ---------------------------------------------------------------------------------------------------------------------------------

    The following scripts should be run from the shell, BOOL where it is blocked scored

    @D:\app\admin\DBNAME\scripts\CreateDB.sql
    @D:\app\admin\DBNAME\scripts\CreateDBFiles.sql
    @D:\app\admin\DBNAME\scripts\CreateDBCatalog.sql
    @D:\app\admin\DBNAME\scripts\JServer.sql
    * @D:\app\admin\DBNAME\scripts\xdb_protocol. SQL *.
    @D:\app\admin\DBNAME\scripts\ordinst.sql
    @D:\app\admin\DBNAME\scripts\interMedia.sql
    @D:\app\admin\DBNAME\scripts\emRepository.sql
    @D:\app\admin\DBNAME\scripts\apex.sql
    @D:\app\admin\DBNAME\scripts\lockAccount.sql
    @D:\app\admin\DBNAME\scripts\postDBCreation.sql

    call the xdb_protocol. SQL cells line of BOOL
    SET VERIFY OFF
    Connect "SYS" / "' & & sysPassword ' as SYSDBA"
    set echo on
    coil D:\app\admin\DBNAME\scripts\xdb_protocol.log append
    * @D:\app\product\11.2.0\dbhome_1\rdbms\admin\catqm. SQL * change_on_install SYSAUX TEMP;
    Connect "SYS" / "' & & sysPassword ' as SYSDBA"
    @D:\app\product\11.2.0\dbhome_1\rdbms\admin\catxdbj.sql;
    @D:\app\product\11.2.0\dbhome_1\rdbms\admin\catrul.sql;

    I HOPE I CAN DO THAT I HAVE NOT DESTROYED THE INSTALLATION. I'VE BEEN SED IT WOULD ALL AUTOMATICALLY THE SAME MAKE :(

    The configuration for my new DB* was simple
    Create the database-> custom database
    File server
    Configure Enterprise Manager
    No notification
    File system
    Locations of files of database model + Execute an empy Script
    No Flash Recovery-no-no archiving Oracle JVM - N ° Oracle XML DB
    Only the Enterprise Manager (SYSAUX) repository
    Memory typical < 1 GB
    Automatic memory management
    Standard sizing 8192 etc..
    Selected character set AL32UTF8
    Dedicated server mode
    Leave the default settings 11g s

    Published by: Goodfire on May 17, 2013 13:55

    Published by: Goodfire on May 17, 2013 15:55

    Hello

    You must add a setting to YES in the end, it will work
    as

    @D:\app\product\11.2.0\dbhome_1\rdbms\admin\catqm.sql change_on_install SYSAUX TEMP YES;
    
  • Print out the values of SQL attributes and attributes of cursor...

    How to print values for the rest of the SQL attributes or the attributes of the cursor.

    % LYING
    % NOTFOUND
    % ISOPEN

    Hi Isabelle,.

    The cursor attributes % FOUND, % NOTFOUND, OPEN any return BOOLEAN value.

    So if we try to display its value in DBMS_OUTPUT. Put_line it gives following error

    declare
    cursor c is select a from test2;
    r number;
    begin
    open c;
    fetch c into r;
    dbms_output.put_line(C%found);
    close c;
    end;
    
    ORA-06550: line 8, column 1:
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
    ORA-06550: line 8, column 1:
    PL/SQL: Statement ignored
    

    That is why these attributes are used with, IF the conditions to check the TRUE or FALSE value returned by them as below.

    declare
    cursor c is select a from test2;
    r number;
    begin
    open c;
    fetch c into r;
    if c%found then
    dbms_output.put_line('TRUE');
    END IF;
    close c;
    end;
    
    TRUE
    
    PL/SQL procedure successfully completed
    

    Twinkle

  • How can I replace the value of the column with a particular value in SQL

    Hi all

    Is someone can you please tell me how can I format my output with the replacement of a column value with a specific value that really depends on the current value of the column

    I am executing the following SQL statement

    Select state, count (id) from < table_name > where composite_dn = < composite_dn_name > Group by State;
    My current performance is:

    State Instance number
    1 3
    3 28

    I want to replace the value in the State column as follows

    No.OfInstances State
    3 filled
    28 faulted

    I want '1' to be reppaced of 'Done' and '3' is replaced by 'Faulted. '

    Is is possible with SQL or PL/SQL, if it is then how I can achieve this required. Help, please!

    Thanks in advance!

    Published by: Roshni Shankar on October 27, 2012 12:38 AM

    Hi Claude,.

    I guess this CASE clause can be simulated by a DECODE and also it is very easy to use.
    See - http://www.techonthenet.com/oracle/functions/decode.php

    select decode(t1.state,t2.state_id,t2.state_name), t1.count_id
    from  t2, (select state,count(id) count_id
     from 
     where composite_dn= 
    group by state) t1
    where t1.state = t2.state_id;
    

    HTH
    Vanessa B.

    Published by: Vanessa B on October 27, 2012 14:02
    -link added

    Published by: Vanessa B on October 27, 2012 14:19
    -added code sample

  • Set a default value for SQL based LOV

    Hello

    Is there a way to set the default value in a LOV. Like let him say the LOV gets of the separate to_Char(date_field,'YYYY') in a table. I want the last year is the default value. Currently, since I was the null option also, when the page loads, the lov is always null. I need to change it manually.

    Thank you
    Sun

    You can easily set the default values for the dynamic element

    http://docs.Oracle.com/CD/E23903_01/doc/doc.41/e21674/bldapp_item.htm#HTMDB28287

    for example, select the default type in the body of the PL/SQL function and enter the following code

    declare
    v_return date;
    begin
    select max(date_field) into v_return from your_table;
     return to_Char(v_return,'YYYY');
    exception when others then
    return null;
    end;
    
  • Get the positive values of sql

    I have the balance column and I need to choose only positive of the sql query values.

    Balance
    200
    -20
    -220
    100

    EXPECTED
    Balance
    200
    100

    Like this??

    SELECT SUM (balance)
      FROM (SELECT total (KEY, program) balance
              FROM your_table
             WHERE total (KEY, program) > 0)
    
  • Impression, value inPL/SQL passthrough

    Hi all

    Can someone help me, how to print the value of passthrough with PL/SQL.


    I use Norman to check what passthrough, DML in PL/SQL before they running


    Please help me

    There are not currently ahy medium to do this, but... PassThrough does not currently play well with PL/SQL, so you better avoid this in any case.

    Chris

  • How to use the multiple selection list values in sql query

    Hi all
    In the search form, I have a multiselect llist tell (P3_STATUS) and I want to have a query using this element and fetch documents
    How to do a sql query based on the selection of the value of this element.
    SELECT "W"."START_DT" "Start Date",
           "W"."CAMPAIGN_CODE" "Campaign Name",  
           "W"."MKT_CHANNEL" "Channel",
           "W"."MKT_SUB_CHANNEL" "Sub Channel", 
           "W"."PROMO_CODE" "Promo Code",
           "W"."TRACKING_CODE" "Tracking Code",
           "W"."TFN" "TFN",
           "W"."STATUS" "Status",
           "W"."CAMPAIGN_CODE" "Edit"
           FROM 
             "WC_MKT_CAMPAIGN_DS" "W"
      
           WHERE 
         (MKT_CHANNEL = decode(:P1_CHANNEL,'%null%',MKT_CHANNEL,NULL,MKT_CHANNEL,:P1_CHANNEL))
       AND
    (MKT_SUB_CHANNEL= decode(:P1_SUB_CHANNEL,'%null%',MKT_SUB_CHANNEL,NULL,MKT_SUB_CHANNEL,:P1_SUB_CHANNEL))
    AND *STATUS = decode(.................*
    Please could someone help me on this?

    Thanks in advance
    Robert L

    Try to change your selection of status to

    AND INSTR(':'||:P3_STATUS||':',':'||STATUS||':') > 0
    
  • Get the "selected lines" value after sql custom query in the database adapter

    We execute a custom query in a database adapter. With other technologies (JDBC, etc.) the result of a query produces not only a game but the number of lines selected results. For example, the output of the script of Oracle SQL Developer will display something like:

    9999 selected lines

    at the end of the output of the script.

    I would like to obtain this value for a BPEL process. Of course, I could run a 2nd interview whose where clause is identical to the first, but select count (*) instead. However, it is not only ineffective but (in rare circumstances in an active database) could be the problem.

    It is not obvious to the novice BPEL how to get the selected value and the result set row in an Invoke. Is this possible?

    Maybe it's not the only solution - but this is how I did in the past.

    After step to invoke the adapter, use a step of the having-right/copy to fill a variable of integer type BPEL using the xpath count function...






    That should affect the number of records returned by the query.

    I hope this helps.

    Rod.

    Published by: Tunnels of Rod on December 15, 2009 13:16

  • Restrict the time value in the calendar

    Hello..

    How to display the calendar without time value

    When I select the date in the calendar he displayed without time, but when I hit the go button the time value is added to the prompt values.

    How to get there?

    What version of OBIEE do you use?

    The procedure is all is set correctly to get the date (without timestamp) in the dashboard caledar prompt. I explained procedure several times, then maybe you can read:

    http://108obiee.blogspot.com/search/label/date

    There are a few posts on this problem and you will find your solution there, it is very useful and you will notice that I have not timestamp in the prompt calendar inside my examples. Step by step.

    Concerning
    Goran
    http://108obiee.blogspot.com

  • Convert int value of sql in QString without using C++

    Hi, I'm having trouble passing an integer value in my list. I am entirely dependent on QML and would rather not touch C++ because they tend to create more problems for me sometimes.

    I need to load some data such as: Int ID, string directory in my GroupDataModel.

    It is:

    (1) I use the ID as a sort key

    AND

    (2) I want to display on my list as well.

    I found another solution that calls for the values to store them as "001, 002, 003," etc, but as I mentioned, I would like to view the information and is not sustainable.

    I wonder if maybe I can use javascript to convert this string? I tried to look for Qt btu solutions, they are all highly dependent on C++ and I do not want to touch that.

    I tried:

     function convertInt (data){return QString(%1).arg(ListItemData.CategoryID || "")}
    

    But it doesn't seem to work at all...

    I also tried ListItemData.CategoryID.toString () but it does not work as well...

    Can someone please? Thank you!

    After hours of trial and error, I finally managed to get CategoryID show.

    Instead of referring to him as ListItemData.CategoryID, I just used: ListItemData under the heading ListItemComponent.

    I also deleted the itemType function because it does not seem necessary here atm.

    Apparently it's kind of 'automatic' putting in the CategoryID in the sortingKeys and grouping.

  • put the value of the calendar in the Date object

    Hello

    I'm completely stuck and moving in circles.

    I have a specific date at which I entered in a calendar object using the following:

    caltestTime.set(Calendar.YEAR,2011);
            caltestTime.set(Calendar.MONTH,5);
            caltestTime.set(Calendar.DAY_OF_MONTH,7);
            caltestTime.set(Calendar.HOUR,11);
            caltestTime.set(Calendar.MINUTE,27);
            caltestTime.set(Calendar.SECOND,00);
    

    Now I'd put this in a Date object, so I can do some running on it and then convert back to a calendar object. Is there a simple way to do this? Or is it just not possible? I would liketo finish with a Date object that represents the time as in the calendar object. Help, please.

    Cyriel

    Calendar.setTime (Date of) sets the calendar date.

    Date d = Calendar.getTime () becomes the object of Date in the calendar.

Maybe you are looking for