Syntax/Delimeter for Data param in Sql Query?

Hello,
I have an ADODB recordset which return too many rows from an Oracle Table. I am trying to limit the rows by using a date field in the table as criteria. Here is what I tried that did not work:
RS.Open "Select * From Tbl1 Where Datefld > #1/1/2002#", conn I get an "Invalid Qualifier" error.
Any help greatly appreciated on the correct syntax/delimeter for this query.
Thanks in advance,
Rich

Nevermind. I used single quotes for the delimeter. That did the trick.
Rich

Similar Messages

  • Can we use Data Pump to export data, using a SQL query, doing a join

    Folks,
    I have a quick question.
    Using Oracle 10g R2 on Solaris 10.
    Can Data Pump be used to export data, using a SQL query which is doing a join between 3 tables ?
    Thanks,
    Ashish

    Hello,
    No , this is from expdp help=Y
    QUERY                 Predicate clause used to export a subset of a table.
    Regards

  • Date parameter to SQL query

    Hi,
    I am using from_date and to_date parameters. Data type and Param type for both are 'Date' and my Format string is 'dd/MM/yyyy'
    I need to pass these two values to my data model which is SQL query. Whenever I use below WHERE clause I am getting
    "ORA-01858: a non-numeric character was found where a numeric was expected", Please let me know how to fix this error.
    trunc(a.scan_timestamp) between to_char(to_date(:p_from_date,'DD/MM/YYYY'),'DD-MON-YYYY') and
    to_char(to_date(:p_to_date,'DD/MM/YYYY'),'DD-MON-YYYY')

    Hello,
    if you choose Date for Data type and Parameter Type for the parameters then the format of your date has nothing to do with your selection.
    Please try
    trunc(a.scan_timestamp) between :p_from_date and :p_to_date
    Wolfgang

  • How do I pull SharePoint 2013 list data using a SQL Query

    I have been asked to write a sql query to pull data from a SharePoint 2013  List.it needs to return all the columns
    Basically a Select all from the specific SharePoint list Database
    I do have the  list GUID ID. But not sure  which  SQL Table or Database to look in for list data.. the site and the list is in our main SharePoint site collection.
    the query only needs to be saved in SQL server

    I know it isn't support but sometimes you have to share data with other programs....
     I'm stuck.. I was able to get this far...
    SELECT * FROM dbo.Lists
    where tp_Title ='List Name'
     how do I pull the columns of the list?
    I think I still need the specific list not just the master list dbo....
    those two links do not work for SQL server  and SharePoint 2013

  • How to replace a dates on a SQL query on Visual Studio (and get the query to work in there in the first place)?

    Morning all,
    I've just been assigned a report-related project but I have not created much of anything in C# or .Net before!
    I was wondering if someone could help me get started. Here are the specifications:
    Basically, I am to create an automated report application. I have the query and I will include it further down
    in this post. The page is to have a couple blanks to specify the Start Date and End Date and replace those dates in the query, and generate the report. What I need some help on is how to make the SQL query work in the application which I will connect to the
    intended database to generate the report (basic I know, but I'm new at this) on Visual Studio 2010. I also need some help on programming the Start Date blank and End Date blank so that what the user types in for those blanks will replace the date fields in
    the SQL query, then generate the report with the new dates. 
    I appreciate the help!
    The SQL query and what the dates are replacing:
    select 
    PTH.INST_ID ,
    PTH.EMPLOYEE_ID,
    DBH.HR_DEDUCTION_AND_BENEFITS_CODE,
    replace(DB.DESCRIPTION,',',''),
    DB.WITHHOLDING_LIABILITY_ACCOUNT_MASK,
    DBH.HR_DEDUCTION_AND_BENEFITS_ID,
    DBH.CHECK_DATE,
    DBH.CHECK_NO,
    DBH.FIN_INST_ACCT_ID,
    replace(replace (DBH.COMMENT,CHAR(10),' '),CHAR(13),' '),
    DBH.HR_DEDUCTION_AND_BENEFIT_CYCLE_CODE,
    DBH.LENGTH,
    DBH.EMPLOYEE_COMPUTED_AMOUNT,
    DBH.EMPLOYEE_BANK_ROUTING_NUMBER,
    DBH.EMPLOYEE_ACCOUNT_TYPE,
    DBH.EMPLOYEE_ACCOUNT_NUMBER,
    DBH.EMPLOYER_COMPUTED_AMOUNT,
    DBH.EMPLOYEE_GROSS_AMOUNT,
    DBH.EMPLOYER_GROSS_AMOUNT,
    DBH.PAYROLL_EXCLUDE,
    PTH.VOID_DATE,
    PTH.BATCH_QUEUE_ID,
    B.BATCH_CODE,
    BQ.FY,
    BQ.END_DATE,
    BQ.COMMENTS,
    BQ.BATCH_CRITERIA_USED,
    BP.COLUMN_VALUE,
    PTH.REPLACEMENT,
    P.LAST_NAME,
    P.FIRST_NAME,
    P.MIDDLE_NAME
    from PY_EMPLOYEE_TAX_HISTORY PTH
    INNER JOIN PERSON_EMPLOYEE PE ON
    PE.INST_ID=PTH.INST_ID AND
    PE.EMPLOYEE_ID=PTH.EMPLOYEE_ID
    INNER JOIN PERSON P ON
    PE.INST_ID=P.INST_ID AND
    PE.PERSON_ID=P.PERSON_ID
    LEFT JOIN HR_EMPLOYEE_DEDUCTIONS_AND_BENEFITS_HISTORY DBH ON
    PTH.INST_ID=DBH.INST_ID AND
    PTH.CHECK_DATE=DBH.CHECK_DATE AND
    PTH.CHECK_NO=DBH.CHECK_NO AND
    PTH.EMPLOYEE_ID=DBH.EMPLOYEE_ID
    LEFT JOIN HR_DEDUCTION_AND_BENEFITS DB ON
    DB.INST_ID=DBH.INST_ID AND
    DB.HR_DEDUCTION_AND_BENEFITS_CODE=DBH.HR_DEDUCTION_AND_BENEFITS_CODE
    LEFT JOIN BATCH_QUEUE BQ ON
    PTH.BATCH_QUEUE_ID=BQ.BATCH_QUEUE_ID
    LEFT JOIN BATCH B ON
    B.BATCH_CODE=BQ.BATCH_CODE 
    LEFT JOIN BATCH_PARAMETER BP ON
    BQ.BATCH_QUEUE_ID=BP.BATCH_QUEUE_ID
    AND BP.COLUMN_NAME = 'SUPPRESS_DIRECT_DEPOSIT'
    ------Please change the WHERE condition for date range of the month you need to run this for.
    WHERE PTH.CHECK_DATE >='07/01/2013'
    AND PTH.CHECK_DATE <='07/31/2013'
    and BQ.BATCH_CODE='BAT_PY_PAYCALC'
    and bq.fy=2014
    ORDER BY PTH.INST_ID ,
    PTH.EMPLOYEE_ID,
    DBH.HR_DEDUCTION_AND_BENEFITS_CODE,
    DBH.CHECK_DATE

    Try this code.  The Server name will be the same name when you use SQL Server Management Studio (SSMS).  It is in the login window for SSMS.  I assume you are using SQLSTANDARD (not SQLEXPRESS) which is in the connection string in the code
    below. I also assume you have remote connection allowed in the database.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    using System.Data.SqlClient;
    namespace ConsoleApplication1
    class Program
    const string DATABASE = "Enter Database Name Here";
    const string SERVER = "Enter Server Name Here";
    static void Main(string[] args)
    DateTime startDate = DateTime.Parse("07/01/2013");
    string startDateStr = startDate.ToString("MM/dd/yyyy");
    DateTime endDate = new DateTime(startDate.Year, startDate.Month + 1, 1).AddDays(-1);
    string endDateStr = endDate.ToString("MM/dd/yyyy");
    string connStr = string.Format("Server={0}\\SQLSTANDARD;Database={1};Trusted_Connection= True;", SERVER,DATABASE);
    string SQL = string.Format(
    "select\n" +
    " PTH.INST_ID\n" +
    ",PTH.EMPLOYEE_ID\n" +
    ",DBH.HR_DEDUCTION_AND_BENEFITS_CODE,\n" +
    ",replace(DB.DESCRIPTION,',','')\n" +
    ",DB.WITHHOLDING_LIABILITY_ACCOUNT_MASK\n" +
    ",DBH.HR_DEDUCTION_AND_BENEFITS_ID\n" +
    ",DBH.CHECK_DATE\n" +
    ",DBH.CHECK_NO\n" +
    ",DBH.FIN_INST_ACCT_ID\n" +
    ",replace(replace (DBH.COMMENT,CHAR(10),' '),CHAR(13),' ')\n" +
    ",DBH.HR_DEDUCTION_AND_BENEFIT_CYCLE_CODE\n" +
    ",DBH.LENGTH\n" +
    ",DBH.EMPLOYEE_COMPUTED_AMOUNT\n" +
    ",DBH.EMPLOYEE_BANK_ROUTING_NUMBER\n" +
    ",DBH.EMPLOYEE_ACCOUNT_TYPE\n" +
    ",DBH.EMPLOYEE_ACCOUNT_NUMBER\n" +
    ",DBH.EMPLOYER_COMPUTED_AMOUNT\n" +
    ",DBH.EMPLOYEE_GROSS_AMOUNT\n" +
    ",DBH.EMPLOYER_GROSS_AMOUNT\n" +
    ",DBH.PAYROLL_EXCLUDE\n" +
    ",PTH.VOID_DATE\n" +
    ",PTH.BATCH_QUEUE_ID\n" +
    ",B.BATCH_CODE\n" +
    ",BQ.FY\n" +
    ",BQ.END_DATE\n" +
    ",BQ.COMMENTS\n" +
    ",BQ.BATCH_CRITERIA_USED\n" +
    ",BP.COLUMN_VALUE\n" +
    ",PTH.REPLACEMENT\n" +
    ",P.LAST_NAME\n" +
    ",P.FIRST_NAME\n" +
    ",P.MIDDLE_NAME\n" +
    " from PY_EMPLOYEE_TAX_HISTORY PTH\n" +
    " INNER JOIN PERSON_EMPLOYEE PE ON\n" +
    " PE.INST_ID=PTH.INST_ID AND\n" +
    " PE.EMPLOYEE_ID=PTH.EMPLOYEE_ID\n" +
    " INNER JOIN PERSON P ON\n" +
    " PE.INST_ID=P.INST_ID AND\n" +
    " PE.PERSON_ID=P.PERSON_ID\n" +
    " LEFT JOIN HR_EMPLOYEE_DEDUCTIONS_AND_BENEFITS_HISTORY DBH ON\n" +
    " PTH.INST_ID=DBH.INST_ID AND\n" +
    " PTH.CHECK_DATE=DBH.CHECK_DATE AND\n" +
    " PTH.CHECK_NO=DBH.CHECK_NO AND\n" +
    " PTH.EMPLOYEE_ID=DBH.EMPLOYEE_ID\n" +
    " LEFT JOIN HR_DEDUCTION_AND_BENEFITS DB ON\n" +
    " DB.INST_ID=DBH.INST_ID AND\n" +
    " DB.HR_DEDUCTION_AND_BENEFITS_CODE=DBH.HR_DEDUCTION_AND_BENEFITS_CODE\n" +
    " LEFT JOIN BATCH_QUEUE BQ ON\n" +
    " PTH.BATCH_QUEUE_ID=BQ.BATCH_QUEUE_ID\n" +
    " LEFT JOIN BATCH B ON\n" +
    " B.BATCH_CODE=BQ.BATCH_CODE\n" +
    " LEFT JOIN BATCH_PARAMETER BP ON\n" +
    " BQ.BATCH_QUEUE_ID=BP.BATCH_QUEUE_ID\n" +
    " AND BP.COLUMN_NAME = 'SUPPRESS_DIRECT_DEPOSIT'\n" +
    " WHERE PTH.CHECK_DATE >='{0}'\n" +
    " AND PTH.CHECK_DATE <='{1}'\n" +
    " and BQ.BATCH_CODE='BAT_PY_PAYCALC'\n" +
    " and bq.fy=2014\n" +
    " ORDER BY PTH.INST_ID\n" +
    ",PTH.EMPLOYEE_ID\n" +
    ",DBH.HR_DEDUCTION_AND_BENEFITS_CODE\n" +
    ",DBH.CHECK_DATE", startDateStr, endDateStr);
    SqlDataAdapter adapter = new SqlDataAdapter(SQL, connStr);
    DataTable dt = new DataTable();
    adapter.Fill(dt);
    jdweng
    Could you elaborate more on what this code does in general?
    Does it generate a table with the data between specified dates? If so, where is the table shown? 
    Where does one enter in the specified start and end dates on the Web Application? Do I have to create start and end date blanks and link them to the code for it to work?
    Sorry for the inconvenience - I'm just really new at this. Thanks!

  • Tool for visually building an SQL query?

    Hello,
    Can anybody recommend a good tool that allows building an Oracle SQL query through a visual interface (similar to MS Access query builder)?
    I checked Oracle SQL Developer (from Oracle) but apparently it only allows building SELECT queries visually, I need to be able to create UPDATE and INSERT statements as well...
    Thank you,
    M.R.

    I'm not very clear on what you want or what you are trying to 'simulate'.
    If you are looking for a way to "build a gui" that allows you to simultaneously modify multiple rows of data in a table:
    This sounds like a "tabular form" in Oracle APEX (which is free with all editions of Oracle including the free XE edition. )
    URL for the out-of-the-box sample "application" that demonstrates a Tabular Form for modifying the EMP table:
    https://apex.oracle.com/pls/apex/f?p=71793:4
    name/password:  demo/demo
    Feel free to sign up for a free account to play with it.
    MK

  • Checking correct data format using sql query

    1) I got column date of joining which accepts date in below format
    DD-MON-YYYY
    DD-MON-YY
    MON-DD-YYYY
    MON-DD-YY
    Month DD,YYYY
    Question:- how do i check whether all dates in Date of joining column are in above format or not using sql query?
    2) I got one more date column which accepts date in below format
    MMDDYYYY
    YYYYMMDD
    MM/DD/YYYY
    MM/DD/YY
    YYYY/DD/MM
    Question:- how do i check whether all dates in date column are in above format or not using sql query?
    sorry if it is a very simple question since I am new to sql and trying to learn ......Thanks for the answers from the group............

    In short, NO, it's not possible.  If you store dates correctly in the database as DATE datatype then you don't have this problem.  If you store them as VARCHAR2 you have a problem.
    So, you get a date of 20092012
    Is that 20th September 2012?  or is it 20th December 2009?
    What about...
    11-Jan-12
    Is that 11th January 2012 or 12th January 2011?
    Dates should never be stored on the database as strings.  That is why Oracle gives you a DATE datatype so you can store them properly.
    Also, when dates are passed from an application to the database, the application should be passing them as DATE datatype, and the application interface should be designed to accept dates from the user in a format specific to their country/locality and it would then know what that format is and automatically convert it to a DATE datatype before it gets anywhere near the database or any SQL.

  • To Get List of Tables from Database which has the data 'AAAA' - T-SQL Query

    Hi,
    I have a database "Adventureworks", I need to get list of tables, which has the data 'AAAA' in their rows.
    Is there any optimised or simple way to do this task?
    Any T-SQL Query Available
    --- Thanks in advance..

    You can refer the same below URL provided by Praveen:
    https://gallery.technet.microsoft.com/scriptcenter/c0c57332-8624-48c0-b4c3-5b31fe641c58
    It has the SQL SP - "SP_SearchTables". You can pass parameters the way you want and get the expected output.
    -- Search for 'bike' instead of 'AAAA'
    Use AdventureWorks2012
    EXEC SP_SearchTables @Tablenames = '%', @SearchStr = '%bike%'
    -Vaibhav Chaudhari

  • How to Get Default Value of a Data Type in SQL Query.

    Hi all,
    I am creating a procedure which will take input the table name and Column Name.
    In the Output i would like to have the data type and default value of that data type which will be used by a another procedure to blank the selected column in the database.
    I tried with SET NULL on the column but as the database is of navision the table have property set to NOT NULL.
    Here is what i have done till now.
    Create Procedure Get_Column_type
    @parm_table_name nvarchar(200),
    @parm_column_name nvarchar(20),
    @parm_result nvarchar(20)OUTPUT
    AS
    BEGIN 
    select @parm_result =
    DATA_TYPE from INFORMATION_SCHEMA.COLUMNS IC
    where TABLE_NAME = '[' + @parm_table_name +']' and COLUMN_NAME = '[' + @parm_column_name + ']'
    END
    GO
    Now instead on write a case statement for so many data types in SQL, i was thinking is it possible someway that above procedure also returns the default value which i can set in another procedure.
    Let me know if its possible or not? Thanks in advance.

    Do you looking for something like this?
    create table t10 ( c int default 1)
    SELECT so.name AS table_name, 
              sc.name AS column_name, 
              sm.text AS default_value
         FROM sys.sysobjects so
         JOIN sys.syscolumns sc ON sc.id = so.id
    LEFT JOIN sys.syscomments SM ON sm.id = sc.cdefault
        WHERE so.xtype = 'U' 
          AND SO.name = 't10'
     ORDER BY so.[name], sc.colid
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Why some columns are not read into Power Pivot when reading data from a SQL query

    I have this SQL query that I want to use to read data to PowerPivot from:
    SELECT Score.FieldCount as fieldcount, Score.Record.GetAt(0) as predicted_gender, Score.Record.GetAt(1) as probability_of_gender,  Score.Record.GetAt(2)
    as probability_of_m,  
    Score.Record.GetAt(3) as probability_of_f,  Score.Record.GetAt(4) as customerkey
    FROM 
    SELECT * FROM dbo.myCLR1(
    dbo.MyCLR2('c:\fILES\MLSM.xml'), 
    'SELECT * FROM [dbo].[Customer]') Input
    ) Score
    After I click 'Finish' in "Table Import Wizard", I can only get 1 column (FieldCount) in Power Pivot window. Why don't I get the other 4 columns? If I save the result to a table I do get all columns but my goal is to dynamically present the result
    so that's not an option. Can anyone shed some light?
    Thanks,
    Chu
    -- Predict everything. http://www.predixionsoftware.com

    If I only pass in query as 
    SELECT * FROM dbo.myCLR1(
    dbo.MyCLR2('c:\fILES\MLSM.xml'), 
    'SELECT * FROM [dbo].[Customer]') Input
    I do get 2 columns (FieldCount and Record as shown below)
    -- Predict everything. http://www.predixionsoftware.com

  • Date formatting in sql query

    hi,
    plz need hpl for this
    i have this query :
    q = "select count(*) from logs where dateLog=current_date";i have a logs in this current date but i havn't any data output ?

    Show us more of your code, please--especiall the spot where you read data from the ResultSet.

  • Customizing the HTML for a Report from SQL Query

    Hello
    I have created a Report from a SQL query that outputs a list of items from a single table column. There are 65 rows returned by the report. I would like to display all the results on one page but the length of the list prevents this. Is there any way of presenting the results as multiple columns on the same page?
    ie
    Res1 Res2 Res3
    Res4 Res5 Res6
    or
    Res1 Res3 Res5
    Res2 Res4 Res6
    I thought about using a 3 column portlet region and attempting to customise the report displayed via each of the portlets but I would prefer to avoid this as it would require the development and maintenance of an additional template.
    Thanks
    Lisa

    Problem solved...
    I have used my SQL query as a cursor in a dynamic page and then used the cursor and htp.p statements to tabulate my results as per my requirements.
    Lisa

  • Problem for create report by sql query under Protal!

    I'm trying create report by sql query method, however it came out the error:
    ORA-00918: column ambiguously defined (WWV-11230)
    Failed to parse as SENTRYDB - select distinct t1.firstnames, t1.lastname, t4.PERSONGROUP, to_char( t1.dateofbirth, 'DD-MM-YYYY' ) as "Dateofbirth", t3.ADDRESS, t3.CITY, t3.STATE, t3.CODE, t3.HOMETELEPHONE, t3.WORKTELEPHONE, t3.INTERESTING, t3.personid from pnames t1, people t3, groups t4 where t3.persongroup = t4.groupid and t1.personid = t3.personid order by rowid (WWV-08300)
    Error: Unable to execute query (WWV-10201)
    The query is :
    select distinct t1.firstnames, t1.lastname, t4.PERSONGROUP, to_char( t1.dateofbirth, 'DD-MM-YYYY' )
    as "Dateofbirth", t3.ADDRESS, t3.CITY, t3.STATE, t3.CODE, t3.HOMETELEPHONE, t3.WORKTELEPHONE, t3.INTERESTING, t3.personid
    from pnames t1, people t3, groups t4
    where t3.persongroup = t4.groupid
    and t1.personid = t3.personid
    I have no problem to run that query under sqlplus!

    Hi,
    I'm cuurently using the portal inside of 9iAs 1.0.2.2.2a. What version of that Portal? By the way, how can I find out the version of Portal that I using? And also can I display image inside of report which created by Portal? I tried statement:
    select
    '<IMG SRC="'|| decode(IMAGE, '', SJAYARAM309.wwctx_api.get_image_path || 'noimg.jpg',
    owa_util.get_cgi_env('DOC_ACCESS_PATH') || '/' || IMAGE) ||'">' stu_pic,
    from stu
    However, it doesn't work. It came out error:
    Unable to describe SQL statement. Please correct it (WWV-13010)
    Invalid SQL statement: select '<IMG SRC="'|| decode(IMAGE, '', SJAYARAM309.wwctx_api.get_image_path || 'noimg.jpg', owa_util.get_cgi_env('DOC_ACCESS_PATH') || '/' || IMAGE) ||'">' pic from test (WWV-13005)
    ORA-01001: invalid cursor (WWV-11230)
    ORA-00904: invalid column name (WWV-11230)
    Failed to parse as SENTRYDB - select '<IMG SRC="'|| decode(IMAGE, '', SJAYARAM309.wwctx_api.get_image_path || 'noimg.jpg', owa_util.get_cgi_env('DOC_ACCESS_PATH') || '/' || IMAGE) ||'">' pic from test (WWV-08300)
    Do you know why?

  • Weird Date Problem in SQL Query

    Dear Members,
    Iam using the following query:
    SQL>select api.attribute2 PO_NO,
    substr(api.attribute4, 10, 5) REL_NO,
    api.invoice_num,
    SUM(T.ACCOUNTED_DR) DR,
    SUM(T.ACCOUNTED_CR) CR
    from gl.gl_je_lines t, GL_CODE_COMBINATIONS GCC, ap_invoices_all api
    WHERE T.SET_OF_BOOKS_ID IN (7)
    AND TO_DATE(TO_DATE(t.PERIOD_NAME, 'MON-YY'), 'DD-MON-YY') =
    TO_DATE(TO_DATE('&P_PERIOD_FROM', 'MON-YY'), 'DD-MON-YY')
    AND TO_DATE(TO_DATE(t.PERIOD_NAME, 'MON-YY'), 'DD-MON-YY') <=
    TO_DATE(TO_DATE('&P_PERIOD_TO', 'MON-YY'), 'DD-MON-YY')
    AND T.CODE_COMBINATION_ID = GCC.CODE_COMBINATION_ID
    AND GCC.SEGMENT5 = '&P_ACCOUNT'
    and t.reference_2 = api.invoice_id
    GROUP BY api.attribute2, substr(api.attribute4, 10, 5), api.invoice_num
    order by api.attribute2, substr(api.attribute4, 10, 5), api.invoice_num
    In the above query iam giving two types of parameters:
    Type1:
    Account:=17400650
    P_PERIOD_FROM:='JAN-07'
    P_PERIOD_to:='DEC-07'
    For the above type of parameters the query is running fine and giving desired results.
    Type2:
    Account:=36210040
    P_PERIOD_FROM:='JAN-07'
    P_PERIOD_to:='DEC-07'
    For the above type of parameters it is giving me the error: ora-01843 not a valid month_
    Can any one please tell me what is the reason for this weird problem.
    Your inputs will be of great help to me.
    Thanks in advance.
    Best Regards,
    Arun Reddy

    Please review Note:338832.1
    How to debug ORA-01843: not a valid month, ORA-01821: date format not recognized, ORA-1801

  • Add a param to SQL query

    I have a sql statement i would like to parameterize.
    How do i add params to the statement for Start and End Dates and Also hostalias
    hostalias maybe multi-value  :-
    SELECT srmhosthost.hostname hostnamehost,
    srmfilesystemfilesystem.fsmountpoint
    fsmountpointfilesystem,
    srmfilesystemfilesystem.filesystemdevice
    filesystemdevicefilesystem,
    srmfilesystemfilesystem.resideson
    residesonfilesystem,
    ROUND(max
    (fsmetricsmonthlyfilesystem.fsusedmax/1048576), 5)
    max_used_GB,
    Round(max
    (fsmetricsmonthlyfilesystem.fstotalmax/1048576), 5)
    file_system_size_GB,
    Round(min
    (fsmetricsmonthlyfilesystem.fsusedmax/1048576), 5)
    min_used_GB,
    Round(avg
    (fsmetricsmonthlyfilesystem.fsusedmax/1048576), 5)
    avg_used_GB
    FROM srmhost srmhosthost, hostmetricsmonthly
    hostmetricsmonthlyhost, srmudfinstance udfhostshost,
    srmfilesystem
    srmfilesystemfilesystem, fsmetricsmonthly
    fsmetricsmonthlyfilesystem, srmudfinstance
    udfhostsfilesystem, srmdate
    WHERE (srmhosthost.iscurrent = 'Y' OR
    srmhosthost.iscurrent IS NULL) AND
    srmhosthost.hostkey =
    hostmetricsmonthlyhost.hostkey(+) AND
    hostmetricsmonthlyhost.datekey = srmdate.datekey AND
    hostmetricsmonthlyhost.datekey >=
    (SELECT min(srmdate.datekey) from Srmdate srmdate
    where srmdate.datestamp >= to_date ( '9/01/2009',
    'MM/DD/YYYY' ) ) AND
    hostmetricsmonthlyhost.datekey < = (SELECT max
    (srmdate.datekey) from Srmdate srmdate where
    srmdate.datestamp < = to_date (
    '07/01/2010', 'MM/DD/YYYY' ) ) AND
    srmhosthost.hostkey = udfhostshost.mokey(+) AND
    (srmfilesystemfilesystem.iscurrent = 'Y'
    OR srmfilesystemfilesystem.iscurrent IS NULL) AND
    srmfilesystemfilesystem.filesystemkey =
    fsmetricsmonthlyfilesystem.filesystemkey(+) AND
    srmfilesystemfilesystem.filesystemkey =
    udfhostsfilesystem.mokey(+) AND
    srmhosthost.hostkey(+) =
    fsmetricsmonthlyfilesystem.hostkey AND
    hostmetricsmonthlyhost.datekey =
    fsmetricsmonthlyfilesystem.datekey AND lower (
    srmhosthost.hostalias ) in lower(
    'apqmd508')
    group by srmhosthost.hostname ,
    srmfilesystemfilesystem.fsmountpoint ,
    srmfilesystemfilesystem.filesystemdevice ,
    srmfilesystemfilesystem.resideson

    Hi Don,
         If i add the sql statement via ADD COMMAND, and create a param called "Host Names", which allows multile values.
    I then changed the sql statement from :-
    ('appmd510')
    to :
    ('{?Host Names}')
    when i enter the the host name appmd510 and enter i get an ora-00907: missing right parenthesis
    i want to be able to save the report, and then open, and only have to supply a start date/end date and host name(s)
    if i do not create the param in the ADD COMMAND dialog box, and leave the sql statement with the ('{?Host Names}') in place
    i do not get prompted for param. If i create a param(Host name)and in record selection  set Hostname  = {?HostNames}  i get nothing

Maybe you are looking for

  • EC-CS Chart of accounts (OCOA, GCOA, CCOA).

    Hello Guys, My client is using EC-CS with ECC6 and wants to apply the following logic: - Assign the transaction COA to a Group chart of accounts (transcation OB13, the purpose of this is to maintain the link between OCOA and GCOA into FI-GL), - Copy

  • Can responses from 2 forms (Spanish and English) be merged into one?

    2 separate forms were created of a survey, one in Spanish and one in English.  I want to report on the data all together. Is there a way to merge the data from these surveys to be able to create one report?

  • Can MRP be done for multiple plants in Single Run?

    Can MRP be done for (MRP Areas) for many plants, many storage locations and many subcontractors in a single run?

  • Safari not opening all the time

    Help, when I click to open Safari, many times it doesn't open and I'm told it is not responding. Usually, I have to click on Safari, then go to Force Quit about 6 -7 times before the program will open. I have the latest Safari update installed still

  • Essbase SSO based in Windows authentication

    Hi, Its possible to have a SSO in a EPM System based in reusing windows authenticated user to avoid having to refill user credentials in a EPM System? (We are using Java embedded container as app server) Thanks