Working with a date range

Hi, I am sure this is a pretty regular question but I can not find an answer anywhere. I have a database of pruducts (product_name) with various experation dates (exp_date) For one of my pages I want to display all products that will expire in the next 30 days. How would I do this? Thanks, Paul

You don't say which database you're using, but with MySQL you would use one of the many date and time functions.
SELECT * FROM product_name
WHERE date_exp BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 30 DAY)

Similar Messages

  • Difficulty working with overlapping date ranges and sums

    I have data like the following and need help querying it for a specific result:
    startdate             enddate               place     class       number
    03-30-2006          04-18-2006          A             22           2000
    04-01-2006          04-30-2006          A             22           6000
    03-30-2006          04-15-2006          B             11           1700
    03-15-2006          04-12-2006          B             11           2900
    I'd like to return the sum of the averages for any given day, by place, and by class, like this:
    day                    place     class       average
    03-15-2006          B             11           100
    03-16-2006          B             11           100
    03-30-2006          A             22           100
    03-30-2006          B             11           200
    03-31-2006          A             22           100
    03-31-2006          B             11           200
    04-1-2006            A             22           300
    04-01-2006          B             11           200
    04-30-2006          A             11           200
    I'm stuck, any help would be GREATLY appreciated.

    307b218a-cebe-46f1-87b6-946b4076ce79 wrote:
    Here is what I said in my original post:
    I'd like to return the sum of the averages for any given day, by place, and by class.....Then gave an example of output.
    I think that sentence describes the relations perfectly succinctly.
    How can it, when there's no SUM involved
    307b218a-cebe-46f1-87b6-946b4076ce79 wrote:
    For the date of 3-30-2006, the sum of the averages for region A in class 22 is 100, since from 3-30-2006 to 4-18-2006 is 20 days, and 2000/20 = 100, and there are no other class 22's in place A in that date range. Same goes for 3-31-20006.
    However for 4-1-2006 the sum of the averages is 300, since I have one record who's average is 100 (2000/20), and another (6000/30 = 200) and 200 + 100 = 300.
    For 4/30, I have one average in that range for place A class 22, and its average for that period is 200.
    Does that help?
    Much better, thank-you ..
    try this:
    WITH data AS (
          SELECT TO_DATE('03-30-2006','mm-dd-yyyy') startdate, TO_DATE('04-18-2006','mm-dd-yyyy') enddate, 'A' place, 22 class, 2000 cnumber FROM DUAL UNION ALL
          SELECT TO_DATE('04-01-2006','mm-dd-yyyy') startdate, TO_DATE('04-30-2006','mm-dd-yyyy') enddate, 'A' place, 22 class, 6000 cnumber FROM DUAL UNION ALL
          SELECT TO_DATE('03-30-2006','mm-dd-yyyy') startdate, TO_DATE('04-15-2006','mm-dd-yyyy') enddate, 'B' place, 11 class, 1700 cnumber FROM DUAL UNION ALL
          SELECT TO_DATE('03-15-2006','mm-dd-yyyy') startdate, TO_DATE('04-12-2006','mm-dd-yyyy') enddate, 'B' place, 11 class, 2900 cnumber FROM DUAL ),
       data2 AS ( SELECT startdate, enddate, enddate-startdate+1 numdays, place, class, cnumber
                   FROM data d
    SELECT startdate+x.lvl day, place, class, cnumber/numdays avg
      FROM data2 d,
          ( SELECT level lvl FROM dual CONNECT BY level <= 10000 ) x
    WHERE x.lvl <= numdays
    ORDER BY d.startdate, x.lvl
    It helps to be specific and detailed

  • My iPad Mini with retina display suddenly will not connect to the Internet. It shows full wifi bars, yet no web pages will load. My Internet is working with all other apple devices in my house. The iPad also no longer works with celluar data.

    My iPad Mini with retina display suddenly will not connect to the Internet. It shows full wifi bars, yet no web pages will load. My Internet is working with all other apple devices in my house. The iPad also no longer works with celluar data. I'm not sure what has happened. It was working fine a few hours ago. I have tried resetting it, ive restarted my browser etc. I tried to erase all data from my Ipad but I can't do that because it needs to sign into my Apple ID and use the Internet!

    Some things to try first:
    1. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    2. Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    3. Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    4. Go into your router security settings and change from WEP to WPA with AES.
    5.  Renew IP Address: (especially if you are drooping internet connection)
        •    Launch Settings app
        •    Tap on Wi-Fi
        •    Tap on the blue arrow of the Wi-Fi network that you connect to from the list
        •    In the window that opens, tap on the Renew Lease button
    6. Potential Quick Fixes When Your iPad Won’t Connect to Your Wifi Network
    http://ipadinsight.com/ipad-tips-tricks/potential-quick-fixes-when-your-ipad-won t-connect-to-your-wifi-network/
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    Fix WiFi Issue for iOS 7
    http://ipadnerds.com/fix-wifi-issue-ios-7/
    iOS 6 Wifi Problems/Fixes
    Wi-Fi Fix for iOS 6
    https://discussions.apple.com/thread/4823738?tstart=240
    How To: Workaround iPad Wi-Fi Issues
    http://www.theipadfan.com/workaround-ipad-wifi-issues/
    Another Fix For iOS 6 WiFi Problems
    http://tabletcrunch.com/2012/10/27/fix-ios-6-wifi-problems-ssid/
    Wifi Doesn't Connect After Waking From Sleep - Sometimes increasing screen brightness prevents the failure to reconnect after waking from sleep. According to Apple, “If brightness is at lowest level, increase it by moving the slider to the right and set auto brightness to off.”
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    iPad: Issues connecting to Wi-Fi networks
    http://support.apple.com/kb/ts3304
    How to Boost Your Wi-Fi Signal
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Boost-Your-Wi-Fi-Signal.h Mt
    Troubleshooting a Weak Wi-Fi Signal
    http://ipad.about.com/od/iPad_Troubleshooting/a/Troubleshooting-A-Weak-Wi-Fi-Sig nal.htm
    How to Fix a Poor Wi-Fi Signal on Your iPad
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Fix-A-Poor-Wi-Fi-Signal-O n-Your-iPad.htm
    iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Connect iPad to Wi-Fi (with troubleshooting info)
    http://thehowto.wikidot.com/wifi-connect-ipad
    10 Ways to Boost Your Wireless Signal
    http://www.pcmag.com/article2/0,2817,2372811,00.asp
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    How To Fix iPhone, iPad, iPod Touch Wi-Fi Connectivity Issue http://tinyurl.com/7nvxbmz
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    Some Wi-Fi losses may stem from a problematic interaction between Wi-Fi and cellular data connections. Numerous users have found that turning off Cellular Data in Settings gets their Wi-Fi working again.
    You may have many apps open which can possibly cause the slowdown and possibly the loss of wifi. In iOS 4-6 double tap your Home button & at the bottom of the screen you will see the icons of all open apps. Close those you are not using by pressing on an icon until all icons wiggle - then tap the minus sign. For iOS 7 users, there’s an easy way to see which apps are open in order to close them. By double-tapping the home button on your iPhone or iPad, the new multitasking feature in iOS 7 shows full page previews of all your open apps. Simply scroll horizontally to see all your apps, and close the apps with a simple flick towards the top of the screen.
    Wi-Fi or Bluetooth settings grayed out or dim
    http://support.apple.com/kb/TS1559
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Using a sparse lookup with a date range?

    Hey all,
    I have created a table (Benchmark_Lookup) that contains the following columns:
    start_date, end_date, section, benchmark
    I then have numerous logical tables (Eg Business Growth) that will all have a new logical column performing a sparse lookup on the above table to retrieve it's benchmark value.
    In the lookup table, I have multiple rows for the same section with different benchmarks differentiated by the date range that they were in effect.
    I have worked out how to perform this lookup using the following:
    lookup(SPARSE "bla".Benchmark_lookup"."Benchmark" ,0, "bla"."Business_Growth"."section")
    Unfortunately, the above is now bringing back duplicates as it's not working out what date range to select from.
    I have joined the lookup table (using a physical join) to my Time dimension by saying "business_date >= start_date and business_date <= end_Date" but that doesn't seem to work.
    Any ideas?

    Hi there,
    Neither of these examples help that much.
    I understand how the lookup function works but what happens if the lookup table has the following two rows:
    EFFECTIVE_FROM     EFFECTIVE_TO     SECTION     SCORE
    01/Jan/1900                 30/Jun/2013           test              1
    01/Jul/2013                  06/Jun/2079           test              2
    I need to use the following lookup rules:
    Business_Date >= Effective_From
    Business_Date <= Effective_To
    Section = 'Test'
    The lookup should therefore only ever return one row as the date is used to find the appropriate range.

  • Problem in working with Japanese data

    Hello,
    We have an application, which should work for both English and Japanese languages. Our application is working fine for English data but in case of Japanese, we are facing problems. In the application, there is a language setting, where the user can select either English or Japanese. This changes the language of the labels to English or Japanese. We are handling this thru' ResourceBundles. But the data that is entered can be independent of this. In English setting also, the data entered or diplayed could be Japanese. Now we are facing problems at vaious places -
    1. When we enter Japanese data and save it, it gets copied into the bean and if there is any error in the saving, the same data from bean comes back on the screen. This data doesn't appear properly in Japanese.
    2. When we try to retrieve the already saved data from database, it doesn't show poperly in Japanese.
    We are using our own 'toUnicode' function, which converts the data to Unicode before saving the data to database. Similarly, we have tried different encodings like SJIS / Shift_JIS / ISO-2022-JP at various places i.e. in 'Page' directive or in HTML Meta tag or various combinations of these two. Nothing is working reliably. Sometimes for some combination, data retained in the first case is correct but it can't be saved. Sometimes it works with Unicode, sometimes without Unicode. Some combination affects the Japanese labels as well. Otherwise the labels at least are displayed properly.
    The same code with just Shift_JIS setting in 'page' directive, worked well in IIS Server for both English and Japanese.
    What could be the problem in WebLogic? Does it matter if WL is installed on English or Japanese machine?
    Kindly answer ASAP, since the project is getting delayed.
    Thanking in anticipation...
    -Medha

    Hi,
    is there a difference in handling Japanese and Chinese chars? If not I
    might be able to give you some hints.
    Daniel
    -----Original Message-----
    From: JSB [mailto:[email protected]]
    Posted At: Monday, February 12, 2001 6:22 PM
    Posted To: internationalization
    Conversation: Problem in working with Japanese data
    Subject: Re: Problem in working with Japanese data
    Have u solved this yet, and how ?
    Medha <[email protected]> wrote in message
    news:[email protected]...
    >
    Hello,
    We have an application, which should work for both English andJapanese
    languages. Our application is working fine for English data but in case
    of
    Japanese, we are facing problems. In the application, there is a
    language
    setting, where the user can select either English or Japanese. This
    changes
    the language of the labels to English or Japanese. We are handling this
    thru' ResourceBundles. But the data that is entered can be independent
    of
    this. In English setting also, the data entered or diplayed could be
    Japanese. Now we are facing problems at vaious places -
    1. When we enter Japanese data and save it, it gets copied into thebean
    and if there is any error in the saving, the same data from bean comes
    back
    on the screen. This data doesn't appear properly in Japanese.
    2. When we try to retrieve the already saved data from database, itdoesn't show poperly in Japanese.
    We are using our own 'toUnicode' function, which converts the datato
    Unicode before saving the data to database. Similarly, we have tried
    different encodings like SJIS / Shift_JIS / ISO-2022-JP at various
    places
    i.e. in 'Page' directive or in HTML Meta tag or various combinations of
    these two. Nothing is working reliably. Sometimes for some combination,
    data
    retained in the first case is correct but it can't be saved. Sometimes
    it
    works with Unicode, sometimes without Unicode. Some combination affects
    the
    Japanese labels as well. Otherwise the labels at least are displayed
    properly.
    The same code with just Shift_JIS setting in 'page' directive,worked
    well in IIS Server for both English and Japanese.
    What could be the problem in WebLogic? Does it matter if WL isinstalled on English or Japanese machine?
    Kindly answer ASAP, since the project is getting delayed.
    Thanking in anticipation...
    -Medha

  • Help Required: Working with relational data

    Hi,
    I'm looking for some advice
    Scenario
    We have a customer who has an SE relational database with Apex for transaction processing. They require reporting functionality and are debating whether to buy BI SE One or BI EE; they will not buy the enteprise edition database though.
    Questions
    Here are my questions:
    1. In order to use answers and dashboards, does the relational data have to be in a dimensional format. Is this reccommended.
    2. We were debating on whether to create data marts for various business requirements. Is this standard procedure for relational data (Which is not too complex)
    3. If the data has to be in a dimensional format, is this best modelled using warehouse builder or the model layer of the repository using BI Administrator. (Baring in mind that the customer is an SME using a SE database)
    The main problem where having, been fairly new to warehouse building, is that we dont know what the best path is to take when working with relational data. Do we create dimensional models? What should we use? Is a relational structure suitable enough?
    Can anyone shed light on our problems
    Regards
    Kevin

    1. In order to use Answers and Dashboards you do not need to have a Data Warehouse. It can report out of both Transactional database as well as a data warehouse.
    2. It depends on what your business requirements are. BI EE/SE1 does not require you to have data marts. Data Marts would give performance gains, would help you in visualizing the transactional data from a business standpoint, is a big plus but not a mandate. If you want to go that route of creating Datamarts, you can easily do that using BI SE1 since that gives you warehouse builder which can be both used as a data modelling tool and a ETL tool.
    3. Warehouse Builder is a ETL tool. It helps in you visualizing/deploying data warehouses in databases. But BI EE Admin tool is more of a logical dimension modelling tool wherein the facts and dimensions do not exist physically but the tool uses them to do the querying/processing.
    Since you are just starting, what you can do is to use BI EE directly on top of the transactional system for the time being. But as a long term solution you can start working on your data marts and as soon as they are ready you can port the BI EE on top of them rather than the transactional system.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • Xcelsiues 2008, working with live data help!!!

    Ok, so i have flynet designer for web services. All this is working correctly. i have setup a test query just to check everything is working so i just pulled out some customer info name, account number etc. I generated the webservice succesfully and i can browse to the website and enter a parameter and it returns results. So i know this part is working ok.
    So now im in xcelsius 2008, i add a new web service connection and it connects fine, at this point you have to select the cells where you want the data to go in the little excel spreadsheet panel. but nothing ever appears!!!!??? i dont know what i am doing wrong. has anyone had experience working with live data?

    In terms of timescale. I have till April to do this.
    I said 2 months cos things always come up. So, in terms of your application have you already:
    collected user requirements?
    developed and tested an appropriate database structure (tables, datatypes, triggers, views, etc...)?
    done any mock-up of some sort of the application pages and business process flows?
    gotten approval of any of the above?
    If you have all of this yet to complete - and you're new to databases, new to Oracle and new to HTML DB, and have more than a very simple application (10-15 pages) you may still be in over your head with this project.
    I'm not trying to discourage you from using HTML DB at all. It's a great tool and you can do some very cool stuff with it. And it's reputation as an Access killer is well deserved. It's just that you may not want to take on a critical time-sensitive project as your first.
    Also to consider - are you going to have anyone else helping out with it? If so, what strengths/weaknesses does that person bring to the project? Is it going to help you move faster? Or slow you down - because you're training and developing at the same time?
    Earl

  • Working with Cyrillic Data

    Hi, We have a requirement where I have to work with Cyrillic data i.e. Russian data. I have to parse data based on specific fields.  I tried using match function but looks like it is having problem dealing with Cyrillic Russian data.  When I try to find an english word in a string then it works finebut when I try to find an Cyrillic character i.e. ул. or г. then I match function would not find this expression in the CYrillic string.
    i.e. match_pattern('Арбат ул.','Арбат ул\.') gives me 0
    Any idea how I can use BODS on function on Cyrillic data.
    Thanks,

    Should have not used escape character for dot. placing just dot works finein decode.

  • Tools required to install to work with Oracle Data warehouse

    Could anyone please guide me...as I am quite new to Oracle...
    till now I was working on Data warehousing using Microsoft tools i.e. (SSIS, SSRS, SSAS, SQL Server)
    So Please tell me which are the tools required to install to work with Oracle Data warehouse
    I came to know about OWB and OBIEE, but not sure what exactly these are ?

    In order to create and develop a webcenter portal application, you only need to install JDeveloper and download the WeBCenter extensions. That's true.
    But this install does not include the WebCenter services like dicussions, document services, analytics,... If you want to use these and integrate them in your portal, then you would need to install the suite as described on my blog.

  • Crosstab or Crosstabs with different date ranges not lining up.

    I have a crosstab with a dimension (item) in the vertical axis, and different date ranges on the Horizontal (top) axis.
    I want to display counts of a measure over specific ranges of time. For instance, count of items sold for weeks 1,2,3,4, horizontally, then count of items sold for months 1,2,3,4 horizontally, next to each other.
    Problem is that count rows by item do not line up. Count by week has fewer items, so it has fewer rows than the counts by month. I need it to have the same number of rows, and just show 0 or blank in that row, instead of just not being there. I need all rows to line up by item.
    Its like there needs to be an outer join, but I haven't been able to make it work. What am I missing?
    Does that make sense?
    Any ideas welcome. Thank you!

    Wavery,
    You are looking to display a grid with a high degree of consistency, regardless of the data present.  There is no "single" step capability provided by WebI to achieve this, so it requires creativity on your part.  A second data provider (DP) for your report is necessary and can be either a view in your database, a custom SQL, or some folks have even built a derived table in their universe to accommodate.  At any rate, there are one of two ways to achieve.  If you are familar with SQL and the "union" statement, you would run the basic SQL, then via union, dummy up a second query that has all the requisite columns, but for the measures you would use a value of zero so as not to affect the generated facts.  For example, suppose you had a report for a hardware store, and you wanted to track the following items:  Nails, Flashlights, and Screws.  Your basic query might look like this:
    select item,sum(inventory) from inventory_table where item in ('nail','flashlight','screw') group by item
    Then your next portion of code:
    union select 'Nail',0 union select 'Flashlight',0 union select 'Screw',0
    See how the union is providing "dummy" info?  To do this in WebI with a second DP, you would not use union, but a separate view perhaps, then in WebI apply Merge Dimensions on the item column (and the equivalent of an outer join).
    Thanks,
    John

  • Ical searches with specific date range

    We post the people who are to work at specific events in the notes field of ical. Is there a way to search for these peoples names on the web via ical.php within a specific date range? No matter what date I have set to look at on the calendar the search grabs everything in the past. I only want future events that this person is associated with. Thanks for helping if you can. Jake

    Hi,
    You want to run the report on specific date without 0CALDAY?. Without 0CALDAY you can't restrict the report for specific day. So you must insert 0CALDAY in report and then use Offsets or implement code in CMOD.
    Thanks
    Reddy

  • MDX MTD with a Date Range

    Hi All
    I need some advice on the below, it works, gives the answers I want, but I believe the filter on the set can be moved to a where clause, and the MTD can work effectively then with the sum of the date range on the [RangeHasResponse] measure (advice apart
    from "if it ain't broke don't fix it" ;) ).  This is query for a report where I can sub in a param date range (set the Today value, and the from in the DateRange), and produce the Sum of Has Response across that date range, and also the MTD
    for last month up to the ToDate.
    Any advice on how the MDX could be better structured would be great, I can understand I'm calculating members, then adding them to my query, it just seems I should be calculating them in the SELECT based on a filter.  Output just needs to be
    [MTD]: single sum of Has Response to the current todate for that month
    [RangeHasResponse]:Sum of the entire range
    [Has Response] : sum on the last day, this isn't necessary, I'm just curious to see how that would tie into a filter, if it ruins the above leave it out.
    WITH
    SET [ToDate]=[Date].[Year - Quarter - Month - Date].[Date].&[2014-02-22T00:00:00]
    SET [DateRange] =
    [Date].[Year - Quarter - Month - Date].[Date].&[2014-01-01T00:00:00]:
    [ToDate].item(0)
    MEMBER [Measures].[MTD] AS
    SUM(MTD([Date].[Year - Quarter - Month - Date].CurrentMember),[Measures].[Has Response])
    MEMBER [Measures].[RangeHasResponse] AS
    SUM([DateRange],[Measures].[Has Response])
    SELECT
    {[Measures].[MTD],[Measures].[Has Response],[Measures].[RangeHasResponse] } on columns
    ,[ToDate] on rows
    FROM
    [ISD Prototype]
    Thanks
    Best Wishes, The Redman; If something helps, please help show it by voting, if it solves, bonus!

    Hi GGoldspink,
    In MDX, the CREATE MEMBER statement defines calculated members that are available throughout the session, and therefore, can be used in multiple queries during the session. So if the members can will be used in multiple times in SELECT clause, we can create
    a calculated member, and then use this members on SELECT clause which will improve the query performance.
    In your scenario, are there any performance issue in your MDX query? In this case, I'd suggest you enable SQL Sever profiler to monitor the queries, and check which part in the query took a very long time to run. Here is a useful link for your reference.
    http://sqlmag.com/database-performance-tuning/using-sql-profiler-tune-mdx-queries
    Besides, here is a document which will help you understand where issues can occur in your existing MDX code that will prevent you from experiencing the performance improvements, and provide advice on how to avoid these issues in your new MDX coding.
    http://technet.microsoft.com/en-us/library/bb934106(v=sql.105).aspx
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here
    Charlie Liao
    TechNet Community Support

  • Query for all open sales order with a date range

    Hi Experts!
    I wrote this query that will look up all open sales order of a particular customer and how much was served:
    SELECT T0.[DocNum] 'OS #', T0.[DocDate] 'Posting Date', T0.[CardName] 'Customer',  T1.[Dscription] 'Item Description',T4.[SalUnitMsr] 'Sales UOM', T4.[InvntryUom] 'Invty UOM', T1.[UseBaseUn] 'Use of Invty UOM' , T1.[Quantity], T1.[Quantity]-T1.[OpenQty] 'Served Qty', T1.[OpenQty] 'Unserved Qty' FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCTG T2 ON T0.GroupNum = T2.GroupNum INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode INNER JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE T0.[DocStatus] = 'O' and T0.[CardName] =[%0]
    However, I don't know how to input a parameter for the date range in a query.  Can anyone help with this issue?
    Your input will be highly appreciated.
    Warm regards,
    Jen

    Hiiiiiii
             Try This.....
    SELECT T0.DocNum 'OS #', T0.DocDate 'Posting Date', T0.CardName 'Customer', T1.Dscription 'Item Description',T4.SalUnitMsr 'Sales UOM', T4.InvntryUom 'Invty UOM', T1.UseBaseUn 'Use of Invty UOM' , T1.Quantity, T1.Quantity, T1.OpenQty 'Served Qty', T1.OpenQty 'Unserved Qty' FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCTG T2 ON T0.GroupNum = T2.GroupNum INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode INNER JOIN OITM T4 ON T1.ItemCode = T4.ItemCode WHERE T0.DocStatus = 'O' and T0.CardName ='[%0]' and (T0.DocDate>='[%1]' and T0.DocDate<='[%2]')
    Regards,

  • File Count with selected date range

    Hi,
    Our requirement is to get the file count with selected date by the user from two sharepoint date time controls i.e. dtp1 and dtp2 into the data table. I am able to get the file count of specific folder from Pages library through below code. Now need to get
    the selected date range from two date time picker controls and check with the item created by is within the date range. If yes I need to get the file count.
    So please share your ideas/thoughts to do the same.
    SPList list =
    wikiweb.Lists["Pages"];
                        SPFolderCollection oFolders
    = list.RootFolder.SubFolders["foldername"].SubFolders;
                        DataTable dt
    = new DataTable();
                        dt.Columns.Add("Column1");
                        DataRow dr;
                        if (oFolders.Count
    > 0)
                            foreach (SPFolder oFolder in oFolders)
     if (!oFolder.Name.Equals("Forms"))
                                    dr
    = dt.NewRow(); 
    dr["Column1"] = oFolder.ItemCount.ToString();
    dt.Rows.Add(dr);
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

    Hi,
    I have modified the code as below
    if((DateTime)(oFolder.Item.File.TimeCreated>dtFromDate.SelectedDate)&&(DateTime)(oFolder.Item.File.TimeCreated<dtToDate.SelectedDate))
    But still it is throwing the error.
    Please share your ideas on the same.
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

  • Tabbed Panels: Opening panel with panel number doesn't work with Spry Data

    I have some data inside a TabbedPanelsContent div, and would
    like to be able to open tabs using links, but it only seems to work
    with static content.
    Clicking on tabs themselves loads content correctly, whereas
    clicking on links does nothing. I tried both - panel number and
    panel ID - neither worked. What gives?
    See code below.
    <div spry:region="ds1">
    <div class="TabbedPanels" id="tp1">
    <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0">Asset
    Management</li>
    <li class="TabbedPanelsTab"
    tabindex="0">Brokerage</li>
    <li class="TabbedPanelsTab" tabindex="0">Mutual
    Funds</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent">
    <p spry:repeat="ds1"
    spry:test="'{@industry01}'.search(/^Asset Management/) !=
    -1;">{ds1::client}</p>
    </div>
    <div class="TabbedPanelsContent">
    <p spry:repeat="ds1"
    spry:test="'{@industry02}'.search(/^Brokerage/) !=
    -1;">{ds1::client}</p>
    </div>
    <div class="TabbedPanelsContent">
    <p spry:repeat="ds1"
    spry:test="'{@industry03}'.search(/^Mutual Funds/) !=
    -1;">{ds1::client}</p>
    </div>
    </div>
    </div>
    <script type="text/javascript">
    var tp1 = new Spry.Widget.TabbedPanels("tp1");
    </script>
    </div>
    <a href="#" onclick="tp1.showPanel(0); return
    false;">Asset Management</a>
    <a href="#" onclick="tp1.showPanel(1); return
    false;">Brokerage</a>
    <a href="#" onclick="tp1.showPanel(2); return
    false;">Mutual Funds</a>

    Try to declare the variable out side of the region
    <script> var tp1;</script>
    <div spry region ... >
    tab panel stuff
    <script type="text/javascript">
    tp1 = new Spry.Widget.TabbedPanels("tp1");
    </script>
    </div>

Maybe you are looking for

  • How do I stop the cursor from having a mind of its own?

    I just received this computer T400.  A mac user wswitching over to pc - not famliar with the land.  I am using a notebook and the cursor clicks on its own when I let it rest and then transports me to whatever information/page that it happens to rest

  • How to turn on and off pop up blocker on mac notebooks

    how to turn on and off pop up blocker on mac notebooks?

  • 10.9.2 Mail not working correctly

    I'm the only person in the office to upgrade to 10.9.2 (thankfully!). Since then, Mail has not worked correctly. It is an IMAP account. When I click on an existing message in my inbox, instead of displaying instantly it takes 3-4 seconds. The screen

  • How far can we rely on Adobe Acrobat Reader?

    Hi We are contemplating to move to the Paperless Office solution with Adobe Acrobat as the backbone. Only 2-3 people in the office will be responbible for scanning documents (using the scanning facility provided by Adobe Acrobat) and merging them wit

  • Is there a way to make custom (text) borders?

    I'm working on a document in Pages, and I would like to make a border made from text. In this case, the document will be in referance to computers, so I'd like to wrap a border around the page made from 1s and 0s. Is there a way to do this?