Sql command Help from prompt

How to invoke the online sql command syntax help from the
sql prompt
Regards
RA

I think you have posted to the wrong forum
Business Intelligence Beans Product Management Team
Oracle Corporation

Similar Messages

  • Converting a SQL Command Parameter from Date to Char

    Hi,
    I'm using CR XI version 11.0.0.1282.  I've created a report using a SQL Command and have a parameter defined as Date.  I need to convert this Date parameter to a CHAR and have created my WHERE clause as:
    WHERE  "CC_PAYH"."PPOST"= CHAR ('{?From Date}') AND
    "CC_PAYH"."PPTYPE"<>13
    I get a message saying 2008 is not a valid token which in AS400 means it doesn't like the year.  Go figure. 
    I've tried running a similar query in AS400 and I get the desired affect.  I've tried removing the parameter from the Where clause and putting it into the Select like:
    CHAR ('{?From Date}') as MyTestDate
    just to see the representation I would get and I get the same error. 
    The question I have like everyone else is; is this possible with this version of Crystal?  I assume so since the same query will work in the database itself. 
    Thanks,
    Brian

    Hi Brain,
        Can you please try the query similar to the following syntax and verify whether it helps you!
    Select * from Orders where ([Order Date]) =
    CStr({?Date})
    Regards,
    Vinay

  • Sql command help

    Is there any sql statement to see all the data dictionary tables like
    all_tables,all_indexes,user_resource_limits,user_mview_logs,user_tab_privs etc
    thanks

    You can try
    select * from dict
    or
    select * from dictionary
    Thanks
    Manas

  • Validation Error - An error occured executing the provided SQL Command

    Hi All,
    I am new to using SQL Server in general (2008 R2) and am trying to change the source location for multiple packages in order to obtain our data from a more reliable environment.
    I have created a copy of the target database where the data will be loaded, amended the source and target connection managers and ran through the packages to ensure they work, which many do.
    We are changing the source from a local server to a cloud based server and when running a package that literally truncates target table, selects * from source, and inserts data to target I get a validation error "An error occurred executing the provided
    SQL Command "Select *...." The connection has been disabled" and "component ADO NET Source failed validation and returned validation status "VS_ISBROKEN"".
    The table structure from the 2 sources is the same and I have even recreated the data flow tasks to ensure the metadata has updated. When selecting 100 rows or even 5,000,000 rows from source the package runs fine but will fail as above
    when selecting &* (around 9.5 million rows).
    I'm not sure if this is due to the new data source being web based or if it could be some erroneous data in the table that isn't being selected when limiting to 5 milling rows etc.
    I have spend hours trying to figure out what the issue could be (doesn't help being new to SQL Server) so any guidance would be hugely appreciated!!!
    Thanks,
    Louis.

    Hi All,
    Unfortunately I don't believe any of the above are the issues.
    Our current working project/packages run via an SQL agent job daily. To test and ensure the package in question ran outside of the agent WITHOUT changing the ADO NET Source I exported the package (that runs daily) and ran it locally,
    to which it failed.
    I then edited the select statement from 'select * from [table]' to 'select top(100) from [table] to which it ran without error.
    So in summary:
    Package will run fine if run as part of the agent job (with multiple other packages)
    Package will not run from File System when selecting * from the source table
    Package will run from File System when selecting limited rows
    Could this be something to do with permissions? The errors I get are:
    An error occurred executing the provided SQL command: "select * from [table]". The connection has been disabled.
    "component" ADO NET Source"(396") failed validation and returned validation status "VS_ISBROKEN".
    Thanks,
    Louis.

  • Download Oracle SQL*Plus help related like word help

    Hello all
    I just wanna ask if where i can download Oracle SQL*Plus help related like word help.?
    ty

    <p>You can access SQL*Plus help from the command line in a SQL*Plus session by typing 'help index'. If you want more information than that, take a look at the SQL*Plus Quick Reference located <b>here</b> or the SQL*Plus User's Guide and Reference located <b>here</b>. These docs are all for Oracle 10g. Other version documentation can be found <b>here</b>.</p>
    Tom

  • Possible bug in SQL Commands – object required

    Hello,
    I tried to run the following in the SQL Commands:
    select * from emp
    where empno = (select MIN(empno)
                 from emp
                 where empno > :ITEM)If memory serve, it was suppose to open a pop up window, and allow me to enter a value for the bind variable. What I'm getting is a run time error about object required. Am I missing something?
    Thanks,
    Arie.

    Hi Dimitri,
    Yes, you are correct. It's strange though, because I don't remember such a behavior in the past, and also with this current browser configuration, I don't seems to have any problems with date pickers or help windows. I should probably look into it a bit deeper.
    Thanks,
    Arie.

  • How do i get a output in CSV of a SQL query executed via SQL Command prompt

    Hi All,
    I have a question with reference to SQL command prompt. I have a sql query which runs properly and gives proper execution in SQL Management console in GUI.
    This report is used to pull the free disk space report of our servers
    As i want to schedule it as a report so i want to script it to run via SQL command prompt. I made the script and it works fine if i enter it in SQL command prompt. When i try to extract the output to a CSV File it fails. Below is the details of the command
    i am using to query to pull the data. Can anyone help me in getting the output of this query in SQL command prompt.
    sqlcmd -W -s , -S Servers FQDN
    use operationsmanager
    Go
    Query:"select Path, InstanceName, SampleValue 
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled" -s "," -o "C:\DataSqlCmd.csv"
    Go
    When i enter the command without the quotes when the query is starting and ending and also without the output command (-s "," -o "C:\DataSqlCmd.csv") it is working and shows the output in the command prompt. Below is the screen shot for
    your reference.
    Due to security reasons i have to erase the server names:
    But when i add the line to extract the output ( -s "," -o "C:\DataSqlCmd.csv") It gives me this error:
    The exact command would be:
    sqlcmd -W -s , -S CINMLVSCOM01.e2klab.ge.com
    use operationsmanager
    Go
    "select Path, InstanceName, SampleValue 
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled" -s "," -o "C:\DataSqlCmd.csv" -h-1
    Go
    saying the syntax is not correct or some thing as per the below screenshot.
    Can any one please help. Below is just the query whi i use to get the output in SQL management studio.
    Can any one make a command for the below quer so i can directly execute and test for getting the output.
    select Path, InstanceName, SampleValue 
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled
    Gautam.75801

    Can you try the below query?
    select Path, InstanceName, SampleValue
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < 20 and CounterName like '% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled
    -- replace the below query part in the below SQLCMD C:\>SQLCMD -S SERVERNAME -E -d operationsmanager -Q "select * from sys.databases ds with (nolock) where name='master'" -s "," -o "F:\PowerSQL\MyData.csv" -h -1
    SQLCMD -S SERVERNAME -E -d OperationsManager -Q "select Path, InstanceName, SampleValue
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled" -s "," -o "c:\MyData.csv" -h -1
    Refer for the other ways 
    http://dba.stackexchange.com/questions/23566/writing-select-result-to-a-csv-file
    --Prashanth

  • Possible to change the datasource from a business-view to a Sql Command ?

    Hello,
    When a business view contains a lot of elements it takes a while just to open the report.
    We'd like to keep the BV as the dictionnary, but,
    once the report design completed,
    we'd like to disconnect the business view and replace it by the Sql command which can be seen in the menu option 'show SQL query'.
    Is it possible via the RAS sdk ?
    Did somebody experience this ?
    How to proceed ?
    Thanks a lot
    Alain

    Hi Ted,
    I'm thinking opening a Case for this problem of opening reports based on a big BV.
    We can't really reduce the BV, since it is the dictionnary and we need the whole thing...
    I'm wondering why it is impossible to change the Datasource if the tables and fields underneath are identical.
    Is it impossible to change the fields' mapping ?
    The other solution, as you suggest, is to create a report from scratch, create a new Datasource with the Sql command format, and rebuild the report... I agree it looks like a big job...
    Do you know if it is possible to export the report in XML for instance, change the XML, and then re-import ?
    Thanks for your Help.
    Alain

  • 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.

  • Query running on sql commands prompt not running on report region

    Hi All,
    Facing a weird issue now. I have written a report query which is running absolutely fine in sql command prompt but when i trying to run this as a report it is just processing and the report is not loading. What could be the reason behing this?
    Thanks in Advance
    Regards

    Hi,
    With no other information about the problem is hard to know what's happening. If you could at least provide us with the query then I think it would be easier for us to help you.
    Regards,
    Sergio

  • Read from sql task and send to data flow task - [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.

    I have created a execut sql task -
    In that, i have a created a 'empidvar' variable of string type and put sqlstatement = 'select distinct empid from emp'
    Resultset=resultname=0 and variablename=empidvar
    I have added data flow task of ole db type and I put this sql statement under sql command - exec emp_sp @empidvar=?
    I am getting an error.
    [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.
    [SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute phase and returned error code 0xC02092B4.

    shouldnt setting be Result
    Set=Full Resultset as your query returns a resultset? also i think variable to be mapped should be of object type.
    Then for data flow task also you need to put it inside a ForEachLoop based on ADO.NET recordset and map your earlier variable inside it so as to iterate for every value the sql task returns.
    Also if using SP in oledb source make sure you read this
    http://consultingblogs.emc.com/jamiethomson/archive/2006/12/20/SSIS_3A00_-Using-stored-procedures-inside-an-OLE-DB-Source-component.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to use lengthy query in a "SQL Command from Variable"

    My oracle SQL Query length is more than 14000 characters, so how can i use this for "SQL command from variable".
    Sarvan

    Either create a view or a table valued UDF. Using stored procedure in OLEDB source has some gotchas it will not pick up metadata information by default due to late binding.
    http://consultingblogs.emc.com/jamiethomson/archive/2006/12/20/SSIS_3A00_-Using-stored-procedures-inside-an-OLE-DB-Source-component.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Need help on Sql command for count

    Hi,
    I have the following table.
    Temp_Set Table
    ID Names Action
    1 John Delete
    2 John Add
    3 Mary Update
    4 Sim Add
    5 Sim Update
    How do I do a SELECT sql command for count(names) > 1 ?
    Please kindly advise me. Thank you very much.

    It doesnt work when I do this
    SELECT * FROM Temp_Set
    HAVING Count(names) > 1
    It prompts me the following error:
    ORA-00937: not a single-group group function
    00937.00000 - "not a single-group group function"
    *Cause:
    *Action:
    Error at Line:16 Column:7i am not sure but you can try this:
    SELECT B.* FROM
    (SELECT NAMES, COUNT(1) CNT FROM TEMP_SET GROUP BY NAMES) A, TEMP_SET B
    WHERE A.NAMES = B.NAME
    AND CNT > 1

  • Any One Can Help Me--error :-SQL command not properly ended

    hi,
    this code has an error i have tried to find out this error but i can't find it so please help me :-
    report error:
    ORA-06550: line 1, column 149:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    Code
    select HTMLDB_ITEM.HIDDEN(1,SEQ_ID),
    HTMLDB_ITEM.TEXT(2,a.c001) c001,
    HTMLDB_ITEM.TEXT(3,a.c002) c002,
    HTMLDB_ITEM.TEXT(4,a.c003) c003,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(5,a.c004,'SELECT P_ID D,P_ID R FROM PARTY_DETAIL') c004,
    APEX_ITEM.SELECT_LIST_FROM_QUERY
    (6,a.c005,
    'SELECT CATEGARY_NAME D,'||'CATEGARY_NAME R FROM ITEM_CATEGARY',
    'style="width:220px" '
    ||'onchange="get_select_list_xml1(this,'
    || 'f7_'
    || LPAD (seq_id, 4, '0')
    || ')"',
    'YES',
    '0',
    '-Select-',
    'f6_'|| LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c005,
    APEX_ITEM.SELECT_LIST_FROM_QUERY
    (7,a.c006,
    'SELECT ITEM_CODE D,'
    ||'ITEM_CODE R FROM ITEM_MASTER'
    ||'WHERE CATEGARY_NAME ='
    || c005,
    'style="width:220px"',
    'YES',
    '0',
    '-Select Code ('
    || (Select Count(*)
    from ITEM_MASTER
    where CATEGARY_NAME = c005)
    || ')-',
    'f7_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c006,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(8,a.c007,'SELECT ITEM_NAME D,ITEM_NAME R FROM ITEM_MASTER') c007,
    HTMLDB_ITEM.TEXT(9,a.c008) c008,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT PACK_TYPE D,PACK_TYPE R FROM ITEM_PACKING') c009,
    HTMLDB_ITEM.TEXT(11,a.c010) c010,
    HTMLDB_ITEM.TEXT(12,a.c011) c011,
    HTMLDB_ITEM.TEXT(13,a.c012) c012,
    HTMLDB_ITEM.TEXT(14,a.c013) c013
    FROM wwv_flow_collections a
    where a.collection_name = 'REC_ITEM'
    Thanks
    Manoj
    Edited by: Manoj Kaushik on Sep 10, 2009 3:36 AM

    hi mike,
    My problem is:-
    i have a bill with multiple item eg . Apple (12), Banana (49), Badam (145) , Grapes(25) with there quantity and now i want to Add these item with quantity in my database
    when i finaly click on submit button .
    Actully I have been used tabular form but i am facing one problem when using tabular form ,in Tabular form i enter first item eg . Apple and there quantity eg. 12 in textfield and after click on Add Row Buttom data insert in to the database . but i want Entry Shouldn't go in to the database. But only New Row Should Add there when i click on Add Row Button.
    I want all these 4 item should enter in to data base when i click on Final Submit.
    So i have use this collection report to insert multiple item .everything was all right when i was using text field but when i changed these textfield into select list then error has arise .
    Actually i want also a cascade selectlist in this report .
    eg .item name depend on item code and item code depend on item category name .
    so i want when i select CATEGARY_NAME then item code come into report item and when i select ietem code them correcponding item name should come into item name field.
    for cascade select list i have created application process and java script .
    So please mike Suggest me some solution how can i do this .
    its urgent for me .
    This Is my code :-
    select HTMLDB_ITEM.HIDDEN(1,SEQ_ID),
    APEX_ITEM.TEXT(2,a.c001) c001,
    APEX_ITEM.TEXT(3,a.c002) c002,
    APEX_ITEM.TEXT(4,a.c003) c003,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(5,a.c004,'SELECT P_ID D,P_ID R FROM PARTY_DETAIL') c004,
    APEX_ITEM.SELECT_LIST_FROM_QUERY
    (6,a.c005,
    'SELECT CATEGARY_NAME D,'||'CATEGARY_NAME R FROM ITEM_CATEGARY',
    'style="width:220px" '
    ||'onchange="get_select_list_xml1(this,''f7_'|| LPAD (seq_id, 4, '0')
    ||''')"',
    'YES',
    '0',
    '-Select-',
    'f6_'|| LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c005,
    APEX_ITEM.SELECT_LIST_FROM_QUERY
    (7,a.c006,
    'SELECT ITEM_CODE D,'
    ||'ITEM_CODE R FROM ITEM_MASTER'
    ||'WHERE CATEGARY_NAME ='
    || c005,
    'style="width:220px"',
    'YES',
    '0',
    '-Select Code ('
    || (Select Count(*)
    from ITEM_MASTER
    where CATEGARY_NAME = c005)
    || ')-',
    'f7_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c006,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(8,a.c007,'SELECT ITEM_NAME D,ITEM_NAME R FROM ITEM_MASTER') c007,
    APEX_ITEM.TEXT(9,a.c008) c008,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT PACK_TYPE D,PACK_TYPE R FROM ITEM_PACKING') c009,
    APEX_ITEM.TEXT(11,a.c010) c010,
    APEX_ITEM.TEXT(12,a.c011) c011,
    APEX_ITEM.TEXT(13,a.c012) c012,
    APEX_ITEM.TEXT(14,a.c013) c013
    FROM wwv_flow_collections a
    where a.collection_name = 'REC_ITEM'
    I am waiting for your positive responce.
    thanks
    Manoj
    Edited by: Manoj Kaushik on Sep 10, 2009 4:46 AM

  • Need Help in SQL command LIKE !

    Hi all,
    plz go through the following sql statement :
    select last_name
    from employees
    where last_name like '%a%e%' or last_name like '%e%a%';
    This gives an output where the last_name contains a or e in it.
    Now what would be the best solution to find the records in a table where last_name contains a,e,i,o,u (in anyorder). Do I need to write all the combinations ? Or is there any solution.
    Thanks,
    Sandeep

    Thnaks all for your help. However, the issue is not yet resolved.
    Ok let me more clear.
    Now consider a table called Employees which has a column called LAST_NAME.
    All the last_names in that column are of 10-20 letters. I want to findout the names
    which has the letters q,o,p,r,s (in anyorder).
    What would be the SQL statment ? From my point of view, I have to use LIKE keyword and use different combinations like '%q%0%p%r%s' or '%o%p%q%r%s' .,.....etc.
    Or do we have any other better solution ?
    Thnaks a lot for your solutions

Maybe you are looking for