Help with an expanding table on a form

I currently use a form as a photo log for tracking the image number and a photo description.  The form was created in MS Word.  I would like to create this form using LiveCycle Designer and have tried a few things but nothing works the way I would like it to.  The photo log is a table with two columns and a header row.  The table expands (by using the TAB key) the number of rows commensurate with the number of photos entered.  The columns are for a photo number and a photo description.  I would like to be able to create this in LIveCycle so that it works as easily as the MS word doc does (as far as expanding the rows).  I've checked on this forum and cannot find any help topics or threads that match my specific needs.  can anyone offer some insight as to how to solve the problem?  I thank you in advance for your assistance.
Jim

You'll need an "exit" event for the last line in your table. You'll need to check to be sure that it isn't empty, and that it's the last line. Then after you add the line (if necessary) you'l need to set the focus back to the first column in the new line.
Bonus: You'll probably want to be able to have the code check to see if a line is empty (and not the last line) so that you don't have a bunch of empty lines.
If you'd like some code help, PM me what you're starting with.

Similar Messages

  • Is it possible to make a search help with dynamic  selection table?

    Hi Experts,
    Is it possible to create search helps with dynamic seletion tables means
    i dont know the selection table names at the time of creation of search help.
    These tables will be determined at runtime.
    if yes, Please give an idea how to create and pass the table names at runtime.
    Thanks
    Yogesh Gupta

    Hi Yogesh,
    Create and fill your itab and show it with FM F4IF_INT_TABLE_VALUE_REQUEST
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'field to return from itab'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'field on your screen to be filled'
          stepl           = sy-stepl
          window_title    = 'some text'
          value_org       = 'S'
        TABLES
          value_tab       = itab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    Darley

  • Help with the insert table/form tool in BIP 10.1.3.2.1

    Hi, I'm trying to use the insert table/form tool in BIP, and running into some issues that I don't understand. First off, my data coming in looks like this (left column of tool):
    Rowset
    --- Row
    ------ Customer ID
    ------ Customer Name
    ------ Customer City
    ------ Product
    ------ Amount Sold
    I would like the output to do the following:
    a) have one page per customer. Customer should be determined by customer ID, and has attributes of customer ID, customer Name, Customer City
    b) Show a table of all products and the total Amount Sold by product for that customer
    c) Give a "grand total" for the customer
    Can someone help with the steps needed to do this? I've tried several variations of the following without much luck:
    1) Added Rowset and all children to the "Template" pane
    2) Clicked on the "Row" group, and set Grouping = Customer ID, with a break of "New page per Element"
    3) Clicked on the newly created (from step 2) Cust ID group, and set it to group by Product
    4) Moved "amount sold" to be at same level as Product
    5) Moved all of the customer attributes (name, address, etc.) to be at same level as Cust ID
    6) On the Cust ID level, set the style to table
    7) on row and rowset levels, set style to free form
    This seems to be VERY close, except that it isn't creating a total amount for the sum of all products purchased by a customer. What do I need to do inside the tool to get a total per customer to show up?
    Thanks in advance!
    Scott
    p.s. the final hierarchy in the template window looks like this:
    Rowset (style = freeform, no grouping/sort by/breaks)
    --- Row (style = freeform, group by customer ID, break new page per element)
    ------ Customer ID (style = table, group by product, no breaks)
    --------- Product (nothing special)
    --------- Amount Sold (calc for grouping = SUM)
    ------ Customer Name (nothing special)
    ------ Customer City (nothing special)
    Thanks very much for the help!
    Scott

    To anyone else who sees this post, the answer is to do the following. Insert the Amount Sold field using the "Insert Field" tool, and set the function to sum, with the grouping checkbox turned on.
    Thanks,
    Scott

  • Help with collapsible/expandable menus

    I am creating a webpage with collapsible/expandable menus and am having problems with ones of the menus (the menus I am talking about are labelled as BlackBerry, Smartphone, etc). When I open the webpage, I want the collapsible menus to be closed until you click on the header image, but one of them always opens automatically. Please see the webpage I am working on, www.scomputing.com/mobility.html ... I am having problems with the 'Superphone' menu.

    You need to add -  $('.Superphones_Table').hide();  - to the scripts.js file (see below)
    $(document).ready(function(){
                              $('.Ultimate_Webhosting_Package_Table').hide();
                              $('.Free_Webhosting_Table').hide();
                              $('.Ecommerce_Webhosting_Table').hide();
                              $('.BlackBerry_Table').hide();
                              $('.Smartphone_Table').hide();
                              $('.Superphones_Table').hide();
                              $('.Phones_Table').hide();

  • Need help with paging in table layout

    Hi
    I am creating a basic table-form page with around 5000 rows in database table that needs to be displayed.
    However what i see after creating the table form page and adding detail groups i loose paging in the table layout.
    This is however undesirable.I cannot think of what is exactly making this happen there are no significant changes that i have made to the application.
    If I could know what possibly is causing the change, help would be appreciated.
    I can discuss this in detail.

    Which version of JHeadstart are you using?
    What do you mean with "i loose paging in the table layout"? Are the previous/next set and drop down list to select a range no longer displayed?
    Can you reproduce this in the HR demo applcation?
    If you remove the detail groups again, is pagination then working again.
    Steven Davelaar,
    JHeadstart team.

  • Help with Element EMAIL is undefined in FORM

    I am having issues getting my form to work properly after
    moving my files in my repository into a trunk directory. It may not
    be the reason things are failing now but it is the only change I
    have made since yesterday when this code worked. Any help would be
    greatly appreciated.
    Element EMAIL is undefined in FORM.
    The error occurred in C:\dev\b\trunk\content\contactnew.cfm:
    line 139
    137 : <!--- Send an e-mail to the proper group with the
    form information --->
    138 : <cfmail
    139 : from="#form.email#"
    140 : to="[email protected]"
    141 : subject="Contact Us Form from"
    Resources:
    Check the
    ColdFusion documentation
    to verify that you are using the correct syntax.
    Search the
    Knowledge Base
    to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;
    .NET CLR 1.1.4322; .NET CLR 2.0.50727)
    Remote Address 127.0.0.1
    Referrer
    Date/Time 11-Nov-08 03:51 PM
    Stack Trace (click to expand)
    at
    cfcontactnew2ecfm541056183.runPage(C:\dev\b\trunk\content\contactnew.cfm:139)
    coldfusion.runtime.UndefinedElementException: Element EMAIL
    is undefined in FORM.
    at
    coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:1659)
    at
    coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:1612)
    at
    coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1747)
    at
    coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1740)
    at
    cfcontactnew2ecfm541056183.runPage(C:\dev\b\trunk\content\contactnew.cfm:139)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
    at
    coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
    at
    coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
    at
    coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
    at
    coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.CfmServlet.service(CfmServlet.java:175)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at
    coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
    at
    coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    Here is the code I am working on...

    I tried adding what you said to the document. The email is
    not given when the form opens in the browser but is passed via the
    form after it is filled out and submited. The email value should be
    whatever the person adds to the email textbox. Again this was
    working yesterday but has since stopped after I migrated my files
    into a trunk directory in SVN.
    Thanks for your reply.

  • Help with entering a date in a form

    Not sure what's going on here, but its probably something simple, and me missing something obvious...
    Basically I have a form to add a record to a database table.
    I have two date fields in the table, of the type, Date.
    This is my code for adding the record :
    // Add columns
    $ins_clients->setTable("clients");
    $ins_clients->addColumn("name", "STRING_TYPE", "POST", "name");
    $ins_clients->addColumn("company", "STRING_TYPE", "POST", "company");
    $ins_clients->addColumn("website", "STRING_TYPE", "POST", "website");
    $ins_clients->addColumn("tel", "STRING_TYPE", "POST", "tel");
    $ins_clients->addColumn("mobile", "STRING_TYPE", "POST", "mobile");
    $ins_clients->addColumn("email", "STRING_TYPE", "POST", "email");
    $ins_clients->addColumn("enquirydate", "DATE_TYPE", "POST", "enquirydate");
    $ins_clients->addColumn("business", "STRING_TYPE", "POST", "business");
    $ins_clients->addColumn("future", "STRING_TYPE", "POST", "future");
    $ins_clients->addColumn("potential", "STRING_TYPE", "POST", "potential");
    $ins_clients->addColumn("callback", "DATE_TYPE", "POST", "callback");
    $ins_clients->addColumn("notes", "STRING_TYPE", "POST", "notes");
    $ins_clients->setPrimaryKey("ID", "NUMERIC_TYPE");
    And these are the form fields for the dates :
    <input type="text" name="enquirydate" id="enquirydate" value="<?php echo KT_formatDate($row_rsclients['enquirydate']); ?>" size="32" />
    <input type="text" name="callback" id="callback" value="<?php echo KT_formatDate($row_rsclients['callback']); ?>" size="32" />
    All of which seems about right.
    But even when I enter dates in the format 2010-09-23, all that's being written back to the database is 0000-00-00.
    Any ideas where I'm going wrong?
    Thanks.

    I've never seen the method you're using to modify a table before, so I can only add some speculation.
    I'm not familiar with the commands that you're using but it looks like you're trying to create a new table instead of adding a record to a table and that would explain why the database isn't returning the values you're intending - I could be wrong though .
    Are you using a MySQL database? If so, try using a different method to add information to the database and see if that leads to some successful results.
    Use this method to create a table.
    Use this method to insert information into a table.
    Good luck!

  • Need help with calculated fields in Adobe Interactive Forms

    Hi Gurus,
    I have an Adobe Interactive form in which i have radio buttons. Upon selecting any of the radio buttons, value in text box should be changed( Calculqated filedS). How i can achieve this?
    Regards,
    Srini
    Moderator message: wrong forum, please post again in Adobe Interactive Forms, but always try yourself before asking.
    Edited by: Thomas Zloch on Jul 13, 2010 11:58 AM

    Hi Tapan
    No, it's working ,with  one remark.
    I've done a mistake, in the final formula. The logic remain the same! ;)
     The calculation values for second column ( COL2 ) are 1,2,3 and not 0,1,2 as I wrote  before and as for COL1 are so the formula is
    =3*if(COL1="ABC",0,IF(COL1="DEF",1,2)+if(COL2="RST",1,IF(COL2="YYZ",2,3)
    and not
    =3*if(COL1="ABC",0,IF(COL1="DEF",1,2)+if(COL2="RST",0,IF(COL2="YYZ",1,2)
    I created also a real example  for you, with 2 dif calculation ways . First I created 2 calc_columns for COL1 and COL2 ( CALC_COL1+CALC_COL and after I added both these 2 column , and second way is to calculate directly) .
    Check this image
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Problem with designing a table in sap form

    Hello Gurus, i am trying to modify a sap form, i have to add to the table in the main window a new column. In the second column i have a description text Char lenght 45, the problem is that the rest of the columns after the second column get disorded, i tryed to use CONDENSE on the text variable but it won`t help. I need to line up the rest of the columns. Please help !

    Hi Ioan,
    You will see ",," between each column. These represent a tab and are defined in the paragraph definition. Probably you new column is too wide to fit into two tabs. So go to the definition of the paragraph and adjust the tab settings.
    Regards,
    John.

  • Need help with code for adding dates to form

    Hello forum goers
    I'm new to making forms and figured out how to auto add the date, however I need the form to change the date for every copy made.
    For example today is 06/08/2012 if I print 10 copies of the form it will output 10 pages ranging from 06/08/2012 to 06/17/2012. If code exists to do this I would be very gratefull to whoever helps, I also wouldn't mind if that is not possible for manually inputing the start / end dates.
    Currently I print 15-30 copies of the form and hand write each of the dates but I'm just getting to busy to do that. I also cannot print one a day it must be in batches.
    Thanks in advanced.

    What you are asking for is more complex than just setting the current date. Each time the form prints it has to know that it has to change the date. I would suggest doing this.
    First, setup a document level script to set the date to the current date. I suspect that you have already done this?
    Next, Create a "DidPrint" document action to increment the date.  To do this the script will need to scan the current text value of the date, add one day to it, and then reformat it.  You'll find information on this type of scripting in these articles:
    http://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascr
    ipt
    http://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascr
    ipt-part-2
    http://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascr
    ipt-part-3
    Since the increment happenes in the Did Print you will need to print each copy individually. If you enter 10 copies in the print dialog it won't work. You have to print one at a time.  You can automate this activity with a console script.
    One of the advantages of incrementing in the DidPrint is that you can also manually enter a date and it will increment from there.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)
    Having trouble, Why Doesn't my Script Work?

  • Problem with saving duplicated tables in interactive form

    Hi,
    I have an interactive form that contain a table with a row that contain "insert remove move " object .
    when i press the add button, it duplicate the table, but if i save the PDF and then open it again, the extra table does not appear,
    it seems like it never been save.
    do you knoe what is the problem? why the tables are not saved properly?
    thanks, Noa

    Hi,
    Try doing the following
    try using the simple 'Button'. In the button's object properties, in the tab named 'field', select 'Control Type: submit'.
    Then, in the 'submit' tab in the object properties, choose PDF in the 'submit format' dropdown field.
    In the 'submit to URL field' type:
    mailto:nameataddress.com?subject=mySubject&body=Done
    You may need to adjust the e-mail address, subject and body text.
    Regards
    Ayyapparaj

  • Help withe loop on tables

    Hallow in my table itab I have employee (sobid employee number and names ex. 80 emp) in my loop(b_itab) I get all he employee that doing the course (their sobid just 3 emp) how can I use b_itab to write to other table (d_itab) to write all the employee that don’t doing the course .I need a  general solution.
    <b>Ex.i have a table with 80 emp and I doing a loop on this table and find 3 employee that doing course how can I do  comparison in the 2 table that if the employee not in b_itab(emp doing course) write them in d_itab(oteer table).</b>    .if u need more details  please let me now.
    regards

    Loop at itab.
    Specify the condition here if they are doing the course
    if (Condition here)
    append itab to b_itab.
    else
    append itb to d_tab.
    endif.
    endloop.
    The other option will be:
    loop at itab.
    read table b_itab with key course = itab-course.
    if sy-subrc NE 0.
    append itab to d_itab.
    endif.
    endloop.
    Can you try these options? If not, please give the structure of the internal table to know exactly you want to do.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Help with methodology on 1 to 1 form/relationships

    So this post if more looking for methodology verses a solution. I have a couple of Tables with Forms in my Application.
    We have a root cause Table which is where we create case to track the root cause of an issue.
    A root cause case can be generated from many methods: A phone call, an incident, a service request etc….
    We have recently implemented another table and form for tracking incidents as they happen.
    Ground rules:
    1.     Every Incident requires an incident ticket (easy),
    2.     Not every incident requires us to generate a root cause case
    I am thinking of placing a button on the Incident form that would in fact generate the shell for the root cause case. So (ON CLICK) it would take you to a new Root Cause case form and populate the Inicdent ID field on the Root Cause table to be the ID of the incident that was used to generate the ticket.
    In thinking through avoiding creating multiple Root Cause cases for an incident, I was thinking I needed a method to make the button visible or invisible based on whether there was a root cause that had the Incident ID in the Root cause table.
    Here is where thoughts on method come in.
    I was thinking of doing the following steps:
    1.     Create button with process to Go to and Create a new Root Cause
    a.     This would go to the new page and populate the Incident ID field with the incident ID.
    2.     Once on the new Root Cause Page, I would complete the shell and then have a button to submit/save and one of the things it would do is check to see if the Incident ID field was populated.
    a.     If populated, run an insert query to insert the Root Cause ID into the Root Cause ID field on the Incident Table.
    i.     I would also think about sending the user back to the Incident page after they submit as well. But this is just aesthetics I think.
    b.     If not populated, create the RCCA as normal
    3.     When an incident is created, it would check to see if the Root Cause ID field was Null
    a.     If Null – Create Root Cause button is visible
    b.     If NOT Null – Create Root Cause button is hidden
    My question is am I over thinking this and not using processes that are already available and I am just unaware of them or is this method an efficient means to accomplish what I am trying to do.
    Thanks in advance for taking the time to read.
    Wally

    Check this :-
    http://helpx.adobe.com/creative-suite/kb/error-serial-number-qualifying-product.html

  • Need help with calc from tables

    I have a table that contains query #1 and have another table
    that contains a field that needs to use the result of the cfset in
    another calc.
    The new calc in query #2 needs to divide the Num_Checks_Trans
    from query #1 by the by the Weekly_Hours_Recorded in query #2.
    Can anyone help me figure this out?
    <b>1.</b>
    <cfquery name="QryEmployeeDetail"
    datasource="NBProdReports">
    SELECT TblContractInfo_SubMenuTable.User_ID,
    TblContractInfo_SubMenuTable.Contract_Number,
    TblContractInfo_SubMenuTable.Transaction_Type,
    TblContractInfo_SubMenuTable.Num_Checks_Trans, TblTransType.Value,
    TblContractInfo_SubMenuTable.Notes, TblMasterTrans.Date_Opened
    from TblContractInfo_SubMenuTable, TblMasterTrans,
    TblTransType
    WHERE TblContractInfo_SubMenuTable.Task_Number =
    TblMasterTrans.Task_Number
    and TblTransType.Transaction_Type =
    TblContractInfo_SubMenuTable.Transaction_Type
    And TblMasterTrans.Date_Opened BETWEEN
    #createODBCDate(DED_startDate)# AND #createODBCDate(DED_endDate)#
    order BY TblMasterTrans.Date_Opened ASC,
    TblContractInfo_SubMenuTable.User_id ASC
    </cfquery>
    <cfset totalTrans = 0 />
    <cfloop query="QryEmployeeDetail">
    <cfset totalTrans = totalTrans +
    (QryEmployeeDetail.Num_Checks_Trans * QryEmployeeDetail.Value)
    /></cfloop>
    Text
    2.
    <cfquery name="QryEmployeeDetail"
    datasource="NBProdReports">
    SELECT TblContractInfo_SubMenuTable.User_ID,
    TblContractInfo_SubMenuTable.Contract_Number,
    TblContractInfo_SubMenuTable.Transaction_Type,
    TblContractInfo_SubMenuTable.Num_Checks_Trans, TblTransType.Value,
    TblContractInfo_SubMenuTable.Notes, TblMasterTrans.Date_Opened
    from TblContractInfo_SubMenuTable, TblMasterTrans,
    TblTransType
    WHERE TblContractInfo_SubMenuTable.Task_Number =
    TblMasterTrans.Task_Number
    and TblTransType.Transaction_Type =
    TblContractInfo_SubMenuTable.Transaction_Type
    And TblMasterTrans.Date_Opened BETWEEN
    #createODBCDate(DED_startDate)# AND #createODBCDate(DED_endDate)#
    order BY TblMasterTrans.Date_Opened ASC,
    TblContractInfo_SubMenuTable.User_id ASC
    </cfquery>

    This can be rewritten as a single query which is good for a
    number of reasons, including we only make one trip to the database
    and we do our calculations on the SQL backend, which is faster than
    doing them in CFML.
    What you're going to want to do is SUM() the total
    transaction values by having a column like SUM(Num_Checks_Trans *
    Value) AS totalTrans. To get the value for your other column you
    can calculate that like Num_Checks_Trans / Weekly_Hours_Recorded. I
    didn't see the latter in either of your queries so I'm not sure
    where it comes from, but you can definitely use it in your SELECT
    clause when calculating.
    Since SUM() is an aggregate function, you'll have to use a
    GROUP BY clause to make it work. You'll have to GROUP BY each
    column in the SELECT statement. If some of the columns have
    differing data that you won't want to use in the GROUP, you can
    always use a nested subquery as part of your FROM clause and then
    join that to the original queries with the totals.
    I hope that helps.
    - William

  • Help with quierying a table with varchar as dates

    guys need a little help im close but i just can't close the deal.
    i have a table that the field is dataytped as varchar2 but it holds a date like such '20100615' todays date.
    I know the first thing you guys are going to say is that this should be formatted as a date but it is not my table and i have to deal with this.
    any how here is the problem im trying to query for a range of dates and im having one hell of a time doing it.
    as you cant tell from my query below im atempting to bring back only 15days worth of data by date.
    can someone please point out the obvious. I've been at it for a day now trying to get this to work.
    select DISTINCT to_date(fwvitals_date, 'YYYYMMDD') "fwvitals_date"
    FROM fwvitals
    where fwvitals_date
    between (((SELECT MAX(fwvitals_date)FROM FWVITALS)))
    AND ((select to_CHAR(sysdate-15, 'YYYYMMDD') from dual))

    Hi,
    user633029 wrote:
    guys need a little help im close but i just can't close the deal.
    i have a table that the field is dataytped as varchar2 but it holds a date like such '20100615' todays date.
    I know the first thing you guys are going to say is that this should be formatted as a date but it is not my table and i have to deal with this.You're absolutely correct!
    any how here is the problem im trying to query for a range of dates and im having one hell of a time doing it.
    as you cant tell from my query below im atempting to bring back only 15days worth of data by date.
    can someone please point out the obvious. I've been at it for a day now trying to get this to work.
    select DISTINCT to_date(fwvitals_date, 'YYYYMMDD') "fwvitals_date"
    FROM fwvitals
    where fwvitals_date
    between (((SELECT MAX(fwvitals_date)FROM FWVITALS)))
    AND ((select to_CHAR(sysdate-15, 'YYYYMMDD') from dual))"WHERE x BETWEEN y AND z" is equivalent to
    "WHERE x >= y AND x <= z".
    If y > z, then no rows will ever qualify, and if y is the gratest value in your table, then (probably) very few rows, perhaps only 1 will satisfy the condition even if z > y.
    What exactly are you trying to do?
    It helps if you post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data. If the results are conditional, give a couple of examples, e.g,, "If I run the query at any time on June 15, I want ... but if it's June 16, then I want ..."
    If you want the most recent 15 days, including today (that is, when run on June 15, you want June 1 through June 15) then:
    SELECT DISTINCT 
         fwvitals_date
    FROM      fwvitals
    WHERE       fwvitals_date     BETWEEN     TO_CHAR (SYSDATE - 14, 'YYYYMMDD')
                   AND     TO_CHAR (SYSDATE,      'YYYYMMDD')
    ;Fortunately, the strings are in a format such that sorting is meaningful, so you don't have to run TO_DATE on each one, and get conversion errors.
    Edited by: Frank Kulash on Jun 15, 2010 9:52 PM

Maybe you are looking for