Query formulas

Hi All
Can anyone please give me a list of query formulas e.g. pulling current date to paste into delivery date then add one day to display tomorrows date.
Thanks

Hi Dear,
Please follow the following steps
1) save this query in the Qry manager via Modules>Reports>Qry Wizard.
then select any table>Next>select any row>next>next-->Finish then click on middle Pencil to edit the query..Paste the following qry..
SELECT getdate() + 1
then save this qry under any category.
2) Apply the Formatted search by the saved query.
Hope this wil hlp you...
Warm Regards,
Mahendra

Similar Messages

  • Basic functions (high) in query formula for highest # of days past due

    Hi All,
    I hope you can help.  I am trying to create a formula in a query for FIAR Line Item Cube (0fiar_c03).  I would like to calculate the hightest number of days past due for open line items.  There is an operator 'high' in basic functions within the query formula.  Is it possible to use this?
    Regards,
    Cheryl Adamonis

    There is a workaround usind conditions.That is you can try to filter the top 10 % or top 10 after calculating the no of days past.However this way you will not be displaying complete dataset

  • BEX query formula

    HI,
        We want to write below formula in bex query, Kindly guide me, for inital(no value) i dont know what i have to use in query formula.
    if(temp = inital)
    elseif(temp>0)
    Thanks

    We can't check for SPACE, NULL, INITIAL in bex.... And the IF statement you can include keyfigure only.
    If you want to check for characteristics, then you have to go for Virtual characteristics.
    Search in the forum, you will get lot of thread on Virtual Characteristics.
    --- Thanks...

  • Problem with combination of two working query formulas

    Hey guys,
    I have a problem in building a formula correctly with the BEx formula logic. I am sure, you can help me with this.
    Right now I have four columns in my query. The first column (Actual) displays actual amounts either in local (10) or reporting (25) currency type depending on the optional selection either in the variable screen or in the free characteristics filter. The second column (Actual with Budget exch. rate) always shows the actual amounts with the budget exchange rate of the reporting currency. The third column (Budget) is build in the same way as the first column, but shows budget amount data. In the fourth column (Variance) the variance between budget and actual data should be calculated, but here lies the problem:
    The formula should differentiate the chosen columns for the calculation depending on what currency type is selected either from the optional variable selection before the query is executed or from the free characteristics filter. So if I select currency type 10 it should calculate the variance by subtracting the budget column from the first column, but if I select currency type 25 it should subtract the budget columng from the second column.
    I have implemented a formula which works already, but not for both selection possibilities (variable screen or free characteristics filter). Either the formula works when I input a currency type in the variable selection screen or when I select a filter value in the free characteristics filter. However, I need to combine both formulas in one working formula so that the user can choose if he wants to filter the currency already in the variable screen in the beginning or in the filter after query execution. Here are the two formulas which I need to get combined into one formula:
    Used Variables:
    VScreen_Selection --> value from the key of the optional Currency Type Variable from the Variable Selection Screen
    Filter_Selection: --> value from the key of the InfoObject Currency Type
    Formula for Variable Screen Selection:
    (VScreen_Selection == 10) * (Budget - Actual) + (VScreen_Selection == 25) * (Budget - Actual with Budget exch. rate)
    Formula for Free Characteristics Filter Selection:
    (Filter_Selection == 10) * (Budget - Actual) + (Filter_Selection == 25) * (Budget - Actual with Budget exch. rate)
    Can you help me to combine both Formulas? I can't believe that this is too difficult. Many Thanks in advance.
    Best Greets,
    Norbert

    Hello.
    Did you try this:
    Formula 1: Hidden
    (VScreen_Selection == 10) * (Budget - Actual) + (VScreen_Selection == 25) * (Budget - Actual with Budget exch. rate)
    Formula 2: Hidden
    (Filter_Selection == 10) * (Budget - Actual) + (Filter_Selection == 25) * (Budget - Actual with Budget exch. rate)
    Formula 3:
    (Filter_Selection <> 10) * (Filter_Selection <> 25) *Formula 1 +
    (VScreen_Selection <> 10) * (VScreen_Selection <> 25)*Formula 2

  • '*' in Query Formula Result

    Hi SDN,
    I am having a trouble with the result of a formula in query designer.  The result is showing up as '*', and I'm trying to figure out why.  I am using BW3.5.  The financial report is based on 0PCA_C01.  I have 0PROFIT_CTR hierarchy in my rows, and a structure in the columns.  The structure contains selections and formulas.
    Here is the definition of the formula which is causing the problem.
    F1 = NDIV0 (X %A Y).  Signs are defined as reversed in the properties, everything else is set to default.
    This formula is returning 0% or '*'.
    X = NDIM ( Z ) and Y = NDIM ( S ).  Z and S are selections on the profit center, and fiscal periods.  X and Y are returning values... therefore F1 should return a value instead of '*'.
    When running RSRT and executing the query, F1 returns a result.  I have tried generating the report and deleting the query cache using RSRT and I still get the same result.
    Does anyone have any ideas?  Thanks!

    Hi
    Use NODIM data function for F1 , If you have multiple units then in the result it will normally show as *
    Use this data function for the required field.
    Regards
    M.A

  • BEx Query Formula Descriptions -- Conditional Formula

    My question is in regards to the description that is returned from a formula within a structure.  The data I'm expecting is based on (for example) "fiscal year."  I have a text variable setup that returns the result of the "fiscal year" to be displayed as the column description.
    However if no data is returned for the current fiscal year, I then want to display the data for the previous fiscal year.
    I have a formula setup that uses a conditional statement.  It is setup as described below:
    <b>Formula Description</b>
    --  If data is returned based on fiscal year "2008" then use that data.
    --  Else use the data based on fiscal year "2007"
    <b>Issue</b>
    -- I use a text variable that is based on 0FISCYEAR called <b>0T_FYEAR</b>
    -- When the query is run, the data returned is correct --> (2007 data if there is no 2008 data)
    -- The text variable is also used as the formula "description" which is set to "0T_FYEAR" so if there was 2008 data, the text variable would say "2008" and if not it would say "2007."
    The problem resides in the text variable which is used as the formula description.  It is displaying the technical name of the text variable (&0T_FYEAR&) instead of "2008" or "2007."
    Has anyone else had this occur?  I would expect that if the data coming back is correctly based on 2008 or 2007, then the text variable used for the formula description would also be set to "2007" or "2008" based on my formula condition.
    Any help would be greatly appreciated and of course points will be awarded!
    Kevin

    Thanks for the quick response Pallavi...
    That logic seems completely backwards to me...is there a reason BEx is trying to populate the text variable values BEFORE knowing what data is actually being returned? 
    Also, my next obvious question:  Is there a way to get these variables populated with the correct value?  Can I force it to populate AFTER the formula has been executed so BEx knows which value to assign?
    What i'm trying to do is have a Year-Over-Year (last 3 years) comparison for the past 3 fiscal quarters.  So I would compare the current quarter numbers (Qtr 1) YoY Q1/2008, Q1/2007, Q1/2006 with the previous quarter...but the previous quarter is Q4 of 2007 (not 2008).  So I cant do the same 2008, 2007, 2006 comparison.  I was hoping to move the years back one for a 2007, 2006, 2005 comparison --> Thus the need for the conditional statement. 
    I hope that helps explain.  Any insight at all would be greatly appreciated.
    Kevin
    Message was edited by:
            Kevin Susko

  • Query Formula with boolean return values

    Hi,
    In my query, I have a  formula column which returns a boolean value 0 or 1. I need to add these values, but I cannot add them as boolean.  Is there a way that I could convert the boolean values to number/integer so I can add them?
    Thanks in advance
    Best Regards,
    Rose

    Hi Rose,
    please change 'Calaculate Result as' in properties of affected formula to 'Summation'.
    If this sould not help put formula in brackets and multiply by value 1 or create a new formula like
    (yourformula = 0 + yourformula = 1) * 1
    this should provide an integer.
    Regards
    Joe

  • Cell definitions with Query formulas

    I have a query with cell definitions used.
    My problem is when I use a formula in one of the original query columns, it ignores the cell definitions and considers the orignal columns definitons.
    My understanding is that cell definitions overwrite the original query column defintion by default.
    The only way I can think of it, is that I should do all my formulas in the cell definitoins editr for all affected cells (one by one).
    Anyone had a similar problem.
    your help is appreciated.
    Thanx in advance

    I'm not sure if i understood correctly, you have the a formula defined in query columns let's suppose ab, and for the same formula intersection in the cell defnition you have another formula bc.
    But the query is returnign the result of a*b ? Am i correct in understanding ? If this is right, then why do you have calculations in both the places....

  • BW query Formula requirement

    Dear Experts,
    We have scenario. Calculation of incentive for sales employee based on
    1. Individual target       ( Incentive A )  - This i am able to get
    2. sales office target   (  Incentive B )  - 
         formula required here is based on total of  sales and target for a salesoffice
        Sales office         Sales employee             Sales qty        Target Qty    Incentive A        Incentive B
         Dubai                 Salesman  A                    8                    10             Formula A      Formula B
                                  Salesman  B                   10                    10             Formula A      Formula B
                                  Salesman  C                   13                    10             Formula A      Formula B
                            Sales officewise total             31                     30
    How to pickup salesofficewise total  in Formula B ?
    or get constant value of total against each sales employee in separate column so that i can use in formula.
    Thanks & Regards,
    Dilip W

    Dear Experts,
    I have tried suggested solution not working. I am reframing my question with example.
    We have scenario. Calculation of incentive for sales employee based on
    Sales office target and Actual Sales ( Incentive B ) -
    formula required here is based on total of sales and target for a salesoffice.
    or difference of toatal Sales qty and Target qty for a salesoffice as consatat value against each salesman
    Sample data for reference : e.g ( 30 - 31 ) = -1 ( Based on this i can build my formula B )
    Sales office Sales employee Sales qty Target Qty Incentive B
    Dubai           Salesman A       8            10            Formula B
                        Salesman B    10            10             Formula B
                        Salesman C    13            10             Formula B
    Sales officewise total..         31            30
    How to pickup salesofficewise total in Formula B ?
    Formula Requirement is to use get /refer constant value of salesoffice wise total against each sales employee.
    Thanks & Regards,
    Dilip W

  • Suggestions for query formulation and parsing

    I'm trying to design a query format that can be used to perform searches across my objects. The query would be allowed to contain predicates with nested binary logical operators (e.g., (((a > 4) AND (b < 5)) OR (c == "hello world")) ).
    I need to design a query language, and need to have a way to parse an incoming expression and generate a parse tree from it that I can execute a search against.
    What is the elegant/correct solution to do this? Are there Java libraries that are equivalents of lex and yacc? What are suggestions for the simplest way to do this, presuming limitations can be put on the query language to make it simple?

    What is the elegant/correct solution to do this? Are
    there Java libraries that are equivalents of lex and
    yacc? Sure. google JavaCC.

  • Help: How to write a query formula?

    Problem. There are 4 tables of a database of a store:
    Table 1: Tarifs
    Columns: Tarif_number, Price
    Primary key: Tarif_number
    Table 2: Products
    Columns: Product_number, Product_name, Quantity;
    Primary key: Product_number
    Data: Tarif 1 - 100%, Tarif 2 - 75 %, Tarif 3 - 50 %, Tarif 4 - 25 % (discounts)
    Table 3: Customers
    Columns: Customer_Number, Customer_Name, Address, Phone;
    Primary Key: Client_Number
    Table 4: Sales
    Columns: Date, Product_Number, Tarif_Number, Quantity_Sold, Customer_Name
    Primary key: Date, Product_Number, Customer_Number, Tarif_Number
    The problem is to write SQL PLUS queries, which would bring the following results:
    i. Data off all customers (name, address, phone), who within the period from 3/4/2009 to 4/4/2009 purchased products containing the string "abc" in its name. The data should be arranged alphabetically by product name. The report should have a footnote including name of its author.
    ii which product was purchased the most frequently and the total purchase value. The footnote should include the title and the date of the printout.
    iii Catalogue product number, product name, quantity on store, quantity sold for any product in the database. The product name should be introduced from keyboard in order to make possible to enter this or similar query later.

    Queries not tested*
    I) SELECT cs.customer_name, cs.address, cs.phone
    FROM customers cs, sales sl, products prd
    WHERE cs.customer_number = sl.customer_number
    AND prd.product_number = sl.product_number
    AND sl.DATE BETWEEN TO_DATE ('3/4/2009', 'DD/MM/YYYY')
    AND TO_DATE ('4/4/2009', 'DD/MM/YYYY')
    AND LOWER (prd.product_name) LIKE '%abc%'
    II) SELECT prd.product_name, SUM (sl.quantity_sold * tf.price)
    FROM sales sl, product prd, tarifs tf
    WHERE sl.product_number = prd.product_number
    AND tf.tarif_number = sl.tarif_number
    GROUP BY sl.product_number
    HAVING COUNT (1) = (SELECT MAX (COUNT (1))
    FROM sales sl1
    GROUP BY sl1.product_number)
    III) SELECT prd.product_name, prd.quantity, SUM (sl.quantity_sold)
    FROM sales sl, product prd, tarifs tf
    WHERE sl.product_number = prd.product_number
    AND tf.tarif_number = sl.tarif_number
    GROUP BY sl.product_number

  • Query formulation help

    hi guys, basically I need to formulate a query which will give me the records in which the primary key appears the most on the table.
    IE
    AOI EID CID PRICES DATES
    o10 e02 c11 330000 15-JUN-08
    o17 e03 c13 500000 21-JUL-08
    o18 e06 c16 515000 13-AUG-08
    o22 e12 c15 395000 31-AUG-08
    o13 e05 c14 90000 09-SEP-08
    o15 e02 c17 95000 21-SEP-08
    o20 e07 c13 500000 01-OCT-08
    o16 e11 c15 100000 31-OCT-08
    o19 e09 c16 250000 07-NOV-08
    o22 e11 c17 420000 25-NOV-08
    o21 e08 c13 420000 28-Aug-08
    therefore if I wanted to formulate the query based on which EID has the most instances in the table, it would give me e02 and e11.
    I'm not sure if im no the right track but I have been fooling around with the COUNT aggregate operator but to no avail. IE...
    SELECT M.eid FROM MakesD3 M GROUP BY M.EID HAVING COUNT(*) >...
    Thanks in advance for the help

    This?
    select EID from (select EID,row_number() over (partition by EID order by EID) rn from MakeD3 order by rn desc)
      where rn = (select max(count(*)) from MakeD3 group by EID)or
    select EID from (select EID,count(*) rn from MakeD3 group by EID order by rn desc)
    where rn = (select max(count(*)) from MakeD3 group by EID);or
    select EID from MakeD3
    group by MakeD3
    having count(*) = (select max(count(*)) from MakeD3 group by EID);Regards,
    Prazy
    Edited by: Prazy on Mar 15, 2010 9:42 AM

  • BEx - Dates in query formula.

    dear all,
    i'm using formula to display my KEY FIGURE dates... the reason for this is because i do not want to display rows with empty dates so i created this BEx formula
    (ACTUAL DATE <> 0) * ACTUAL DATE + (ACTUAL DATE == 0) * 0
    what the above logic does is hide all empty ACTUAL DATE key figures and only show me ACTUAL DATE which is not empty.
    my problem is, when my dates are display in the report its showing this kind of value 733,560. Any idea why?
    I've used the data function DATE() and its not working as well. please advice. Thanks.

    HI,
    Please find the below link to calculate difference between two dates:Hope this helps you.
    http://teklink.co.uk/sap/sap-bi-bw-how-to-use-replacement-path-variables-to-perform-date-calculations-in-the-bex-analyzer/
    Thanks,

  • Display a percentage sign in a Query formula

    Hi Gurus. I have a question.
    I created a Query that contains local fields. One of them is the division of Field A into Field B. The result is supposed to be a percentage value.
    My question is, how can I display the '%' icon at the end of the field, so it is displayed as a true percentage field? Right now I'm only showing numbers.
    Can this be done directly on the Complex calculation of the field? Or this is added somewhere else?
    Please advice.

    Simple way is
    make the filed description as "% of some thing"
    One more way is use a field which has a data type DEC which supports the % (you see the data type used in KKB_PROZABW). I think it is deficlut task.

  • Crystal query formula

    what would be the simplest way for the sql coding for a query to read and pick up data from the 'interaction' table, 'Desciption' field that does 'not contain' the words 'NO BACS'
    i've tried:
    ({Interaction.Description}) <> "NO BACS"
    but it doesn't seem to work?

    In SQL:
    Interaction.Description not like '%NO BACS%'
    In Crystal:
    InStr({Interaction.Description}, "NO BACS" ) = 0
    HTH,
    Carl
    Edited by: Carl Sopchak on Mar 18, 2010 1:03 PM

Maybe you are looking for

  • Logical i/o and physical i/o in terms of cpu usage

    Hi Guys, I understand that LIO = logical = buffer cache. LIO may have incurred a PIO in order to get into the cache in the first place. PIO = physical = disk read I understand that physical i/o will read from disk causing increase in disk i/o and res

  • Executing WINWORD from both Windows and linux using Java

    Dear All, I have a problem when trying to use Runtime class to execute a winword document. My code is as follows. Runtime r= Runtime.getRuntime(); try{ r.exec("rundll32"+" "+"url.dll,FileProtocolHandler"+" "+"WINWORD"+ " "+"file://C://welkom.doc"); c

  • Stoke behind text problem?

    Basically i know how to set the stroke to go behind the text, my problem is i dont however want the stoke to get bigger on the outside of the text (like a normal stroke does) i just want it to fill in behind of the text. Anyone got a solution or way

  • Flash Builder Upgrade Question

    Probably a stupid question, but if you have Flex 3 Standard, what are the upgrade choices? -FB4 Standard Upgrade (No ColdFusion Builder included) $99 -ColdFusion Builder 1 (+FB4 Standard free) $299 -FB4 Premium Upgrade (includes ColdFusion Builder 1?

  • BizTalk 2013R2 Developer Edition from Gallery - SQL Expired!!

    I an a MSDN ultimate subscription holder and I have created a virtual machines within Azure from the Gallery.  I have select the BizTalk 2013R2 Developer Edition from the gallery which has initially been great and save me a lot of time with the setup