Execute an sql command other than an select statement

hello,
is it possible to execute an sql-command other than a
select statement in a report ?
something like execute ... ?
i want ro execute a statement BEFORE the select ...
or is the one and only possible statement in a report
a "select ?"
greetings
Thorsten Lorenz

Hi ,
You can always use the Report triggers to execute any other SQL commands . If you need to execute them before the SELECT statement of you Data Model query , then You can use the Parameter Form triggers / before Report Trigger. Be sure to put in a commit statement as well, if the result of the Select statement you intend to do depends on these SQL commands.
Thanks
Oracle Reports Team.

Similar Messages

  • Executing a SQL Command in my bean class

    Hello everyone,
    I'm using JDeveloper 12.1.2.0.0.
    I have an interest in executing a query in my bean method. I've done some research and i still got a code but it can't find the method that the method requires so i tried to added the query in my AppModule and i've added my method as a data control but how can i access it and modify it in my bean method?
    The page with the code that doesn't find the method: http://jjzheng.blogspot.pt/2010/11/run-single-query-in-application-module.html
    Which gives me: "Method 'getDBTransaction' not found"
    The page that creates my method as a data control: http://amit-adf-work.blogspot.pt/2013/09/how-to-execute-sql-using-adf-application.html
    Is any of this the right way? How can i execute a SQL Command in my bean class?
    Regards,
    Frederico.

    This is the code I use
    // GET A METHOD FROM PAGEDEF AND EXECUTE IT
    // get the binding containe
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    // get an Action or MethodAction
    OperationBinding method = bindings.getOperationBinding("YourMethodAction");
    // if there are parameters to set...
    Map paramsMap = method.getParamsMap();
    paramsMap.put("param","value")  ;    
    // execute the method
    method.execute();
    List errors = method.getErrors();
    if (!errors.isEmpty())
       // handle errors here errors is a list of exceptions!
    // no error resume normal work
    Timo

  • How execute pl/sql command from Oracle ADF Business Components

    can't find examples for how execute pl/sql command from Oracle ADF Business Components and how call pl/sql package procedure from ADF Business Components.
    insert,update,delete rows in view object instance cache is good but if i must do some complex operations while insert,update,delete rows..it's more better for me to call
    pl/sql procedure from oracle db.Am i wrong ????

    Roman,
    this should be similar to how it worked in JDeveloper 9.0.3. hava a look at <JDev903 Home>\BC4J\samples\StoredProc for a code example.
    Frank

  • 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

  • Security context issue when executing a SQL command in SQLCMD

    Simplified core issue below:
    I have myscript.sql that has:
    SELECT name FROM Sys.Databases
    GO
    USE mydatabase
    GO
    EXEC mystoredprocedure 'myparameter'
    GO
    When I open cmd.exe and use:
    SQLCMD -S localhost\myinstance -i script.sql
    It executes fine.
    When I open cmd.exe in C# using the Process class and execute the same command I get the following error:
    name
    master
    tempdb
    model
    msdb
    mydatabase
    (5 rows affected)
    Msg 916, Level 14, State 1, Server localhost\myinstance, Line 1
    The server principal "NT AUTHORITY\SYSTEM" is not able to access the database "mydatabase" under the current security context.
    Msg 2812, Level 16, State 62, Server localhost\myinstance, Line 1
    Could not find stored procedure 'mystoredprocedure'.
    And now the detailed explaination:
    I created an MSI which installs my custom application.
    During the bootstrap process, SQL Server 2012 Express is installed using the following parameters:
    /INSTANCEID="SQLEXPRESS"
    /ACTION="Install"
    /FEATURES=SQLEngine,Replication
    /HELP="False"
    /INDICATEPROGRESS="False"
    /Q="True"
    /QS="False"
    /ROLE="AllFeatures_WithDefaults"
    /ENU="True"
    /ERRORREPORTING="False"
    /SQMREPORTING=0
    /INSTANCENAME="SQLEXPRESS"
    /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
    /AGTSVCSTARTUPTYPE="Disabled"
    /ISSVCSTARTUPTYPE="Automatic"
    /ISSVCACCOUNT="NT AUTHORITY\NetworkService"
    /ASSVCSTARTUPTYPE="Automatic"
    /ASCOLLATION="Latin1_General_CI_AS"
    /ASDATADIR="Data"
    /ASBACKUPDIR="Backup"
    /ASTEMPDIR="Temp"
    /ASCONFIGDIR="Config"
    /ASPROVIDERMSOLAP="1"
    /SQLSVCSTARTUPTYPE="Automatic"
    /FILESTREAMLEVEL="0"
    /ENABLERANU="True"
    /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
    /SQLSVCACCOUNT="NT Authority\Network Service"
    /SECURITYMODE="SQL"
    /ADDCURRENTUSERASSQLADMIN="True"
    /RSSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
    /RSSVCSTARTUPTYPE="Automatic"
    /RSINSTALLMODE="FilesOnlyMode"
    /HIDECONSOLE
    /IACCEPTSQLSERVERLICENSETERMS
    /SAPWD="***************"
    The MSI then executes an Installer class DLL written in C# which restores a database to the SqlExpress instance.
    When the restore is completed, the Installer class then uses the Process class to launch CMD.exe and execute the SQL script using SQLCMD.
    Process vProcess = new Process();
    ProcessStartInfo vStartInfo = new ProcessStartInfo("cmd.exe");
    vStartInfo.Arguments = "/c set path=%path%;" + Context.Parameters["TargetDir"] + "\\; && sqlcmd -S LocalHost\\myinstance -i myscript.sql";
    vProcess.StartInfo = vStartInfo;
    vProcess.Start();
    vProcess.WaitForExit(30000);
    This is where I get the error mentioned above.
    However if I execute the same command manually by opening CMD.exe from the RUN command, it executes perfectly.
    I can not use -U or -P to supply a user / password, I MUST use integrated security.
    Additional info:
    Previously SQL Server 2008 Express has been in use for the bootstrapper, and this issue did not occur.
    The database the MSI restores is also built from SQL Server 2008. (Will be built from 2012 in the future.)
    Installation is performed on an account with administrative rights.
    Running the installer AS Administrator does not fix the issue.
    Any help would be greatly appreciated, as well please let me know if additional info is required.
    Thank you

    I'm having a similar issue where I'm using a batch file to execute commands to a group of servers. I can use the batch commands when updating MyDatabase but get the security context error when I try to update MyDatabase with a join to TheirDatabase except
    on servers where I am sysadmin.   Like I said, I can update MyDatabase as long as I don't join to TheirDatabase.
    Update A
    Set A.CCMCoderStaffSID = IsNull(B.StaffSID, -1)
    From MyDatabase.[R_Encounter].[VejdPfcsLinkageDataF19610x5] A
    Left Join ThierDatabase.Staff.Staff B on
    A.Sta3n = B.Sta3n and A.[CCMCoderF200IEN]= B.StaffIEN
    Error:
    Msg 916, Level 14, State 1, Server R04PHIDWH58, Line 1
    The server principal "MyDomain\ME" is not able to access the database "TheirDatabase" under the current security context.
    Line from batch:
    sqlcmd -S Server54 -d MyDatabase -i D:\ETLDevelopment\R04\Me\querytools\%RAWTablesScript%  -o D:\ETLDevelopment\R04\Me\UpdateSIDV1.txt

  • Is there a way to execute the SQL command in PLSQL block

    Hi all
    With reference to the above subject do you have any example.
    Thanks in advance.

    What sort of SQL command do you have in mind? DML can easily be wrapped in PL/SQL blocks. DDL requires the use of dynamic SQL such as EXECUTE IMMEDIATE.
    Cheers, APC

  • Execute a sql command in a DOS batch file

    hi
    can anyone help let me know if there is any way to
    achieve this objective.
    objective is as below
    There will be a batch file run from a DOS prompt
    This will generate a CSV file for a SQL query
    and dump it on the local machine.
    thanks and regards
    Ashish

    hi Ashish,
    try using this
    at the command prompt:
    sqlplus username/password@connect_string @scriptfile
    and the contents of the scriptfile should be
    spool file.csv
    sql select statement;
    spool off
    exit
    HTH
    Naveen

  • Executing a sql command from a menu item

    I am working on a forms migration from 4.5 to 10g.
    On 4.5, if I execute a sql using a sqlplus -s command, from a menu item, a window is opened showing the execution messages, if there were errors and it's details.
    It doens´t happen on 10g anymore. Is there any chance I can keep on 10g this functionality that used to work on 4.5 ??
    The procedure I use to execute the sql is:
    Menu item code:
    plus('sql_ name',null);
    Procedure:
    procedure plus(
    program in VARCHAR2, /* sql name*/
    parameters in VARCHAR2 /* aditional parameters */
    ) is
    V_USERNAME varchar2(100);
    V_PASSWORD varchar2(100);
    V_DATABASE varchar2(100);
    str varchar2(300);
    begin
    V_USERNAME := GET_APPLICATION_PROPERTY(USERNAME);
    V_PASSWORD := GET_APPLICATION_PROPERTY(PASSWORD);
    V_DATABASE := GET_APPLICATION_PROPERTY(CONNECT_STRING);
    str := V_USERNAME||'/'||V_PASSWORD||'@'||V_DATABASE;
    HOST ('sqlplus -s '||''''||str||''''||' @$PATH/'||program||' '||parameters);
    end;
    Tks a lot,

    Hello,
    With C/S versions, the Host() command execute on the machine that runs the Forms runtime, that is the client machine.
    With Web versions, Host() is also executed on the machine that runs the Forms runtime, that, this time is the application Server.
    Use the Client_Host() Webutil equivalent.
    Francois

  • Output in different order than in select statement.

    I'm executing the following query. Just wondering if I'm missing something:
    select a.constraint_name, a.table_name, a.r_constraint_name, b.column_name, c.table_name, c.column_name from user_constraints a
    inner join user_cons_columns b on (a.table_name=b.table_name and a.constraint_name=b.constraint_name)
    inner join user_ind_columns c on (a.r_constraint_name=c.index_name)
    where a.r_constraint_name='QUE_PK' and b.position=c.column_position
    order by b.position
    (replace QUE_PK with your own primary key referenced in a foreign key)
    The columns appearing in the resultset are in different order than in the select statement.
    They came as follows: constraint_name, r_constraint_name, table_name, table_name, column_name, column_name. If I aliase one of the column, the result set is ok.
    I'm using version 1.1.0.23 on Ubuntu 6.10 against a 10g r2.

    To double check, you can go to <sqldeveloper>/system/oracle.sqldeveloper.1.1.0 (this may be <user_dir>/system/oracle.sqldeveloper.1.1.0 on your computer) and delete all of the *TableSettings.xml files. That will erase any custom column orders that you may have saved.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • In Oracle SQL, cannot use column in select statement and order by

    Hi,
    Is there a work around for this.
    Thanks in advance
    Pablo.

    Hi,
    943981 wrote:
    Hi All,
    This is the error I get:
    ORA-00960: ambiguous column naming in select list
    00960. 00000 - "ambiguous column naming in select list"
    *Cause:    A column name in the order-by list matches more than one select
    list columns.
    *Action:   Remove duplicate column naming in select list.
    Error at Line: 6 Column: 17That error message looks pretty clear to me. What don't you understand?
    Either
    (a) use aliases, so each column has a unique name, or
    (b) remove duplicate columns from the SELECT clause.
    Post your query. It's hard to say exactly what you're doing wrong when we don't know exactly what you're doing.
    For best results, post a complete test script (including CREATE TABLE and INSERT statements, if necessary) that people can to re-create the problem and test their ideas.
    See the forum FAQ {message:id=9360002}

  • Executing PL/SQL Commands.. Oracle API newbie

    Hi,
    I am using Oracle 10G and am calling stored procedures from my code written in C#.
    Currently I am getting the following error when the stored procedure is called:
    ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SP_COURSE_GET' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
    .. from a recent thread someone was able to point me in the right direction and suggest that the error was in the way I was calling the stored procedure
    Now that I have resolved the previous issue, I need to be able to add the additional two lines (lines 1 & 3) to my code so that the table is returned after executing the stored procedure
    var vrct refcursor // line 1
    exec sp_course_get(501,:vrct)
    print vrct // line 3
    My code currently looks like
    cmd.Connection = conn;
                        cmd.CommandText = sStoredProc;
                        cmd.CommandType = CommandType.StoredProcedure;
                        // add the parameters
                        int iNumParams = 0;
                        if (null!= arParams)
                             iNumParams = arParams.Length / 2; // divide by 2 b/c length is total # of items, not the # of rows
                             for (int i=0; i<iNumParams; i++)
                                       cmd.Parameters.Add(new OracleParameter(arParams[i,0].ToString(), arParams[i,1]));
                        // add the output param
                        OracleParameter output = null;
                        if (OracleType.Int32 == oType)
                             output = cmd.Parameters.Add(new OracleParameter(sOutputName, oType));
                        else
                             output = cmd.Parameters.Add(new OracleParameter(sOutputName, oType, size));
                        output.Direction = ParameterDirection.Output;
                        cmd.ExecuteNonQuery();
    Can an expert advise the best way for me to send the declaration of the cursor variable and the print command for the cursor to the database. At the moment I am just calling the stored procedure. Thank you in advance for your help
    Cheers

    > Does that look right or is there any easier way to pass the 3 lines thru to
    the database
    ie 1 var vrct refcursor
    2 exec sp_course_get(501,:vrct)
    3 print vrct
    The VRCT output variable needs to be a client cursor in the client language you're using. Simply put - when you define a variable in C/C++/C# and pass that to Oracle via a PL/SQL call, that variable has to match the data type that PL/SQL expects. And vice verse.
    Line 1 above:
    var vrct refcursor]
    ..is exactly that. The client "language" is SQL*Plus. A client variable is defined in the language. It is a client cursor (aka reference cursor). The output from PL/SQL (a reference cursor) can now be stored in the client variable. This client variable can now be used by the client to fetch rows from the cursor and display them - which is what the above SQL*Plus PRINT command does.
    Okay, so in .NET (which I assume you're using) you need to use the correct variables/parameters to set your local client variable equal to the output from PL/SQL ref cursor.
    [url http://download-east.oracle.com/docs/cd/B19306_01/win.102/b14307/featRefCursor.htm]Oracle® Data Provider for .NET Developer's Guide lists the following example:
    The following example demonstrate passing a REF CURSOR:
    connect scott/tiger@oracle
    create table test (col1 number);
    insert into test(col1) values (1);
    commit;
    create or replace package testPkg as type empCur is REF Cursor;
    end testPkg;
    create or replace procedure testSP(param1 IN testPkg.empCur, param2 OUT NUMBER)
    as
    begin
    FETCH param1 into param2;
    end;
    // C#
    using System;
    using Oracle.DataAccess.Client;
    using System.Data;
    class InRefCursorParameterSample
      static void Main()
        OracleConnection conn = new OracleConnection
          ("User Id=scott; Password=tiger; Data Source=oracle");
        conn.Open(); // Open the connection to the database
        // Command text for getting the REF Cursor as OUT parameter
        String cmdTxt1 = "begin open :1 for select col1 from test; end;";
        // Command text to pass the REF Cursor as IN parameter
        String cmdTxt2 = "begin testSP (:1, :2); end;";
        // Create the command object for executing cmdTxt1 and cmdTxt2
        OracleCommand cmd = new OracleCommand(cmdTxt1, conn);
        // Bind the Ref cursor to the PL/SQL stored procedure
        OracleParameter outRefPrm = cmd.Parameters.Add("outRefPrm",
          OracleDbType.RefCursor, DBNull.Value, ParameterDirection.Output);
        cmd.ExecuteNonQuery(); // Execute the anonymous PL/SQL block
        // Reset the command object to execute another anonymous PL/SQL block
        cmd.Parameters.Clear();
        cmd.CommandText = cmdTxt2;
        // REF Cursor obtained from previous execution is passed to this
        // procedure as IN parameter
        OracleParameter inRefPrm = cmd.Parameters.Add("inRefPrm",
          OracleDbType.RefCursor, outRefPrm.Value, ParameterDirection.Input);
        // Bind another Number parameter to get the REF Cursor column value
        OracleParameter outNumPrm = cmd.Parameters.Add("outNumPrm",
          OracleDbType.Int32, DBNull.Value, ParameterDirection.Output);
        cmd.ExecuteNonQuery(); //Execute the stored procedure
        // Display the out parameter value
        Console.WriteLine("out parameter is: " + outNumPrm.Value.ToString());
    }[url http://msdn2.microsoft.com/en-us/library/system.data.oracleclient.oracledatareader(vs.80).aspx]Microsoft Visual Studio 2005/.NET Framework 2.0 also shows some examples.
    Which kinds of beg the question why did you not refer to the appropriate OracleDataReader documentation up front? It would seem that these manuals cover interaction with Oracle pretty well, and includes sample code.

  • Cannot edit text or any command other than print in Adobe Acrobat 9.0.1 Pro. Receive error message

    I just installed adobe acrobat 9.0.1 Pro and it opens up pdfs and prints fine but when I try to edit text or enter any other command I get an error and it gives the option of cancel to debug or to exit program.
    Error message:
    The instruction at “0x2b806327” referenced memory at “0x00000348”. The memory could not be “read”.
    Click on ok to terminate the program
    Click on CANCEL to debug the program
    At first it stated that it did not recognize the font but when I looked it up under file, properties, fonts. The font was helvetica (embedded subset) for all the fonts on the pdf file. I have also checked the sercurity tab as well and there is no security on the file.
    When I choose cancel to debug it just terminates the program. When I choose ok it terminates the program.
    Please help.

    Maybe your installation is currupt (scratched CD)
         Reinstall on another maschine (and clean CD) to validate this case.
    Update your Acrobat, maybe the corresponding files are replaced or the error is fixed.

  • Pl/sql function body returning SQL query - if with in select statement

    hello all,
    I have a condition where when summary field is checked alone we have show that column for the users in the report. Is IF statement possible for this case ? I have given the code below.. is it possible to write something like below or is there any other way to do it ?
    v_sql := 'select TBLCASES.INVESTIGATOR as INVESTIGATOR,';
    v_sql := v_sql ||' TBLCASES.CASENUMBER as CASENUMBER,';
    v_sql := v_sql ||' TBLCASES.OPENDATE as OPENDATE,';
    v_sql := v_sql ||' TBLCASES.ESTCOMPLETE as TARGETDATE,';
    v_sql := v_sql ||' TBLCASES.STATUS as STATUS,';
    v_sql := v_sql ||' TBLCASES.CASECODE as CASECODE,';
    v_sql := V_sql ||' TBLCASES.FAIR_HOTLINE as FAIRHotline,';
    v_sql := v_sql ||' TBLCASES.NYSIG as NYSIGCase,';
    v_sql := v_sql ||' TBLCASES.REGION as Region,';
    IF :P44_INCLUDE_SUMMARY_FIELD is not null THEN
    v_sql := v_sql||' TBLCASES.SUMMARY as SUMMARY,';
    END IF ;
    v_sql := v_sql ||' TBLCASES.PROGAREA as PROGArea ';
    v_sql := v_sql ||' from TBLCASES where 1=1';
    ..\

    Hi Lucy,
    You are adding and removing a column from a report so it may help to have the extra on the end of the query.
    Do you get an error? If so paste it in...
    BUT - this I would put a condition on the column where ':P44_INCLUDE_SUMMARY_FIELD is not null '
    Under he report's "Column Attributes" Select the column edit icon and it has a "Condition" breadcrumb.
    Select "Value of Item in Expression 1 is Not Null" and put P44_INCLUDE_SUMMARY_FIELD in Expression 1 text area.
    And I make it more readable like this when I do dynamic SQL:
    IF :P44_INCLUDE_SUMMARY_FIELD is not null THEN
    v_INCLUDE_SUMMARY_FIELD := ' TBLCASES.SUMMARY as SUMMARY ';
    END IF ;
    v_sql := 'select TBLCASES.INVESTIGATOR as INVESTIGATOR,
    TBLCASES.CASENUMBER as CASENUMBER,
    TBLCASES.OPENDATE as OPENDATE,
    TBLCASES.ESTCOMPLETE as TARGETDATE,
    TBLCASES.STATUS as STATUS,
    TBLCASES.CASECODE as CASECODE,
    TBLCASES.FAIR_HOTLINE as FAIRHotline,
    TBLCASES.NYSIG as NYSIGCase,
    TBLCASES.REGION as Region,
    TBLCASES.PROGAREA as PROGArea,'||
    v_INCLUDE_SUMMARY_FIELD ||
    'from TBLCASES where 1=1; ';
    Hope it helps,
    BC

  • SQL- 2005 : User Input in select statement's where cond [Input Parameter]

    Hi All
    i am using SQL Server 2005 , i want to select the data based on the user input in where condition,
    but i am not sure what to give in where condition,can anyone have any idea on this
    SELECT [NO]
          ,[NAME]
          ,[PAGE_COUNT]
      FROM [DS].[DB].[tablename]
    where [NO]=???
    Regards
    Chaitanya.A

    HI
    public String getEmployeeName(String employeeNumber)
              // TODO : Implement
              String name = new String();
              String exception = new String();
              try
              InitialContext initialContext = new InitialContext();
              DataSource dataSource =(DataSource) initialContext.lookup("jdbc/XXXX");
              java.sql.Connection connection = dataSource.getConnection();
              PreparedStatement stmt =connection.prepareStatement("SELECT [NAME]FROM [XXX].[ASDF].[ABCD] where [NO]=?");
              stmt.setString(1,employeeNumber);
              ResultSet result = stmt.executeQuery();
              while (result.next())
                   name = result.getString("Name");
                   connection.close();
                   return name;
              catch (Exception e)
                   exception = "Exception";
                   return exception;
    i used the above function to achieve my requirement
    Thanks
    Chaitanya.A

  • Other than my recent statement how can i find out what was purchased

    I am trying to find out on ITunes what was purchased.. How do I get this information

    Look at your purchase history.
    It is under your account in the itunes store

Maybe you are looking for

  • Accounting document not being generated from SD

    I have been trying to create billing documents from SD but I am getting this message that says that Accounting document can not be generated. Even when I release to accounting it just says no accounting document generated.

  • Basic authentication not working for portal application

    HI All, i have a portal application where I have a servlet. i want to use basic authentication for this servlet. to archive this i have followed http://docs.oracle.com/cd/E14571_01/web.1111/b31974/adding_security.htm and configured basic authenticati

  • Doubt about proxies implementation

    hi experts i have small doubt about proxies implementation 1. if we r implementing client proxies, it means sap r/3(proxy)->>xi->>>file      system.here where we have to execute the SPROXY  transaction. in sap r/3 or      in the xi server.and the nex

  • Html5 and css3 your thoughts please!

    Hi everyone As it is July the 4th, I though I would ask a question that is nothing to do with dreamweaver or coding problems. Two years ago I posted this thread - http://forums.adobe.com/thread/457240, on the subject of html5/css3, and most people th

  • NLS support in JPDK

    Hello world ! I've written some portlets in jsp and OC4J (iAS R2). When i try load jsp throught oc4j server i see russian, but when i load the same portlet (i.e. some jsp) in portal environment i see ???????. What is my problem ? tnx