SQL Query will not work in CRXI

I am using CRXI Developer R2 against an Oracle 9i DB. The following query works in Oracle SQL Developer, but returns no results in Crystal (no errors in Crystal either). Anyone know what is wrong?
SELECT b1.b1_alt_id,
       b1.b1_per_type,
       issued.status_date IssueDate,
       closed.status_date CloseDate,
       case
       when bc.b1_checklist_comment is null
       then 'No Patch List'
       else bc.b1_checklist_comment
       end PatchList
FROM   b1permit b1
       INNER JOIN (SELECT b1_per_id1,
                          b1_per_id2,
                          b1_per_id3,
                          status_date
                   FROM   status_history
                   WHERE  status = 'Issued'
                          AND rec_status = 'A'
                          AND status_date BETWEEN '01-JUL-08' AND '31-DEC-08') issued
         ON b1.b1_per_id1 = issued.b1_per_id1
            AND b1.b1_per_id2 = issued.b1_per_id2
            AND b1.b1_per_id3 = issued.b1_per_id3
            AND b1.rec_status = 'A'
            AND b1.b1_per_type = 'Utility'
       LEFT OUTER JOIN (SELECT b1_per_id1,
                               b1_per_id2,
                               b1_per_id3,
                               status_date
                        FROM   status_history
                        WHERE  status = 'Closed'
                               AND rec_status = 'A') closed
         ON b1.b1_per_id1 = closed.b1_per_id1
            AND b1.b1_per_id2 = closed.b1_per_id2
            AND b1.b1_per_id3 = closed.b1_per_id3
       LEFT OUTER JOIN bchckbox bc
         ON b1.b1_per_id1 = bc.b1_per_id1
            AND b1.b1_per_id2 = bc.b1_per_id2
            AND b1.b1_per_id3 = bc.b1_per_id3
            AND b1.rec_status = bc.rec_status
            AND bc.b1_checkbox_desc LIKE 'Patch List%'

Hi
Instead of using this query direct;y, create a view
as
CREATE OR REPLACE VIEW V1
AS
SELECT <Your query>
From Oracle client check if view returns desired result by
select * from <viewName>
and use that view as a datasource in your report.
--Kuldeep

Similar Messages

  • Simple Update query Will not work

    I am new to sql and I am doing an update query in access and it will not work, here is the query.
    UPDATE Change Code Master Table SET change code = '0';
    Edited by: 805337 on Oct 26, 2010 8:05 AM

    805337 wrote:
    I am new to sql and I am doing an update query in access and it will not work, here is the query.
    UPDATE Change Code Master Table SET change code = '0';
    Edited by: 805337 on Oct 26, 2010 8:05 AMI'm not at all sure why you are asking an MS Access question on an Oracle forum. Last I heard, Larry had not bought Microsoft yet.
    The MS Access equivalent to double quoting an identifier is square brackets like:
    UPDATE [Change Code Master Table] SET [change code] = '0';John

  • Where rownum=2 in my sql query is not working . Why ??

    Hello,
    i am using Oracle 11g .Referring scott schema's emp table.
    I just issued this sql query with the intention to get second highest salary of a employee. But i am unable to understand why my query fails ?
    select rownum,empno,ename,sal from (select empno,ename,sal from emp order by sal desc) where rownum=2;This query is returning no rows . Can you tell why this query is returning no rows ?

    888953 wrote:
    Because you can use ROWNUM only to limit the number of returned records, not to return a specific record.
    So only this has sense (n any number):
    ROWNUM <= n
    or
    ROWNUM = 1 (which is equal to ROWNUM <= 1)
    Anything else will not return a row.As i said ,
    select * from (select rownum rn,empno,ename,sal from (select empno,ename,sal from emp order by sal desc)) where rn=2;this query is working fine.So rownm can be used to return a specific record . Please rectify me if i am wrong .

  • Goods Issue - SQL Query will not sum

    I have 3 Goods Issue documents with Document Total for each document 10,000 / 20,000 / 30,000 subsequently.
    I want to make query so that it will display like below - where it shows BOTH each of 3 document value (10000/2000/30000) AND the sum of the 3 documents (60000) like below.
    Doc 1 - 10,000
    Doc 2 - 20,000
    Doc 3 - 30,000
    Total = 60,000
    In addition, I would like the ability to choose date range. Basically, something like
    SELECT Document_Total
    FROM Goods_Issue table
    WHERE the_document_date is between 1-SEP-2011 and 31-SEP-2011
    AND the_reference_is _________________
    I have tried many SQL queries, but it displayed either:
    Doc 1 - 10,000
    Doc 2 - 20,000
    Doc 3 - 30,000
    OR
    Total = 60,000
    Please help.

    @Hendry Wijaya      @GordonDu   @malhaar
    Thanks for helps. The SQL query you provided solved 99% of the problem. I just need to make a tweak on the SQL so that it could display the total on the footer. See screenshot below - I uploaded the pics at imageshack as I don't find a way to attach pics in here.
    [See here - Total_at_Footer|http://i129.photobucket.com/albums/p213/whitesnowbear/AAAA/Untitled-2.jpg]
    Thanks a bunch.

  • SQL Query Report Not working

    Hi,
    I have a region as the type
    "SQL Query (PL/SQL function body returning SQL query)".
    The query works fine for reports if I query two columns. Select 1, 2 from table.
    For some reason if the returning query has more than three columns (select 1, 2, 3 from table), I get an error:
    "report error:
    ORA-01403: no data found"
    Any help would be great. Thanks.

    Hi,
    I've been trying all sorts of things on a test report and the only way that I get extra columns is by including derived columns in the report. Otherwise, even with custom headings, adding or removing columns in the report's PL/SQL adjusts the columns as I would expect.
    Are your extra columns derived or can your report return a varying number of columns?
    Andy

  • An sql query is not working

    Hello everybody,
    I want to enter a word in a table if that word does not already exist in the table.
    I wrote a query like this.
    String word="Football";
    sql="INSERT INTO m_word_list (word_text , category_id , used_counter, date_of_addition, added_by, is_status ) VALUES ('"+word+"', 2, 0, '"+todaysDate+"', '1', '1')WHERE '"+word+"' NOT IN
    (SELECT * FROM `m_word_list` WHERE word_text = '"+word+"');
    Where am I wrong in the query?
    Please help.

    1.) Always post the exception, error message and whatever detail you've got when something "doesn't" work.
    2.) Always use PreparedStatements to execute parameterized queries/updates instead of dynamically building the String
    3.) INSERT INTO doesn't have a where clause.
    Why don't you simply make the wort_text column unique and simply try to insert. If there's already such a word then you'll get a message which tells you.

  • Portal Report from SQL query will not fill the page irrespective of column width.....

    I'm displaying a report in a portal and if you run in full screen the table does not fill the page.
    I can change the column width from xx percent to xx pixel and nothing makes a difference
    any ideas?

    Hi,
    Which version of portal are you using. This is a bug. It has been fixed in 30984.
    Thanks,
    Sharmila

  • Excel 2010 MS Query is not working

    Hi, I am in the process of upgrading all my Excel 2003 spreadsheets to Excel 2010.  I am running into problem with the MS Query.  Spreadsheets have MS Query linking to MS database.  However, when I open some of the spreadsheets, the MS Query
    is not working ie. the blue circle keeps turning and then not responding.  It is very weird that this MS Query is working fine with some spreadsheets but not couple and they are all linking to the same database except a small different in criteria.  I
    tried to re-create the Query in the spreadsheet in Excel 2010 by going to Data>From Other Sources>From Microsoft Query and select the database.  Once I set up the criteria and click Return data, the Query gets stuck.
    Please help! Any comments/suggestions will be appreciated.
    Thanks

    Hi,
    There are many possible causes that can crash MSQuery in Excel 2010.
    First, please make sure we have installed the latest Office 2010 and Windows patches.
    Second, Please read the Blog, it explains one typical crash scenario.
    =====
    AppName: msqry32.exe AppVer: 14.0.4750.1000 ModName: msvcr90.dll
    There are several possible resolution you can try to resolve the above crash:
    1. When you launch MS Query, just disable the option "Validate queries before saving or returning data", this is the fifth box in the options menu.
    The only problem is that if you have made any mistake in your query, you'll only be noticed when receiving the data in excel.
    2. Repair all the keys into registry at the following place:
    [HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC]
    For example:
    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC]
    "TraceFile"="C:\\DOCUME~1\\...USERNAME...\\IMPOST~1\\Temp\\SQL.LOG"
    "TraceDll"="C:\\WINDOWS\\system32\\odbctrac.dll"
    http://blogs.technet.com/b/asiasupp/archive/2011/11/07/msquery-randomly-crashed.aspx
    =====
    Third, start the Excel 2010 with
    safe mode, it helps us confirm if some add-ins cause this issue.
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in
    Office programs.

  • Temporary Table In SAP Query - Does not Work?

    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF OBJECT_ID('tempdb..##tab) IS NOT NULL DROP TABLE ##tab
    CREATE TABLE ##tab
    [Date] date,
    [Delivery Rows] varchar(40),
    [Delivery Total Units] varchar(40),
    [Receipts Rows] varchar(40),
    [Receipts Total Units] varchar(40),
    WHILE @a!=7
         BEGIN
         SET @date=DATEADD(day,-@a, getdate())
         SELECT @delrows=ISNULL(COUNT(DLN1.[LineNum]),0), @delquan=ISNULL(SUM(DLN1.[Quantity]),0)
         FROM ODLN
         INNER JOIN DLN1 ON ODLN.[DocEntry]=DLN1.[DocEntry]
         WHERE ODLN.[CreateDate] = @date
         SELECT @recrows=ISNULL(COUNT(PCH1.[LineNum]),0) , @recquan=ISNULL(SUM(PCH1.[Quantity]),0)
         FROM OPCH
         INNER JOIN PCH1 ON OPCH.[DocEntry]=PCH1.[DocEntry]
         WHERE OPCH.[DocDate]=@date
         SET @a=@a+1
              INSERT INTO ##tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM ##tab
    {/code}
    Can anyone explain why this query does not work in SAP? It works fine on SQL but gives me this message in SAP:
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near ')'.
    2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
    Edited by: Chris Candido on Feb 2, 2011 8:38 PM

    Chris,
    There are several areas in your code which needed changes. 
    1. On the field name for your temp table you had spaces.
    2. The SAP table name ODLN, OPCH, PCH1 had to be fully referenced like
    [dbo].[ODLN]
    3. You really need not have ## in front of your temp table, it could just be #
    The select at the end is actually what causes the most problem as for some reason from within SAP it does not produce the result.  I would suggest you put the whole code into a Stored Procedure and call the SP from SAP.  Corrected SQL below.  If you remove the Select line at the end the query would work with in SAP, but keep it give give you an error. SP is the best option for this.
    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF object_id('tempdb..#tab') IS NOT NULL
    BEGIN
       DROP TABLE #tab
    END
    CREATE TABLE #tab
    [Date] date,
    DeliveryRows varchar(40),
    DeliveryTotalUnits varchar(40),
    ReceiptsRows varchar(40),
    ReceiptsTotalUnits varchar(40),
    WHILE @a!=7
    BEGIN
    SET @date=DATEADD(day,-@a, getdate())
    SELECT @delrows=ISNULL(COUNT(DLN1.LineNum),0), @delquan=ISNULL(SUM(DLN1.Quantity),0)
    FROM [dbo].[ODLN]
    INNER JOIN DLN1 ON [dbo].[ODLN].DocEntry=DLN1.DocEntry
    WHERE [dbo].[ODLN].CreateDate = @date
    SELECT @recrows=ISNULL(COUNT([dbo].[PCH1].LineNum),0) , @recquan=ISNULL(SUM([dbo].[PCH1].Quantity),0)
    FROM [dbo].[OPCH]
    INNER JOIN [dbo].[PCH1] ON [dbo].[OPCH].DocEntry=[dbo].[PCH1].DocEntry
    WHERE [dbo].[OPCH].DocDate=@date
    SET @a=@a+1
    INSERT INTO #tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM #tab
    Suda Sampath

  • Select query is not working in BDC Program

    Hi,
    I am working in BDC for update valuation class for T-code mm01.Actually In this BDC i am using two recoding based on material type.
    i am using two internal table : I_DATA and ITAB
    Use I_DATA to hold excle data in which material No, plant , valuation type , valuation No. and ITAB for material No, material type Only.
    So, i am fetching material Type ( MARA-MTART ) through select query. But Select query is not working. and also i did check MARA table according that  Material Number then  material no. exit in Mara Table.
    Note : at run time  I_DATA have 1 row but ITAB have 0 row ....
    DATA: BEGIN OF I_DATA OCCURS 0,
    MATNR TYPE MARA-MATNR,
    WERKS TYPE MARC-WERKS,
    BWTAR TYPE RMMG1-BWTAR,
    VERPR TYPE BMMH1-VERPR,
    BKLAS TYPE MBEW-BKLAS,
    STATUS TYPE C,
    END OF I_DATA.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MTART LIKE MARA-MTART,
    END OF ITAB.
    Loop at I_DATA.
    select matnr mtart from mara into table itab where matnr = I_DATA-matnr.
    endloop.
    Guide me..........

    If you use your
    Loop at I_DATA.
      select matnr mtart from mara into table itab
        where matnr = I_DATA-matnr.
    endloop.
    At end of loop, itab will only contain the result of the last select, so use a
    Loop at I_DATA.
      select matnr mtart from mara APPENDING table itab
        where matnr = I_DATA-matnr.
    endloop.
    better
    if I_DATA[] is not initial.
      select matnr mtart from mara into table itab
        FOR ALL ENTRIES IN i_data where matnr = i_data-matnr.
    endif.
    Some Remarks
    - If actually required (where does I_DATA come from, is it an external format, you need the internal value to use in SELECT statement), check via SE11 the correct [conversion exit|http://help.sap.com/saphelp_nw04/helpdata/en/35/26b217afab52b9e10000009b38f974/content.htm] associated with domain MATNR (Is it truly ALPHA, and not something like MATN1, so [CONVERSION_EXIT_MATN1_INPUT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=conversion_exit_matn1_input])
    - You could try to use BAPI like [BAPI_MATERIAL_SAVEDATA|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata] and not BDC
    Regards,
    Raymond

  • Problem Webutil WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work

    Hi,
    i am using WebUtil with Oracle Developer 10g(9.0.4)
    i have got the problem
    oracle.forms.webutil.file.FileFunctions bean not found
    WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work.
    all configuration is very good ( formsweb.cfg, wenutill.pll...)
    but i have got this problem
    I am create a new form in C:\webutil_106 and webutil.olb and
    webutil.pll in the same direction C:\webutil_106.
    in FORMS_PATH IN REGISTARY
    Code: [Select all] [Show/ hide]
    ( C:\webutil_106 )
    in default.env
    Code: [Select all] [Show/ hide]
    ( FORMS90_PATH=C:\Dev10g_old\forms90;C:\Dev10g_old\forms90\webutil; C:\webutil_106
    WEBUTIL_CONFIG=C:\Dev10g_old\forms90\server\webutil.cfg
    CLASSPATH= C:\Dev10g_old\forms90\java\jacob.jar;
    C:\Dev10g_old\forms90\java\frmwebutil.jar;
    C:\Dev10g_old\forms90\java\f90all.jar;
    C:\Dev10g_old\jdk\jre\lib\rt.jar
    in formsweb.cfg
    Code: [Select all] [Show/ hide]
    ( archive_jini=f90all_jinit.jar;frmwebutil.jar;jacob.jar
    archive=f90all.jar
    and end of files
    [webutil]
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    baseHTML=webutilbase.htm
    archive_jini=f90all_jinit.jar
    WebUtilArchive=frmwebutil.jar,jacob.jar,f90all.jar
    archive=frmwebutil.jar,f90all.jar
    lookAndFeel=oracle
    in webutil.cfg
    Code: [Select all] [Show/ hide]
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    and I am using The URL:
    Code: [Select all] [Show/ hide]
    http://<LOCALHOST>:8889/forms90/f90servlet?CONFIG=WEBUTIL
    I am creating the webutil user and grant dba and execute
    the create_webutil_db.sql successfully

    Hi,
    i am using WebUtil with Oracle Developer 10g(9.0.4)
    i have got the problem
    oracle.forms.webutil.file.FileFunctions bean not found
    WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work.
    all configuration is very good ( formsweb.cfg, wenutill.pll...)
    but i have got this problem
    I am create a new form in C:\webutil_106 and webutil.olb and
    webutil.pll in the same direction C:\webutil_106.
    in FORMS_PATH IN REGISTARY
    Code: [Select all] [Show/ hide]
    ( C:\webutil_106 )
    in default.env
    Code: [Select all] [Show/ hide]
    ( FORMS90_PATH=C:\Dev10g_old\forms90;C:\Dev10g_old\forms90\webutil; C:\webutil_106
    WEBUTIL_CONFIG=C:\Dev10g_old\forms90\server\webutil.cfg
    CLASSPATH= C:\Dev10g_old\forms90\java\jacob.jar;
    C:\Dev10g_old\forms90\java\frmwebutil.jar;
    C:\Dev10g_old\forms90\java\f90all.jar;
    C:\Dev10g_old\jdk\jre\lib\rt.jar
    in formsweb.cfg
    Code: [Select all] [Show/ hide]
    ( archive_jini=f90all_jinit.jar;frmwebutil.jar;jacob.jar
    archive=f90all.jar
    and end of files
    [webutil]
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    baseHTML=webutilbase.htm
    archive_jini=f90all_jinit.jar
    WebUtilArchive=frmwebutil.jar,jacob.jar,f90all.jar
    archive=frmwebutil.jar,f90all.jar
    lookAndFeel=oracle
    in webutil.cfg
    Code: [Select all] [Show/ hide]
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    and I am using The URL:
    Code: [Select all] [Show/ hide]
    http://<LOCALHOST>:8889/forms90/f90servlet?CONFIG=WEBUTIL
    I am creating the webutil user and grant dba and execute
    the create_webutil_db.sql successfully

  • Why select query is not working?

    CREATE OR REPLACE TYPE prod_type AS OBJECT (
    pid INT,
    pprice NUMBER,
    MEMBER PROCEDURE display(pid IN NUMBER));
    create table prod of prod_type (pid primary key);
    CREATE OR REPLACE TYPE deal_type UNDER prod_type (
    ctr NUMBER,
    OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
    insert into prod values(deal_type(101, 4, 1));
    insert into prod values(deal_type(102, 5, 0));
    ------below given select query is NOT WORKING ---------
    select ctr from prod p where p.pid=101;
    Thanks,
    -Nid

    ------below given select query is NOT WORKINGWondering how you inserted data ...
    SQL> CREATE OR REPLACE TYPE prod_type AS OBJECT (
      2  pid INT,
      3  pprice NUMBER,
      4  MEMBER PROCEDURE display(pid IN NUMBER));
      5  /
    Type created.
    SQL>
    SQL> create table prod of prod_type (pid primary key);
    Table created.
    SQL>
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
      4  );
      5  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    4/1      PLS-00103: Encountered the symbol ")" when expecting one of the
             following:
             , not pragma <an identifier>
             <a double-quoted delimited-identifier> final instantiable
             current order overriding static member constructor map
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER));
      4  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    1/1      PLS-00590: attempting to create a subtype UNDER a FINAL type
    SQL>You made an attempt to create a subtype UNDER a FINAL type - that the reason why can not work ...
    Avoid deriving a subtype from this FINAL type.
    HTH

  • Sql Monitor is not working for forms10g

    Hi All,
    Sql Monitor is not working for forms10g.How can i solve this problems.
    Regards
    Gopinath M

    using sqlmonitor i have traced the forms 6i (.fmx),in this case toad additional
    software sql monitor is automatically added the frmbld.exe in application.
    whatever i am doing in forms runtime the sqlmonitor provide the sql query.
    for examble i am opening the lov with the help of F9.Now the sqlmonitor trace
    the sql query for that lov item.so its very helpful to see the query without
    the source(.fmb).
    Now the problem is the sqlmonitor is not added the iexplore.exe in application.
    because it added frmbld.exe only not for iexplore.exe.but the 10g forms are
    running from the explorer.is there any other forms trace method is available
    pls kindly guide to me.

  • SQL query doesn't work in VB program

    Hi:
    The following SQL query doesn't work into a VB program, I'm using Oracle OLEDB to established connection to the DB, ... the query returns 0 rows ...
    When I run this same query from any SQL Plus, works well (returning me something like 119 rows) ...
    Any clue or hint ??
    Thanks in advanced
    Angel Castro
    SELECT OPERADOR, ID_ALIMENTADOR, RB_FSC, NUM_CTROL, COND_OPERA, TRANSITORIO, PENDIENTES, ANORMAL, EDO_REAL, IDENTIFICADOR, CAUSA
    FROM HISTORICO_OPERACION
    WHERE (FECHA BETWEEN '20-AUG-2004' AND '5-NOV-2004')
    AND (HORA BETWEEN '10:00:00' AND '16:00:00')
    ORDER BY ID_ALIMENTADOR ASC;

    Is the column FECHA of datatype DATE?
    Are you running the query with the constant date looking like strings ('20-AUG-2004' in your post, for example) as-is from the VB program?
    If not, are you binding the parameters correctly?
    What is the setting of your NLS_DATE_FORMAT parameter?
    What happens if you do a
    ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'from your VB program before running the query?

  • Have a month number but QaaWs query will not run

    If I type in the parameters for the query it runs with no problem, but when I use the MONTH function that returns the month number the query will not run.
    I think the date serial number is what is being passed even though I see a number being display.  Does anyone know how to conver this MONTH() function to a true number?  This is a converted 4.5 model that works just fine, but looks like they tightened things up in 2008.
    Thanks...
    Tom Nather

    Here is how its setup.  I have a QaaWs query that returns the max date, then Excel functions that calculate the date back 13 months.  One of the functions is MONTH() that returns the month number based on a date stored in a cell, not really a true number.
    I added a vlookup that takes the month from a date field (05/31/2008) and looks up the appropriate NUMBER of the month =VLOOKUP(MONTH(K47),M54:M65,1). Find 5 (which is defined as a number.
    This then is applied to the input side for the Qaaws (Month Number = double) using a Paste Link function from the CONTROLS sheet in excel, and the query then works.
    Anything that is a date always seems to be built off of the date serial number so this was the easiest way to get this to work. 
    I think standards have been tightened up using the Flex language vs. what 4.5 was written in, this works in 4.5 without the necessary conversion.

Maybe you are looking for