Listing of the items only from a specific range

Hello

I have a list of about 100 pages, each of them using date_create variable to the date, they were entered in the database; These entries are the years 2005 to 2008. I need the list of those of the last only six months, but without Hardcoding specific values, then it automatically displays the correct list. Could someone edit me the code for this?

The code I am using right now is:

< name cfquery = "disp_news_arti_curr" datasource = "" #Request.MainDSN # "CACHEDWITHIN =" #CreateTimeSpan (1,0,0,0) #">"
SELECT
URL, name_pub, date_create, author_pub, id_news_arti, title
Of
data_news_arti
WHERE
"status = 1 AND date_create > = ' 01 Sep 2005.
ORDER BY
date_create DESC
< / cfquery >

Thank you
[email protected]

Thank you for all your help. I inherited this web site focused on CF and have very little knowledge of this technology.

I was able to apply some of your comments to change the code. Here's the final copy:


SELECT the url, name_pub, date_create, author_pub, id_news_arti, title
OF data_news_arti
Situation WHERE = 1 AND date_create > = #last_six_months #.
ORDER BY DESC date_create

Thank you very much.
jstama

Tags: ColdFusion

Similar Questions

  • Some keys stop working after the update of the Sierra (only for a specific profile)

    After update to Sierra my keyboard worked well for a while.  But at random, U I O P J K L keys stopped working.

    The bug only shows 1 profile. If I create another profile new profile keyboard works very well.

    Anyone know what that sometimes caused that and with the fix is?

    Hello ExcelsiorPath,

    After reviewing your post, it seems that several keys do not work on a single profile. This looks like an option that may have been changed.  I recommend you to read this article, it may be able to help solve the problem.

    If the other keys do not work

    You may have accidentally set an option that changes your keyboard works.

    • Choose the Apple menu > System Preferences, click Accessibility, and then click keyboard. Make sure that slow keys is turned off. If slow keys is enabled, you will need to keep a key longer than usually before it is recognized.

    • Choose the Apple menu > System Preferences, click Accessibility, and then click mouse and Trackpad. Make sure that the mouse keys is turned off. If the mouse keys is enabled, pressing the keys in the numeric keypad moves the pointer instead of entering the numbers.

    • Choose the Apple menu > System Preferences, click keyboard, and then click input methods. Select "Show the menu in the menu bar." Open the menu entry, then make sure that the correct keyboard layout is selected.

      To display the keyboard layout, click keyboard, and then choose "See the viewers for emoji keyboard symbols in the menu bar."

    macOS Sierra: If your keyboard does not work

    Thank you for using communities of Apple Support. Good day.

  • How to create a report based on the item selected from the list of selection?

    Hello

    I created a tables_LOV based on:

    Select table_name table_name user_tab_cols r, d

    where column_name like '% _type % '.

    Then I created a ListOfTables page element, display in a selection list and pointing to tables_LOV.

    I run the page, and I can choose the table I want in the drop-down list.

    How to create a report based on the selected element? (ex: select * from selected_table)

    Thanks in advance

    Salah

    Hi Salah,

    Allright, take a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report

    I think that simulates what you are trying to accomplish. I've implemented the simplest method I could think of.

    The report is based on a collection of apex. If you are not familiar with this, you should study the documentation: APEX_COLLECTION

    To recreate my example, you should:

    (1) create a report (interactive) on your collection

    SELECT *
       FROM APEX_collections
     WHERE collection_name = 'MY_COLLECTION'
    

    (2) create a selection list page_item for the tables that you want to display (in my case, this is called "P38_TABLES")

    (3) create a dynamic action that triggers on the evolution of your selection list page_item. Dynamic action must be a parade of PL/SQL procedure the following code:

    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
    
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
        );
    end;
    

    Make sure that you add your page_item 'Page to send items' section.

    (4) add a real extra action that makes an update of the report area.

    Here are two photos describing the da:

    http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA1.PNG

    http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA2.PNG

    Good luck and greetings,

    Vincent

    http://vincentdeelen.blogspot.com

  • Get the value of the item application from another application

    Hello

    My apologies if this has been answered elsewhere, but it is very difficult to find something relevant when you are interested in the function V!

    My application consists of a number of different applications APEX that use the same cookie so that you can easily navigate between applications without having to log in again and to keep the same session id. Having separate applications allows to group pages and reuse the code easily.

    I have a requirement to be able to write the values stored in the fields in a single application to the database through a process on a page in another application. As a simplified example, that is to create messages and bookmarks of pages to display specific records in the database. The user will navigate through the system and find a record that they are interested, click on a button that displays a page from another application, enter in some details and then save the record in the database.

    The application of 'other' page knows the url of page called him, so that he knows also the application id and the page, but he doesn't know what file is being viewed. I can find the application and the page id is the name of the element that stores the primary key. I noticed that the V function also accepts the stream id, so it should be easy to then get the value by V (v_item_name, v_app_id). However it always returns null.

    I've simplified this by adding a page on the homepage (32561 application) process to insert a value in a table of test using a process page:
    insert into test values ('#'||V('P1_ID'));
    The result is #41
    So if I go to the page in the other application, I have a page process which is:
    insert into test values ('*'||V('P1_ID',32561));
    The result is *.
    I thought that maybe the other page of the application was ignorant of id flow, in that I spent, but change the above to:
    insert into test values ('*'||V('P1_ID',));
    The result is * 1 (the value of P1_ID in the other application)

    I'm doing something wrong? Have I misunderstood how the V function? Or is there another way I can retrieve the value of an element of application in another application?

    I am currently in 3.1.2, but I just tried this on apex.oracle.com (3.2) with the same results.

    Thank you very much
    Sara

    Hi Sara,.

    Have you seen the answer by Scott here -

    Re: Cross App State of Session

    Namely, using APEX_UTIL. FETCH_APP_ITEM

    APEX_UTIL.FETCH_APP_ITEM(
        p_item    IN VARCHAR2,
        p_app     IN NUMBER DEFAULT NULL,
        p_session IN NUMBER DEFAULT NULL)
    RETURN VARCHAR2;
    

    John.
    --------------------------------------------
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    AWARDS: Don't forget to mark correct or useful posts on the forum, not only for my answers, but for everyone!

  • A theme installed do not get off or even eliminated from the main body of the browser, only from the header.

    Even after uninstalling all the themes and to return to default, the footer continues to display only a particular theme - heavenly. At the same time, on this dark background whenever the mouse cursor moves over a row in Gmail, the line turns white. Unreadable and irritating.
    This happened before I updated to Firefox 12 and persists when I updated to Firefox 13 today.
    Firefox on my another desktop with the same theme doesn't have this problem.
    Grateful for any guidance to get a solution.

    I see nothing in the screenshot that resembles a footer with a background image outside the module bar that displays messages from the NoScript extension.

  • get the Inputstream of the file jasper from a specific path

    Hello

    I use jdev 11.1.1.7.0

    I need to get the InputStream of the file jasper in my application to view the report in PDF format. I do this by following codes:

    
    ServletContext context = getContext();
    InputStream inputstream = context.getResourceAsStream(repPath); //  repPath = "reports/reportName.jasper"
    
    
    
    

    whereas the repPath is the folder that exist in the current application (ViewController\public_html\reports\reportName.jasper)

    but I want to put all in a specific folder as "d:\reports" and all reports call for applications of this path.

    but when I put repPath = "d://reports//reportName.jasper", the variable in the code below inputstream is null

    
    InputStream inputstream = context.getResourceAsStream(repPath); //  repPath = "d://reports/reportName.jasper"
    
    
    
    

    I need to have a specific for all reports path, because some reports can be called from many applications, can someone help me?

    Habib

    Concerning

    getResourceAsStream() return resources compared to the current ClassLoader.

    You can use something like:

    inputstream = new FileInputStream(repPath);
    

    Dario

  • Advanced configuration of pricing price list displays the items of the other operation of the unit in the value of the product

    Hello!

    When I set up a new price list and entered in the value of the product (product - item number attribute) column, the LOV displays items in another business unit. What should I put to see items in my business unit?

    Thank you.

    Jon

    I think I found the solution. I have set the option of profile PS: point Validation to my business unit organization.

  • XML data convert the data of the item only

    Hello everyone,

    I create a form that uses the web service. My exit came in the form of xml as...

    < NewDataSet >
    < table >
    < PRIVATE_MARKA_BATCH_NO > 0622 < / PRIVATE_MARKA_BATCH_NO >
    < /table >
    < table >
    CABINET < PRIVATE_MARKA_BATCH_NO > < / PRIVATE_MARKA_BATCH_NO >
    < /table >
    < / NewDataSet >
    I want to only data element as 0622, WARDROBE. Is it possible to delete the titled XML? Help, please...

    Forms [32 bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

    also

    SQL> select * from v$version where rownum=1;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    
    SQL>
    SQL> select trim(column_value)
      2    from (select xmltype('
      3  
      4  0622
      5  
    6 7 DOOR CABINET 8
    9
    ') xml 10 from dual) t, 11 xmltable('string-join((for $i in /NewDataSet/Table/PRIVATE_MARKA_BATCH_NO return $i), ",")' 12 passing t.xml) x 13 / TRIM(COLUMN_VALUE) -------------------------------------------------------------------------------- 0622,DOOR CABINET SQL>
  • Change the view with email list on the left, not from list above and the content of the email below.

    I like my emails showing up with a list of emails to the left of the screen and the content of the e-mail to the right of the screen, which is how I got it in the old outlook program, I have used. Can someone tell me how to change the view, it looks like this?

    View (Alt + V) menu > Presentation > vertical display

  • Tight: How the image to follow the mouse only from left to right

    I'm on a tight schedule and are looking for the AS3 code how do which makes this company on their website:
    http://www.imageworksstudio.com/

    However, I don't know AS3.

    Literally my project requires I have recreate the which is shown with the hand holding the sharpie and moving only back limited to a centered rectangular area at the bottom of the screen.

    I know how to import the image that follows the mouse on the stage and make a videoclip. Let's say that I named the instance "Image_mc".

    Someone has the ActionScript for how to do this? He tie you to the object or a keyframe on a layer separate actions ?

    I appreciate any help! Thank you!

    The replacement of these two lines of code in AS3 would be:

    mouseX = box_mc.x + (box_mc.x - mouseX) / 2

  • Show the item only after the process ran

    Hello

    I have 3 questions:
    -: P1_ENTERED_VALUE (text field)
    -: P1_DEFAULT_VALUE (display text)
    -: P1_DIFF_VALUE (display text)

    Users enter a value in: P1_ENTERED_VALUE and trigger a process with a button.
    The process compares the number of: P1_ENTERED_VALUE with: P1_DEFAULT_VALUE and fills: P1_DIFF_VALUE. So far, it's working.

    What I want is: P1_DEFAULT_VALUE and: P1_DIFF_VALUE are not displayed until the key was pressed.
    What I tried: because: P1_DIFF_VALUE is null until the process, I put a condition to element: P1_DEFAULT_VALUE:
    -Condition Type: "value of element in the Expression 1 is NOT NULL"
    -1 expression: P1_DIFF_VALUE

    If the colon (: P1_DEFAULT_VALUE and: P1_DIFF_VALUE) would show only after that the process is running.

    The problem is that: P1_DIFF_VALUE now always shows 0 and no difference, because the element with the condition (: P1_DEFAULT_VALUE) obviously to not just hidden before the process, but too inactive.

    How can I solve this problem?
    Thanks in advance,

    Roger

    Roger:

    The calculation of P1_DIFF_VALUE should be done using the element hidden in which you retieved "by default".
    The hidden element should not be subordinated.
    Are these two statements true for your page?

    CITY

  • Outlook crashes when you read the e-mail from a specific sender

    whenever I received email from Paypal and try to read it, it crashes my outlook program. Why is this happening?

    Your question belongs to one of:
    http://answers.Microsoft.com/en-us/Office/Forum/office_2003-Outlook
    http://answers.Microsoft.com/en-us/Office/Forum/Office_2007-Outlook
    http://answers.Microsoft.com/en-us/Office/Forum/office_2010-Outlook

    See this: http://www.howto-outlook.com/news/paypalmessagehangs.htm

  • Validate the value of the item only with the alphabets and hyphen

    Hi Experts,

    I have a text field element, I want to create a posting as

    It must contain a hyphen as a separator

    example: -.

    valid entry

    A B

    AA-BB-CC

    Invalid entry

    -A, A-,AA-AB-,-BC-CC-etc.

    I tried certain regular expressions but found no solution,

    Please suggest me a solution

    Kind regards

    Jitendra

    declare
      v_check_string  varchar2(4000);
      v_error_message varchar2(32767);
    begin
      v_check_string := trim(:p1_text_field);
      if ( v_check_string is null
         or (   translate( v_check_string, '#ABCDEFGHIJKLMNOPQRSTUVWXYZ-', '#' ) is null -- only alfabetic and -
            and substr( v_check_string, 1, 1 ) != '-' -- first character not -
            and substr( v_check_string, -1 ) != '-' -- last character not -
            and instr( v_check_string, '--' ) = 0 -- not two ore more repeating -
            )
         )
      then
        null; -- valid string
      else
        v_error_message := 'String: "' || v_check_string || '" is not valid';
      end if;
      return v_error_message;
    end;
    
  • How to get the items selected from indesign Document?

    Hi all

    I'm trying to get the objects selected by the user in the indesign document, to which the following code, I wrote, but his does not collect do not.

    LayoutTarget InterfacePtr < ILayoutTarget > (myContext, UseDefaultIID());

    if (layoutTarget == nil)

    {

    () CAlert::ErrorAlert

    "layouttarget sucks" );

    breaking ;

    }

    UIDList itemList = layoutTarget-> GetUIDList (kStripStandoffs);

    where mycontext is IActiveContext and after getting the itemlist (all managers of related texts).

    How to perceive the limits of the textframe? (TopLeft, TopRight, BottomLeft, BottomRight).

    Thanks and greetings

    Sanjeev.k

    You must initialize the ILayoutTarget with a CSB. As

    InterfacePtr iLayoutCSB (iSelectionManager-> QueryConcreteSelectionBoss (kNewLayoutSelectionBoss));

    InterfacePtr layoutTarget (iLayoutCSB, UseDefaultIID());

    HTH.

    Jasmine

  • How to select and move more than one bookmark at a time? Shift + click selects multiple items that are next to each other in a list, because the element

    How to select and move more than one bookmark at a time?
    Shift + click selects multiple items that are next to each other in a list, because the items open in firefox before that happens.

    Glad it worked for you. Thanks for posting back.

Maybe you are looking for

  • To save the movie app crashed using Siri

    I have an Apple TV with the latest non-beta OS 4.  Watching Dark Knight Rises.  Whenever I try to use Siri to save 30 seconds, it rewind the film of 30 seconds and then the film Soft has promptly stops and restarts, forcing me to go through the hassl

  • Tab key doesn't cursor when filling out forms

    My advance tab key is no longer the cursor across the fields when you fill out a form. I don't know if it of a Firefox issue or not.

  • Why take control of camera

    Why should I activate the control of my phone camera to install Firefox?

  • Ethernet driver

    I have a laptop Compaq 610 [Energy Star] product # FM950UT I want to upgrade XP Pro to Windows 7. The compatibility test said that the "Ethernet adapter" will be not compatible. Won't have a chance by using the HP site to find what I need and where t

  • jump fail quiz slide does not

    I work with captivate 9 WindowsI have a choice multiple knowledge check slide, with multiple answers (check all boxes). After two attempts, that I want to go back and see again, so I last attempt value jump slide. But he is not jumping. I don't know