Creating Query similar to excel command

Hi Experts
I have a query which outputs dataset from OITM table and includes 5 UDFs I have called TID1, TID2, TID3, TID4 and TID5.
Once the query is run I then have to take it into Excel and run formula which returns the value for the last non-blank cell out of the TID fields.
For example
TID1 TID2 TID3 TID4 TID5 
13    131   232                           this would return a value of 232
13    131   234 269                    this would return a value of 269
13     131  232 271 317             this would return a value of 317
There are never any blanks in-between the fields.
Once in excel I use the formula =LOOKUP(9.99999E+307,K2:02) to look at the range of 5 cells and return the value from the last non-blank cell. 
It would be great if I could somehow get SQL to do this, then I would have to need Excel.  it just needs to loop through all 5 cells until it finds a blank and then return the previous value but I don't have the expertise in SQL to do this.  
Thanks guys
Geoff

Sorry guys - the requirement was very difficult to explain for me.   I was trying tind the last non-blank value out of the 5 fields.
It is for content management on a website - to get our products in the correct categories.   The UDFs control where the products are nested within the website category structure
I also posted on a SQL forum and got this response which appers to work well.   However it will only run from the SQL Server Management Studio and not from SAP B1.   This is fine though because I have created a batch to run the query, save as a CSV and FTP to the web server to it's perfect:
IF OBJECT_ID(N'dbo.LastValue', N'FN') IS NOT NULL
     DROP FUNCTION dbo.LastValue;
GO
CREATE FUNCTION dbo.LastValue
        @TID1 int= 0,
        @TID2 int= 0,
        @TID3 int= 0,
        @TID4 int= 0,
        @TID5 int= 0
       )RETURNS int
AS     
          BEGIN
          DECLARE @Result int
          SET @Result = 0
          IF @TID1 > 0
               SET @Result = @TID1
          IF @TID2 > 0
               SET @Result = @TID2
          IF @TID3 > 0
               SET @Result = @TID3
          IF @TID4 > 0
               SET @Result = @TID4
          IF @TID5 > 0
               SET @Result = @TID5     
          RETURN @Result
          END
GO
SET NOCOUNT ON SELECT 'Name', 'Description', 'Colour', 'Size', 'SKU', 'Sub-SKU', 'Active', 'Stock', 'Threshold', 'Catalog by TID', 'Sell Price', 'PicturName', 'Garment Personalisation'
SELECT T0.[U_Garment_Title]'Name',
t0.[U_GarmentDesc]'Description',
case T0.[U_GarmentColour]
when 'NULL' THEN ''
else T1.[Name]
END as 'Colour',
case T0.[U_GarmentSize]
when 'NULL' THEN ''
else T2.[Name]
END as 'Size',
case t0.[U_GarmentSKU]
when 'NULL' then ''
else T3.[Name]
end as 'SKU',
T0.[ItemCode]'Sub-SKU',
case T0.[U_Active]
when 'Y' then 'YES'
when 'N' then 'NO'
else '-'
END 'Active',
T0.[OnHand]'Stock',
T0.[U_Threshold],
dbo.lastValue(T4.[U_Website_ID],T5.[U_Website_ID],T6.[U_Website_ID],T7.[U_Website_ID],T8.[U_Website_ID]) AS 'Catalog by TID',
T9.[Price]'Sell Price',
case T0.[PicturName]
when 'NULL' THEN ''
else T0.[PicturName]
END as 'Picture',
case T0.[U_Garment_Pers]
when 'Y' then 'YES'
when 'N' then 'NO'
else '-'
END 'Garment Personalisation'
FROM [dbo].[OITM]  T0
LEFT JOIN [dbo].[@GARMENT_COLOUR]  T1 ON T0.U_GarmentColour = T1.Code
LEFT JOIN [dbo].[@GARMENT_SIZE]  T2 ON T0.U_GarmentSize = T2.Code
LEFT JOIN [dbo].[@GARMENT_SKU]  T3 ON T0.U_GarmentSKU = T3.Code
LEFT JOIN [dbo].[@GARMENT_TID]  T4 ON T0.U_GarmentTID1 = T4.Code
LEFT JOIN [dbo].[@GARMENT_TID2]  T5 ON T0.U_GarmentTID2 = T5.Code
LEFT JOIN [dbo].[@GARMENT_TID3]  T6 ON T0.U_GarmentTID3 = T6.Code
LEFT JOIN [dbo].[@GARMENT_TID4]  T7 ON T0.U_GarmentTID4 = T7.Code
LEFT JOIN [dbo].[@GARMENT_TID5]  T8 ON T0.U_GarmentTID5 = T8.Code
INNER JOIN ITM1 T9 ON T0.ItemCode = T9.ItemCode
WHERE T0.[U_Active] ='Y' and  T9.[PriceList] =8 and T0.[VatGourpSa]='O2' and T0.[U_GarmentTID1]='1100'

Similar Messages

  • How to create an Input Ready Query in Bex Excel with no transact data

    Hi
    We created a query where we want the user to put in NEW LINES. This query has in general no data when user starts planning.
    We have 2 front-ends for this, Bex Web and Excel. Both shows initial 'no data available
    BexWeb': Implementing the command set_data_entry_mode we get all the relevant columns for the input
    Excel: Command set_data_entry_mode or set_input_mode does not allow the users to insert new lines. Still error message pops up 'no data available'
    Do you have a solution for that ?
    Regards,
    Thomas

    Hi Gregor,
    In the note 1149346 that you have mentioned, it says -
    You must start the input-ready query in change mode.
    BEx Analyzer: In the properties of the analysis grid, the switch
    "Suppress new rows" must not be set.  Furthermore,
    the switch "Allow entry of plant values"
    must be set in the local query properties.
    I have not seen this setting Allow entry of plant values in a query - can you tell what is refers to?

  • I want to create a Pdf file - do i misunderstand the product?  I thought i could create a PDF similar to excel or word file or do i have to create there and convert to PDF? I bought the pack for $89.PDF Pack!

    I want to create a Pdf file - do i misunderstand the product?  I thought i could create a PDF similar to excel or word file or do i have to create there and convert to PDF? I bought the pack for $89.PDF Pack!

    Hi Brian,
    You can create it in Word or excel and then you can Convert it into .pdf Format
    Here's a feature list that depicts benefits of PDF pack: Convert Word to PDF, Convert PDF to Word & Merge PDFs | Adobe PDF Pack
    Please revert back if you have any other questions or need any help.
    Regards,
    Rahul

  • How to create a pivot table similar to excel

    I would like to learn how to create a pivot table, similar to excel, thanks.
    Jmortiz

    Numbers does not have  pivot table function but can sort data, and summarize data.  If you can provide an example of the data you want to analyze I am certain we can help you in building summary tables.

  • Steps to save a Query/Report as Excel file in Share folder

    Hi,
    I have a requirement where i need to schedule a BI report automatically on a daily basis and save it in a Sharepoint folder as a excel file.  I have gone through the Forums but didnt get a clear idea on how to proceed this with.  I read about RSCRM_BAPI transaction but i hope we need to do this manually to save the file each time.  Also, in Broadcaster there are options only to send Email & save in Portal. 
    So, if anybody have idea on saving a Query/Report as excel file in a Share folder automatically, kindly help me in suggesting the steps to do this activity.
    Regards,
    Murali

    Hi
    1. Create Three Floders in AL11 i.e. in Apllication Server. Eg Name it F1, F2 and F3.
    2. First dump the .csv files into F1. (Name xyz.csv).
    3. Then using UNIX/WINDOWS (depends on your OS) script , first check the file is there are not in F1, if yes then rename the file with date and time or date and transfer the files from F1 to F2 i.e xyz06032010.csv.
    4. Then Create a small ABAP program to check the file in F2, if it is there then Trigger the Event, and using that event you execute teh PC.
    5. Then using UNIX/WINDOWS (depends on your OS) script , transfer the files from F2 to F3 i.e xyz06032010.csv
    6. Next day morning F1 and F2 are empty and F3 is having the backup files.
    So use this method, I used the similar logic and it is working fine.
    Timinings are importent i.e what time you need to dump the fule in F1 and what time you need to run UNIX/WINDOWS (depends on your OS) script , transfer the files from F1 to F2 and what time UNIX/WINDOWS (depends on your OS) script , transfer the files from F2 to F3.
    OR
    1. Create Two Floders in AL11 i.e. in Apllication Server. Eg Name it F1 and F2
    2. First dump the .csv files into F1. (Name xyz.csv)
    3. Then load the data using InfoPackage, through PC.
    4. At the end of the load Attach a simple Program to Move the xyz.csv file from F1 to F2.
    5. So next day the file will come to F1 and the it will load and at the end it will move to F2.
    Else  you can use simple one or two lines of UNIX/WINDOWS (depends on your OS) script to move the file from F1 to F2 , once you load is over.
    While moving the file from F1 to F2 you can append the date at the end of the file and then move to F2, it is use full for future reference.
    See Blogs and Article, similar logic...
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    How to transfer the Data from SAP-System to Non-SAP system without additional Cost/License
    /people/surendrakumarreddy.koduru/blog/2009/03/11/how-to-transfer-the-data-from-sap-system-to-non-sap-system-without-additional-costlicense
    To Check the Files/Reports in Application Server and Trigger Mail Alerts.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/4096bf2d-bcea-2b10-4ab4-e0683830d9b2&overridelayout=true
    Thanks
    Reddy
    Edited by: Surendra Reddy on Mar 12, 2010 6:41 AM

  • Will dynamic Excel commands in a C# Edit Script run ok as a SSISDB Package and a SQL Server Agent Job?

    I've seen some conflicting things in terms of dynamic Excel commands running in a SSISDB Package and a scheduled SQL Server Agent Job...things like that it's not supported...that it won't work...etc...
    It's a pretty simple script...to open up a .xlsx file and save it as a .xls file. I am trying to be proactive here and the reason I did it this way is because I could not source the .xlsx file and then I couldn't use OLE DB sourcing because I think the .xlsx
    file wants you to use Microsoft.ACE.OLEDB.12.0 and that entails installing the 64-bit Microsoft Access Database Engine and I cannot do that because our network version of Microsoft Office 2010 is 32-bit and in order to install the 64-bit Microsoft Access Database
    Engine 2010 it's prompting me to uninstall Microsoft Office 2010 and that is not possible.
    Ugh!
    So I'm hoping that I can promote and deploy this current SSIS Package to Production and create a SQL Server Agent Job that will successfully run this and its dynamic Excel commands.
    Do you know of any hurdles with this? Any anomalies...struggles...
    Thanks for your review and am hopeful for a reply.
    Here's the C# Script...which works perfectly client side...
    string StrFileName = (Dts.Variables["User::FileName"].Value.ToString());
    StrFileName = Path.GetFileNameWithoutExtension(StrFileName);
    string StringSourceFile = (Dts.Variables["User::FilePath"].Value.ToString()) + StrFileName + ".xlsx";
    string StringDestinationFile = (Dts.Variables["User::FilePath"].Value.ToString()) + StrFileName + ".xls";
    // This initiates the Excel Application
    Microsoft.Office.Interop.Excel.Application excelApplication = new Microsoft.Office.Interop.Excel.Application();
    // This Opens the Source .xlsx File from Emdeon ePaySmart
    Workbook workbook = excelApplication.Workbooks.Open(StringSourceFile, XlUpdateLinks.xlUpdateLinksNever, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    // This will Save the Source .xlsx Emdeon ePaySmart File as a .xls File...note xlFileFormat.xlExcel5
    workbook.SaveAs(StringDestinationFile, XlFileFormat.xlExcel8, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMode.xlExclusive, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    // This will Close the Source
    workbook.Close(false, Type.Missing, Type.Missing);
    // This shuts down the Excel Application
    excelApplication.Quit();

    This should work if you use a proxy to run this package in the Agent; see:
    http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
    Arthur
    MyBlog
    Twitter

  • How to create a Universe with excel?

    I want to create a universe using excel, but I don't know if it is possible.
    If it is possible should I save the excel file in an specific folder? where? 
    Is it possible to create WebI reports using this universe?
    Edited by: PadawanGirl on Jan 31, 2011 7:53 PM

    Hi Padawan,
    Creating a Business Objects Universe from an Excel File
    To create an Example Universe, we will first Extract data in a BusinessObjects report and
    save it to Excel. Letu2019s create a new Document from the Island Resort Marketing
    universe, and include All of the Resort attributes and Revenue.
    Generate a New Report from a Universe
    Generate a Standard Report
    Creating a Business Objects Universe from an Excel File
    Choose Island Resorts Marketing.
    Choose all of the Resort class, and the <Revenue> Measure object.
    Creating a Business Objects Universe from an Excel File
    Depending on your preference here, you can either choose Edit > Copy All or you can
    edit the Data Provider to export the results of this query to Excel.
    I like to use the Data Provider method, since this allows me to specify a path, etc. If you
    have used copy/paste, you will have one extra step that will be described, but not
    demonstrated.
    Export to Local File Format and make sure that the Format is listed as: Microsoft
    Excel 97 Files (*.xls). You may even want to Change the Path, or Rename the file at the
    Name line, or Browseu2026 to a new path.
    Creating a Business Objects Universe from an Excel File
    Once the Export has completed, launch Excel and browse open the file that was just
    created. If you have Copied/Pasted the values, then you should already be at the next
    step.
    If you havenu2019t done this already, browse over the Resorts.xls file and open it. If you
    have used Copy/Paste, just bring Excel to the foreground.
    Creating a Business Objects Universe from an Excel File
    Select all of the data. If you Copy/Pasted, make sure that you delete the Header that
    copied as well. With all of the data selected, make sure the range has a name. You will
    need to enter a name if youu2019ve pasted this, otherwise it should match the Filename minus
    the .xls. Save this if youu2019ve made any changes, or created this from scratch.
    Jump to the BusinessObjects Designer module and create a New Universe. Iu2019ve named
    my Universe: Resort Revenue
    Creating a Business Objects Universe from an Excel File
    Create a new Connection, and choose ODBC Drivers.
    Iu2019ve named my connection: Resorts_xls and chosen Generic ODBC Datasource for my
    Database engine. Click on the ODBC Admin button.
    Add a new System or User DSN. If you want this available for anyone on your machine,
    System DSN is the better bet. Select the appropriate tab and hit Addu2026
    Creating a Business Objects Universe from an Excel File
    Choose the Microsoft Excel Driver (*.xls) from the list of available data source drivers.
    Name the Data Source Name something that is meaningful, as it will be what appears in
    the Drop-Down menu. I named it Resorts.xls File and next weu2019ll choose Select
    Workbooku2026 and browse to the location of our Resorts.xls file.
    Unless youu2019ve changed the location, it should be located under:
    C:/Program Files/Business Objects/Business Objects 5.0/UserDocs/
    Select the XLS file and click u201COKu201D
    Creating a Business Objects Universe from an Excel File
    Verify that the path is set for the Workbook and click u201COKu201D
    You should see the new DSN created with the name of your Choosing. (In my case, itu2019s
    Resorts.xls File.) Go ahead and click u201COKu201D
    Back in the Designer Module, Choose the Resorts.xls File from the Data Source Name:
    drop-down list, and click u201COKu201D
    Creating a Business Objects Universe from an Excel File
    Once the connection has been set, click u201COKu201D and weu2019ll get to Universe Building.
    Double-Click in the Schema area in the designer, or use the Table Browser to add the
    Resorts table (named-range). Once they are added, feel free to move them over to create
    Classes and Objects off this table as well.
    Creating a Business Objects Universe from an Excel File
    Iu2019ve modified the SQL of the Revenue object, to turn this into an aggregate. Set the
    formula to: Sum(Resorts.Revenue) and click OK.
    My Final Universe looks like the above. Once this Universe is created, Save it and
    launch the Business Objects Reporter module.
    Creating a Business Objects Universe from an Excel File
    Select the newly created Resort Revenue universe and choose the objects youu2019d like to
    report on.
    Iu2019ve selected the <Country>, <Resort> and <Revenue> objects.
    Here are my final resultsu2026
    All the best.
    Praveen

  • Export Query Data to Excel

    Hey guys, I have a cfm page that I am using to query data, and the  result set is displayed on the same page when a user clicks submit.
    My question is, I would like to create a clickable icon where, after a  user runs the query and the data table displays, I want the user to be  able to click a little Excel icon that will allow them to download the  data in Excel.
    So, a user clicks on a little icon somewhere on the page and IE or  Firefox or whatever pops up a little dialog box asking them if they want  to OPEN or SAVE the file results.xls.  How can I do this?
    Here is my current code, but where do I implement the cfoutput stuff to  export?  On the same page?
    <cfquery name="qActivity" datasource="khamp" result="resultInfo">
         SELECT KHAMELEON.GL_DETAIL.ACCOUNT, KHAMELEON.GL_ACCOUNT.DES1, KHAMELEON.GL_DETAIL.ENTITY,
        SUM (KHAMELEON.GL_DETAIL.AMOUNT) AS "TotalAmt"           
         FROM KHAMELEON.GL_ACCOUNT, KHAMELEON.GL_DETAIL
        WHERE 0=0
        <cfif Form.Entity IS NOT "">
              AND KHAMELEON.GL_DETAIL.ENTITY = '#Form.Entity#'
         </cfif>
        AND KHAMELEON.GL_DETAIL.ACCTG_DATE <= '#Form.asofday#-#Form.asofmonth#-#Form.asofyear#'
        <cfif Form.accountnum IS NOT "">
        AND KHAMELEON.GL_ACCOUNT.ACCOUNT = '#Form.accountnum#'
        </cfif>
        AND KHAMELEON.GL_ACCOUNT.ACCOUNT=KHAMELEON.GL_DETAIL.ACCOUNT
        GROUP BY
    KHAMELEON.GL_ACCOUNT.ACCOUNT,
    KHAMELEON.GL_DETAIL.ACCOUNT,
    KHAMELEON.GL_ACCOUNT.DES1,
    KHAMELEON.GL_DETAIL.ENTITY
         HAVING SUM(KHAMELEON.GL_DETAIL.AMOUNT)<>0
         ORDER BY KHAMELEON.GL_ACCOUNT.ACCOUNT ASC
         </cfquery>
      <cfif resultInfo.Recordcount eq 0>
        No Records Match the Search Criteria.
        <cfelse>
        <hr/>
        <br/>
        <table border="1" class="displaytable">
    <!--Headings Row-->  
            <tr>
               <th>Account</th>
               <th>Description</th>
               <th>Entity</th>
               <th>Book 1</th>
          </tr>
    <!--Result Rows-->   
          <cfoutput query="qActivity">
          <tr>
            <td>#qActivity.ACCOUNT#</td>
            <td>#qActivity.DES1#</td>
            <td>#qActivity.ENTITY#</td>
            <td style="text-align:right">#NumberFormat('#qActivity.TotalAmt#', "_(999,999,999.99)")#</td>
          </tr>
          </cfoutput>
    I got the following code off of a thread in the forum, but it trys to  download the excel file as soon as the query is run (the excel download  doesn't work though, it trys to download the actual cfm page instead):
    <cfheader name="Content-Disposition"
    value="inline; filename=tb.xls">
    <cfcontent type="application/vnd.ms-excel">
    <table border="2">
    <tr>
    <td> Account </td><td> Description </td><td> Entity </td><td> Book1 </td>
    </tr>
    <cfoutput query="qActivity">
    <tr>
    <td>#qActivity.ACCOUNT#</td><td>#qActivity.DES1#</td><td>#qActivity.ENTITY#</td><td>#NumberFormat('#qActivity.TotalAmt#', "_(999,999,999.99)")#</td>
    </tr>
    </cfoutput>
    </table>
    </cfcontent>
    Thanks guysq

    To actually get the data into excel, google "cold fusion excel poi" and look for Ben Nadel's cfc.  Otherwise you might have issues with Office 2007.
    For the icon or whatever, make your query a session variable.  Then have the icon link to either a self closing popup or a very small iframe that exports the query to an excel file and then uses cfcontent to download it to the user.

  • Query output in Excel

    Hi ,
        I have a job with number of queries. I need that output of the query in an excel format to a location whenever that job runs. Help me out.

    >> and there was little explanation behind it <<
    There is no need for further explanations.  Each component in a system has its own responsabilities.
    You should use the right tool for the right job. Calling console apps is not the responsability of the database engine and there are better ways to do that job.
    >>
    Personally I've found that if you can't integrate a C# library through CLR then using the console is a perfectly legitimate way of getting around that issue.
    <<
    I would like to know what feature you needed to implement that required xp_cmdshell.
    But in this case, getting several queries exported to excel files in a job can be done by invoking the console app from the SQL Server Agent Job. No need for xp_cmdshell at all.
    In our organization, we create lots of LOB web applications. Most of them have the option to export the data coming form SQL Server queries shown on grids to Excel files. Guess what? We don't call xp_cmdshell.
    Jesús López
    EntityLite: A Lightweight, Database First, Micro ORM

  • Result of a Query in an Excel Sheet??

    Hi,
    I am using sqlplus on Unix environment.
    How can I get the results of a query (a multi column select query) into a excel sheet, which I can later SCP to my windows environment.
    Kindly reply asap.
    Thanks In Advance :)
    Abhi

    You might be able to use the sqlplus colsep command
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm#sthref2716
    SQL> set colsep ','
    SQL> select * from emp;
    EMPNO,ENAME   ,JOB      ,   MGR,HIREDATE ,   SAL,  COMM, DEPTNO
      7369,SMITH   ,CLERK    ,  7902,17-DEC-80,   800,      ,     20
      7499,ALLEN   ,SALESMAN ,  7698,20-FEB-81,  1600,   300,     30
      7521,WARD    ,SALESMAN ,  7698,22-FEB-81,  1250,   500,     30
      7566,JONES   ,MANAGER  ,  7839,02-APR-81,  2975,      ,     20
      7654,MARTIN  ,SALESMAN ,  7698,28-SEP-81,  1250,  1400,     30
      7698,BLAKE   ,MANAGER  ,  7839,01-MAY-81,  2850,      ,     30
      7782,CLARK   ,MANAGER  ,  7839,09-JUN-81,  2450,      ,     10
      7788,SCOTT   ,ANALYST  ,  7566,09-DEC-82,  3000,      ,     20
      7839,KING    ,PRESIDENT,      ,17-NOV-81,  5000,      ,     10
      7844,TURNER  ,SALESMAN ,  7698,08-SEP-81,  1500,     0,     30
      7876,ADAMS   ,CLERK    ,  7788,12-JAN-83,  1100,      ,     20
      7900,JAMES   ,CLERK    ,  7698,03-DEC-81,   950,      ,     30
      7902,FORD    ,ANALYST  ,  7566,03-DEC-81,  3000,      ,     20
      7934,MILLER  ,CLERK    ,  7782,23-JAN-82,  1300,      ,     40
    14 rows selected.
    SQL>

  • Create Query views in BI 7.0

    My Dear Friends
    Can any body tell me how to create Query views in BI 7.0 and assign to Data provider
    its top urgent.
    Your help will be more appreciated
    Thx & regards

    Hi,
    When you run a BEx query the result is displayed on Excel.You could save this as a workbook
    under a role or save view as global under a role.
    For detail info Check the below links:
    http://help.sap.com/saphelp_nw04/helpdata/en/46/4a04f82663400181bc8631551d34ad/frameset.htm
    Web query views
    http://help.sap.com/saphelp_nw04/helpdata/en/94/01f8894dec
    45129a245027c29cb836/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/44/624da0e6444ddee10000000a1553f7/frameset.htm
    Reg
    Pra

  • How to realize the referenced in the BI, similar to EXCEL "vlookup" mode

    HI,experts:
    My  webi 4.0
    Data and  Logical following:
    DIM(dimnesion):
    one Query is
    [dimA]  [dimB] [dimC]  [dimD]
    New  add Query is
    [dimA]  [Class1]
    the two Query are Different  universe model .
    THE dimA  is the same data content.
    I want to achieve the effect of the following:
    [dimA]  [dimB] [dimC]  [dimD]   [Class1]
    Error occurred:   #DATASYNC   and    #CONTEXT (Screenshot)
    How to realize the referenced in the BI, similar to EXCEL "vlookup" mode?

    I get it.thanks
    The solution is set up  detail variable
    Screen Shot
    Regards
    wang

  • Acrobat have features similar to excel macros?

    Does acrobat have a feature similar to excel macros? Example, clicking a button on title page starts a new form page with logo and questions already in place? The problem is the number of forms per customer is different so I would need the title page to have a built in function that generates new form pages.

    Acrobat uses the JavaScript scripting language to provide automation code.
    Acrobat also has the ability to edit the tool bars.
    There is a built in tool to insert or add a new blank page.
    One can also create a template that can be used create a new page from itself and it can include images and form fields. And if you program it correctly the fields will be renamed for each page and the scripts for performing the calculations will automatically adjust for the added page.

  • Query designer in EXCEL question

    Hi!
    I have a question about query designer in excel.
    I want SQL query to have in WHERE clause OR instead of AND (which is default), so the query would be like these:
    <b>ORIGINAL:</b>
    SELECT
    D1~SID_ZKAZALNIK AS S____590
    COUNT( * ) AS 1ROWCOUNT
    SUM( F~/BIC/ZPLANKA2 ) AS ZPLANKA2
    SUM( F~/BIC/ZVREDKA2 ) AS ZVREDKA2
    FROM
    FROM
    /BIC/FZKAZAL AS F
    JOIN
    /BIC/DZKAZAL1 AS D1
    ON
    F~KEY_ZKAZAL1
    = D1~DIMID
    JOIN
    /BIC/DZKAZALT AS DT
    ON
    F~KEY_ZKAZALT
    = DT~DIMID
    JOIN
    /BIC/DZKAZALP AS DP
    ON
    F~KEY_ZKAZALP
    = DP~DIMID
    WHERE
    <b>WHERE
    DT~SID_0CALQUARTER
    = 20044
    ) ) AND  ( (
    DP~SID_0RECORDTP
    = 0
    ) ) AND  ( (
    DP~SID_0REQUID
    <= 1060
    ) ) ) )</b>*** GROUP BY
    GROUP BY
    D1~SID_ZKAZALNIK
    DB-SPECIFIC HINTS
    &SUBSTITUTE LITERALS&
    <b>WHAT I WANT:</b>
    SELECT
    D1~SID_ZKAZALNIK AS S____590
    COUNT( * ) AS 1ROWCOUNT
    SUM( F~/BIC/ZPLANKA2 ) AS ZPLANKA2
    SUM( F~/BIC/ZVREDKA2 ) AS ZVREDKA2
    FROM
    FROM
    /BIC/FZKAZAL AS F
    JOIN
    /BIC/DZKAZAL1 AS D1
    ON
    F~KEY_ZKAZAL1
    = D1~DIMID
    JOIN
    /BIC/DZKAZALT AS DT
    ON
    F~KEY_ZKAZALT
    = DT~DIMID
    JOIN
    /BIC/DZKAZALP AS DP
    ON
    F~KEY_ZKAZALP
    = DP~DIMID
    WHERE
    <b>WHERE
    DT~SID_0CALQUARTER
    = 20044
    ) ) <b>OR</b> ( (
    DP~SID_0RECORDTP
    = 0
    ) ) <b>OR</b>  ( (
    DP~SID_0REQUID
    <= 1060
    ) ) ) )</b>*** GROUP BY
    GROUP BY
    D1~SID_ZKAZALNIK
    DB-SPECIFIC HINTS
    &SUBSTITUTE LITERALS&<b></b><b></b>
    Is there a way to change filter from AND to OR where u need that in visual query designer in Excel????
    I need these becouse i want to say smth. like that ... SELECT data FROM some cube WHERE date = 10/2004 OR date_q = 3/2004 OR month = 11 OR year = 2003

    Thanks for reply Roberto!
    Do u think with that? :
    Create 3 different queries on worksheet and than copy values in excel to another worksheet manualy?
    If that, then this is not an option for me, becouse i need joust one query.
    Is there another option?

  • Query help in sql commands

    using apex 4.1 i'm entering the following query in the sql command window and I keep getting a pop-up for Entering Bind Variable. I'm not using bind variables though, anyone else see this issue before?
    SELECT A.FIRST,A.LAST,A.COMPANY AS CNAME,
    J.TOT_MAN_HOURS,
    J.ACREAGE,
    W.NUM_WORKERS,
    W.START_DT
    FROM EW_ACCOUNTS A, EW_WORK_ORDER W, EW_JOBS J
    WHERE A.ID = J.ACCT_ID
    AND J.JOB_ID = W.JOB_ID
    AND W.START_DT >= SYSDATE
    AND W.START_DT < SYSDATE+1
    ORDER BY W.START_DT

    I tried that and it didn't seem to help either.
    Funny though, if I write a new query against just one of the tables and write out each column name. it works. If I use the * instead of writing each column name, I have the same issue.
    This is in apex.appshosting.com free demo environment. I sent them an email asking about it and they told me it was a code issue and they don't support the demo environment.

Maybe you are looking for