Financial Statement SQL Queries

I'm trying to build our financial statements in Crystal Reports, and I'd rather not have to build the logic from scratch.  Where is the code stored in B1 that runs the balance sheet and income statements?  I'd like to use that as my base SQL for Crystal Reports.

Derek,
The queries that are used for these reports are either embedded in to a Protected Stored Procedure or is part of the Core SAP code.  Accessing them directly would not be possible.
The option available to you has been explained by Peter.
Let me know if you have further questions
Suda

Similar Messages

  • ? in SQL Queries and not using prepared statements

    Using EclipseLink 1.1.1
    Prepared Statements are disabled
    In our production server something went wrong and one of our Read Queries started erroring. A DatabaseException was thrown and we log the "getQuery.getSQLString()" statement. We found this query in the logs:
    SELECT t1.ID, t1.NAME, t1.DESCRIPTION, t1.EXTREFID, t1.STYLESHEET, t1.DDSVNVERSION, t1.FIRSTNAME, t1.LASTNAME, t1.EMAILADDR, t1.PHONENUMBER, t1.ADDRESS, t1.ADDRESS2, t1.CITY, t1.STATE, t1.POSTALCODE, t1.COUNTRY, t1.ADMINACCTNAME, t1.HASDOCUMENTS, t1.HASTIMEDNOTIFICATIONS, t1.STATUS, t1.ENTRYDATE, t1.EVALEXPDATE, t1.LASTREMINDDATE, t1.FULLUSERS, t1.LIMUSERS, t1.REQUSERS, t1.ISENTERPRISE, t1.EXPDATE, t1.ISDISABLED, t1.DISABLEDDATE, t1.NEEDLICENSEAGREEMENT, t1.ISWARNINGDISABLED, t1.LOCALE, t1.TIMEZONE, t1.CURRENCY, t1.DOMAIN, t1.DOCUMENTSIZE, t1.EXTRADOCUMENTSTORAGE, t1.ONDEMANDOPTIONS, t1.SSOTYPE, t1.RESELLERID, t1.ACCOUNTREPID, t1.LASTUSAGEREPORTDATE, t1.NEXTUSAGEREPORTDATE, t1.USAGEREPORTATTEMPTS FROM T_SSOOPTIONS t0, T_CUSTOMERS t1 WHERE *((((t0.SSOENABLED = ?) AND (t1.SSOTYPE IN (?, ?))) AND (UPPER(t1.DOMAIN) = ?)) AND (t0.CUSTOMERID = t1.ID))*
    Notice the values weren't entered into the where clause. We had to bounce the application to fix the problem. I've never seen this before. I've added more debugging statements to the code - so if this happens again in the future I'll have more information to report on. In the mean time I'm wondering if anyone else has every seen a problem of this nature.

    Database error due to invalid SQL statement.
    I don't have a stack, we were catching the exception and not printing the stack :(
    Like I mentioned in my first post, I added more debugging code (e.printStackTrace()). I understand this is hard to track down without more information. I was just hoping you guys had seen something like this before and had any insight. Like I mentioned before: this is on our production server. I've never seen this type of error before. That particular server (we run in a cluster mode) had been up for several days and then started generating that error. IT bounced the node and everything went back to normal. We have been using toplink for about 5 years now and have never seen this problem, until August 3rd 2009. The only thing that has changed recently is our migration from toplink 10 to EclipseLink. I was wondering if anyone knows if anything had changed in EclipseLink/toplink 11 with the generation of SQL queries.
    I'll keep looking. There is more debugging code in there now. Since the error was "Database error due to invalid SQL statement" this implies the SQL was generated, exited that part of the code and was sent to the db where it failed. I'm afraid the printStackTrace won't help if this error happens again.

  • Need help in SQL Queries using GUI controls or variables

    Hello, all
    I have a big problem (I have already had with Visual Basic a few mounths ago) with Java while writing my SQL Queries.
    I would like to know how I must do to use variable data or GUI control data in my SQL Query to select only some records.
    Here, my first Query that works without any problem (no WHERE clause !!!) :
    Statement requeteBedes = connectBedes.createStatement();
    ResultSet resultatSeries = requeteBedes.executeQuery("SELECT * FROM Series");
    initComboBoxSeries(resultatSeries);the method "initComboBoxSeries" fills a JComboBox with all the names of the series in my database.
    Here comes my problem.I would like to use the value of the selected "series" in the JComboBox to search in another table of the same Database. I made another statement but it returns a Null ResultSet :
    ResultSet resultatSearchAlbumsFromSeries = requeteBedes.executeQuery("SELECT * FROM bandes_dess WHERE  ser_nom = '" + strComboBoxSeriesSelected + "' "); The variable strComboBoxSeriesSelected contains the value of the selected line in the combobox with all the series, filled after the first query that is here above and that works very well.
    Could some one help me and tell me how I must use variables or GUI controls values in my SQL Queries or tell me if there is a place where I could find an explanation of that kind of problems (like more "advanced SQL Queries", as the ones currently used in all the Learning Java 2 books)
    Thank you all for your help.
    Christian.

    executeQuery() will never return null. At least that's what the spec says. You are probably catching an exception (probably a syntax error caused by a single quote in strComboBoxSeriesSelected) and ignoring it. Or do you mean the ResultSet contains no rows?
    Anyway, to use parameterized queries, take a look at PreparedStatements. Your code should look like this using PreparedStatement:Statement requeteBedes = connectBedes.prepareStatement("SELECT * FROM bandes_dess WHERE  ser_nom = ?");
    requeteBedes.setString(1, strComboBoxSeriesSelected);
    ResultSet resultatSeries = requeteBedes.executeQuery();Alin.

  • Runtime Error while creating FINANCIAL STATEMENT VERSION

    Hi Experts,
    The major concern of the problem is related with the new creation of FINANCIAL STATEMENT VERSION.
    (SPRO --> IMG --> Financial Accounting --> General Ledger Accounting --> Business Transactinons --> Closing > Document> Define Financial Statement Versions.)
    My quries is that is it possiable to maintain more then one FSV for the same company code or for same chart of account.
    If yes then we are trying to do it . But the problem reflect, be the indication that we can`t maintain more then one code.
    Its giving an runtime error
    Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC                                               
    Except.                CX_SY_OPEN_SQL_DB                                                        
    Date and Time          15.03.2008 18:36:04                                                                               
    Short text                                                                               
    The ABAP/4 Open SQL array insert results in duplicate database records.                                                                               
    What happened?                                                                               
    Error in the ABAP Application Program                                                                               
    The current ABAP program "SAPLFAGL_FSV" had to be terminated because it has                
         come across a statement that unfortunately cannot be executed.                                                                               
    Error analysis                                                                               
    An exception occurred that is explained in detail below.                                   
         The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught              
          in                                                                               
    procedure "FSV_TEXTS_CONVERT" "(FORM)", nor was it propagated by a RAISING                 
          clause.                                                                               
    Since the caller of the procedure could not have anticipated that the                      
         exception would occur, the current program is terminated.                                  
         The reason for the exception is:                                                           
         If you use an ABAP/4 Open SQL array insert to insert a record in                           
         the database and that record already exists with the same key,                             
         this results in a termination.                                                                               
    (With an ABAP/4 Open SQL single record insert in the same error                            
         situation, processing does not terminate, but SY-SUBRC is set to 4.)                       
    We are trying Its giving an abap dump
    Rest the technicall aspect that is comming in ABAP Dump i am not
    getting.....so pls inquire according to yourself.
    Kind Regards,
    Sudhanshu

    Hello
    Logically speaking, a company code can have more than one FSV as long as they share the same chart of accounts.
    When COA is common, the FSV pattern can be designed seperatly to serve the purpose of varied reporting.
    The dump you are getting is a temporary snag. Take a screen shot from SM54 after you execute the report and pass it to BASIS for analysis. They would fix that.
    Reg
    assign points if useful

  • Financial statement version in gl accounting

    hello all,
    What is a financial statement version in G/l accounting. How do we replicate it on BW side. I am trying to do reports like cash flow, net assets, and the functional consultant provided me with information saying that you will get financial statement version so we do we use that.
    Are there any particular tips that someone can provide to develop queries for there reports?
    Thanks in advance

    Have loaded hierarchy of FSV from R/3 to BW. Hierarchy is getting displayed in 0GL_ACCOUNT. There is a second level node called Net Profit / Loss, where there is no child node. But when we run the query then some value comes corresponding to that node also under 0COA/0PLRESULT (which is some sort of a calculation or net off happening & value gets correspond to this node).
    Now this value is getting displayed, similarly here is a node getting displayed under Source of Funds node, called Share holders Funds, now a child node of this is P & L Profit which is similar to the earlier blank node i.e. without any child node. In R/3 side this corresponds to
    0COBSPLRESULT. But this is not getting displayed in the query. That particular node itself is not appearing in the query. In the query instead of appearing under the respective node this value is appearing under unassigned nodes.
    What checks can be made to bring the value in query corresponding to the hierarchy how it is in hierarchy screen ??

  • SQL queries parser.

    Hello,
    I have quite strange question related to my research.
    Probabley within Oracle DB there is some dynamic library which is parsing SQL queries,
    for example.
    SELECT * FROM schema.table which is able to extract informations from SQL listed above that we want to display all columns from selected table.
    When this construction is valid ( SQL standard ) the next step is verification the object existence in DB. It means
    that there are two separated actions which are analyzing queries.
    I need only first part of that process, which will give me informations about all object used in SQL query
    is it possible to accomodate that internal parser witin stand alone middleware like Weblogic Event Server ?
    I can do it with regular expression patters, but it's not going to be fast and effective for subqueries and all advanced
    constructions for DHW like MODEL, etc.
    Thank You,
    R.

    >
    http://search.cpan.org/~rehsack/SQL-Statement-1.23/lib/SQL/Statement.pm
    BUGS AND LIMITATIONS ^
    * currently we treat NULL and '' as the same - eventually fix
    * No nested C-style comments allowed as SQL99 says
    >
    That's the reason why I want to use dedicated for 11g EE library ;-)
    Thanks for quick reply

  • SQL queries in JSP

    Does anyone know how to create a JSP which allows the user to input data into a simple database and then allow the user to input SQL queries? I can do this in a servlet but must hard code the query. It would be great to be able to type in differnet queries to see the results.
    Thanks
    Michael

    hai,
    I am giving u a small example which allows user to enter data in the html page and the same is submitted by the Jsp page in the database.
    <%@ page language="java" import="java.sql.*" %>
    <html>
    <body bgcolor="#FFd08d" >
    <%!     Connection conn;
         Statement st,st1;
         ResultSet rs,rs1;
         int i,j;
    %>
    <%     
         try{
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              conn=DriverManager.getConnection("jdbc:odbc:--DSNName--","--DataBaseUserName--","--DataBasePassword--");
         catch(Exception e)
    %>
         Error in Saving : <%=e%>
    <%
         try
         String email_address=request.getParameter("email_address");
         String query_text=request.getParameter("query_text");     
         PreparedStatement st=null;
         String inst="insert into databasename..DataBaseTableName(email_address,query_text) values (?,?)";
         st=conn.prepareStatement(inst);
         st.setString(1,email_address);
         st.setString(2,query_text);
         st.executeUpdate();
         conn.close();
    %>
    Your query is Submitted.<br>
    Thanks.
    <%
         catch(SQLException e)
    %>
    Error in Saving : <%=e%>
    <%
    %>          
    </body>
    </html>
    I think this will solve ur query.
    bye
    sameer

  • [DW 8.02 + PHP] how to use variables in advanced SQL queries

    Hi all,
    I can't find a way to use variables in an SQL query after
    updating
    dreamweaver 8.02.
    I always get error messages that says: 'missing variable
    type:myvariablename', undefined#myvariablename... and so on.
    What is the correct way to use variables?
    I usually set a variable in a PHP statement (example: <?
    $today=date('Y-m-d'); ?>)
    and then I compare this variable in the SQL query.
    What is the correct syntax for variable in DW 8.02 in
    advanced SQL
    queries?
    TIA
    tony

    sweetman wrote:
    > I'm editing a website created with DW 8.01 and MX
    Kollection.
    >
    > I updated DW to 8.02 and now I can't edit an existing
    SQL query.
    > I always get an error message 'Missing variable type'
    and I can't go
    > on.
    InterAKT released a new version of Kollection to cope with
    the 8.0.2
    changes. AFAIK, you should be able to download the updated
    version from
    your InterAKT account area.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to use database control to execute sql queries which change at run time

    Hi all,
    I need to execute sql queries using database controls , where the sql changes
    at run time
    based on some condition. For eg. based on the condition , I can add some where
    condition.
    Eg. sql = select id,name from emp where id = ?.
    based on some condition , I can add the following condition .
    and location = ?.
    Have anybody had this kind of situation.
    thanks,
    sathish

    From the perspective of the database control, you've got two options:
    1) use the sql: keyword to do parameter substitution. Your observation
    about {foo} style sbustitution is correct -- this is like using a
    PreparedStatement. To do substitution into the rest of the SQL
    statement, you can use the {sql: foo} substitution syntax which was
    undocumented in GA but is documented in SP2. Then, you can build up
    the filter clause String yourself in a JPF / JWS / etc and pass it into
    the DB control.
    For example:
    * @jc:sql statement="select * from product {sql: filter}"
    public Product[] getProducts(String filter) throws SQLException;
    This will substitute the String filter directly into the statement that
    is executed. The filter string could be null, "", "WHERE ID=12345", etc.
    2) you can use the DatabaseFilter object to build up a set of custom
    sorts and filters and pass that object into the DB control method.
    There have been other posts here about doing this, look for the subject
    "DatabaseFilter example".
    Hope that helps...
    Eddie
    Dan Hayes wrote:
    "Sathish Venkatesan" <[email protected]> wrote:
    Hi Maruthi,
    The parameter substituion , I guess is used like setting the values for
    prepared
    statements.
    What I'm trying to do , is change the sql at run time based on some condition.
    For example ,
    consider the following query :
    select col1,col2 from table t where t.col3 > 1
    At run time , based on some condition , I need to add one more and condition.
    i.e. select col1,col2 from table t where t.col3 > 1 and t.col4 < 10.
    This MAY not address your issue but if you are trying to add "optional" parameters
    you may try including ALL the possible parameters in the SQL but send in null
    for those params that you don't want to filter on in any particular case. Then,
    if you word your query
    as follows:
    select col1, col2 from table t where t.col3 > 1 and (t.col4 = {col4param} or
    {col4param} is null) and (t.col5 = {col5param} or {col5param} is null) ...
    you will get "dynamic" filters. In other words, col4 and col5 will only be
    filtered if you send in non-null parameters for those arguments.
    I have not tried this in a WL Workshop database control but I've used
    this strategy dozens of times in stored procedures or jdbc prepared statements.
    Good luck,
    Dan

  • Special Item Net Profit & Net Loss in Financial statement version

    I have two queries related to the financial statement version special items of Net Result Profit & Net Result Loss. The SAP help says that "The financial statement profit or loss is determined from only those accounts assigned to assets or liabilities".
    Does this mean that the difference of Assets & liabilities comes under either of these items or the amount is derived from the P&L result, please clarify. As per my understanding that we do not assign any accounts to these two nodes & the system determines the figure from assets & liabilities accounts.
    Secondly where do we assign the retained earning account, in the liabilities node or in the P&L node.
    Thanks

    Hello,
    For your first question, yes your understanding is correct. The difference of the items assigned to the Assets and Liabilities will come under the Net Result Profit or Net Result Loss, as the case may be.
    For your second question, the retained earnings should be assigned to the Liabilities node.
    Ideally, when you assign the retained earnings to the Liability node, the Net result Profit or Loss should become "zero" assuming that you had assigned all the GL accounts from your trial balance to the correct nodes in the Financial Statement Version.
    Regards,
    Mike

  • How to see what SQL queries are made to my Database Server?

    Hi all,
    I'm a newbie. I'd like to know if there's a way to find out what SQL queries are being made to my Database server at the server end.
    Is it possible that Oracle Database Manager logs this information (including the exact query/SQL)somewhere in its logs? How to enable such an option and/or view the recent SQL queries made ?
    Please enlighten me. Thanks in advance.
    Thanks and Regards
    Sharat

    "I checked the V$SQLTEXT view too. It has only 64 characters for SQL_TEXT field." Yes yes but you might have noticed that it also has the column called piece. The view shows the full SQL statement broken up into little pieces. Use ADDRESS and HASH_VALUE to link to v$sql. There is also a view V$SQLTEXT_WITH_NEWLINES that throws in some line separators to make it "easier" to read.
    Example below shows full text of SQL statements currently executing.
    SQL> column address noprint
    SQL> column hash_value noprint
    SQL> break on hash_value skip 1
    SQL> select
      2     a.address, a.hash_value, b.sql_text
      3  from
      4     v$sql a, v$sqltext b
      5  where
      6     a.users_executing > 0
      7     and b.address = a.address
      8     and b.hash_value = a.hash_value
      9  order by
    10     a.address, a.hash_value, b.piece ;
    SQL_TEXT
    select    a.address, a.hash_value, b.sql_text from    v$sql a, v
    $sqltext b where    a.users_executing > 0    and b.address = a.a
    ddress    and b.hash_value = a.hash_value order by    a.address,
    a.hash_value, b.piece
    begin quest_exec.get_message(:cmd, :peer, :owner, :folder, :scri
    pt, :delay); end;
    6 ligne(s) s&eacute;lectionn&eacute;e(s).
    SQL> select
      2     a.address, a.hash_value, b.sql_text
      3  from
      4     v$sql a, v$sqltext_with_newlines b
      5  where
      6     a.users_executing > 0
      7     and b.address = a.address
      8     and b.hash_value = a.hash_value
      9  order by
    10     a.address, a.hash_value, b.piece ;
    SQL_TEXT
    select
       a.address, a.hash_value, b.sql_text
    from
       v$sql a, v
    $sqltext_with_newlines b
    where
       a.users_executing > 0
       and b
    .address = a.address
       and b.hash_value = a.hash_value
    order by
       a.address, a.hash_value, b.piece
    begin quest_exec.get_message(:cmd, :peer, :owner, :folder, :scri
    pt, :delay); end;
    6 ligne(s) s&eacute;lectionn&eacute;e(s).

  • Monitoring Oracle SQL queries in VBA

    I currently use VBA with Excel to generate reports based on data within an Oracle 9 database. The amount of data is very large and the reports can take a long time to process. I have added status bar progress indicators for the majority of the report processing tasks to inform the user of what is going on.
    The problem is that I need to be able to monitor the progress of the main SQL queries since they take upwards of a few minutes to run each (mainly because I need to rank and order data). I currently use code similar to that shown below to query the database from VBA.
    Sub simpleVersion()
    Dim username As String
    Dim password As String
    Dim sid As String
    Dim objSession As Object
    Dim objdatabase As Object
    Dim OraDynaset As Object
    Dim strSQL As String
    username = "user"
    password = "pass"
    sid = "database"
    ' connect to database
    Set objSession = CreateObject("OracleInProcServer.XOraSession")
    Set objdatabase = objSession.OpenDatabase(sid, username & "/" & password, 0&)
    strSQL = "select latitude, longitude, otherdata from scatter where otherdata > 50 order by latitude, longitude"
    ' This command takes a long time to execute when doing ranks/order bys
    Set OraDynaset = objdatabase.DBCreateDynaset(strSQL, 0&)
    Do While OraDynaset.EOF = False
    'Process the data and put on a spreadsheet
    'Status bar messages can be used here without problems
    OraDynaset.MoveNext
    Loop
    Set OraDynaset = Nothing
    Set objSession = Nothing
    objdatabase.Close
    Set objdatabase = Nothing
    End Sub
    When the DBCreateDynaset command is executed VBA waits until the dynaset data is retrieved from oracle. I would like to be able to do something similar to the pseudo code below.
    Execute SQL to create dynaset
    Do while still obtaining dynaset
    Check v$session_longops - Indicate time taken / remaining on status bar
    Loop
    I have found that if you execute a large query without any tasks that require the whole dataset before they can begin (ranks, ordering etc) the dynaset is created almost instantly and excel does not freeze up.
    With non dynaset operations such as inserts it is possible to run the query in non blocking mode. I am able to monitor the progress of the query and indicate it to the user.
    Dim myStatement As OraSqlStmt
    Set myStatement = objdatabase.CreateSql(strSQL, ORASQL_NONBLK)
    Do While myStatement.NonBlockingState = ORASQL_STILL_EXECUTING
    DoEvents
    Select Case intSpinCount
    Case 1
    Application.StatusBar = "Please Wait. Calculating data /"
    Case 2
    Application.StatusBar = "Please Wait. Calculating data -"
    Case 3
    Application.StatusBar = "Please Wait. Calculating data \"
    Case 4
    Application.StatusBar = "Please Wait. Calculating data |"
    intSpinCount = 0
    End Select
    Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 1)
    intSpinCount = intSpinCount + 1
    Loop
    Non blocking mode is explained here. However dynasets are not supported.
    http://download-west.oracle.com/docs/cd/A91202_01/901_doc/win.901/a90173/o4o00022.htm
    I have tried using pl/sql to insert the data requested into a temporary table and then the normal select statement to get the data back out. However since the data stored in a table is not ordered it isn’t much help to me since I still have to do the order by command.
    Anyone got any ideas?
    All help is much appreciated.

    Dear taktang
    I'm a newbie. I'd be grateful if you would tell me where to find "oracle-base"
    thanks
    mik3

  • Maintaining SQL Queries in a separate text file

    Hi,
    I am working on web based project using Spring MVC framework and I am maintaining all SQL queries in a separate text file so that I can change them any time when needed. I just want to know am I doing right, it this a optmistict way of coding??

    >
    I am working on web based project using Spring MVC framework and I am maintaining all SQL queries in a separate text file so that I can change them any time when needed. I just want to know am I doing right, it this a optmistict way of coding??
    >
    The best place to store the queries, and HOW to store them depends on your architecture and on how your application is being used.
    Is this a single-user application on a user's pc? Or is your application located on an application server in the middle-tier?
    The queries should be stored where they will be used. Your queries should be stored in the tier where your application code will reside. On the client PC for a single-user app, on the application server for a 3-tier app and incorporated into stored procedures/functions/packages if part of a database app.
    If your application is totally external to the database (e.g. a reporting app) then it doesn't make sense for you to become part of the database architecture. An org isn't going to let you create objects in the database to store your queries when your queries are not part of the database application. That puts the burden on them to backup your objects, restore them for your and provide support to you and your application.
    What format to store the queries in is a different issue. A major criteria is the type of queries you are using and how they are used. Many apps that query the database cannot just use hard-coded queries that are never modified. Users need to be able to provide parameters (e.g. name, ID, state, etc) to select just the data that they want.
    That means the base query itself may not even be valid syntax but needs to have a WHERE clause added. Prepared statements and queries that use bind variables ('WHERE ID = ?') are typically used for these.
    One method of storage is to use Java property files that use name=value pairs. Using property files makes it easy to use Java to find a query by name and load it for you. Then your code would have functionality to modify the query to provide the parameter 'bind' values and execute it.
    There are also frameworks available for handling database related functionality. There is no need for you to write your own libraries for this. I suggest you locate a suitable framework to use.

  • SQL Queries in Code V/s Stored Procedures

    Hi Friend,
    Can any one of you guide me with following..
    What is faster ? using SQL Queries in Java code or using Stored Procedures which are called from code?
    I understnd Stroed Procedures are faster and definitely it provides more maintainability.
    If any one can give me any links or resources which outlines pros and cons of using Stored Proc and SQL Queries embedded in Java than it would be a great help..
    If there are any articles which proves either of the above is a preferred way, that would also help..
    Appreciate the effort in advance !!
    Thanks
    Gurudatt

    Well one benefit of Stored Procs is that you "compile" it on the database whereas you might build your query on the fly in java... test coverage is important in order not to have such things as a typo in a column name....
    Still, if you change a table, you have to go through all the procedures in SQL and likely to do so in some of your business object... and trust me, that can be hell!
    It all depends on the use of the app...
    From my experience, Stored procedure are much faster than built-on-the-fly SQL (and quite faster than prepared statements depending on the JDBC driver, the re-use of connections etc...)....
    IMHO, you'd probably be wise to start of with prepared statements, and when the schema seems stable enough (ie unlikely to change), look for the slower queries and convert them to stroed procedures.
    If you don't have to support several databases and are tight on performance, you can even include some logic in your stored procedure (e.g. update several tables, based on various selects...etc...). The language is usually quite powerful, and that can save you the run-time of selecting, converting to object , process and update (i.e. several roud-trip between DB and app)...
    Tshcuss!
    Chris

  • Want to execute SQL Queries from Textfile

    I have a text file full of a bunch of sql queries, of the format:
    select something1, something2
    from someplace
    select something3, something4
    from someplace2
    select something5, something6
    from someplace3
    I want to execute these queries one at a time and then after each one executes, I will do something with the resultset. Question is, how do I pull each query from the text file one at a time and execute? I was doing this by using java.util.Scanner and java.lang.StringBuilder where I would scan one line at a time and then check to see if the line is empty, otherwise I append the line to the StringBuilder. If the line is empty, I process whatever is stored in the StringBuilder. The problem with doing this is that it does not preserve the newline from the text file, so I get queries that look like:
    "select something5, something6from someplace3"
    which of course are invalid. Does anyone know a better way to build SQL queries / statements from a text file? How do I get the newline or carriage return character?

    Just replace newline by space?

Maybe you are looking for

  • Wekk Cal app not showing up in notifications

    I have a very nice calendar app, "Week Calendar". One option is that you can place a badge on the homescreen icon showing the week number, day of week and so on. After iOS5 it was no longer possible to put such a badge on the icon. On the homepage of

  • Error while outbound processing

    Hi In WE19, when i enter control record details( sender and receiver port, partner etc ) and then when i click outbound processing button i am getting a warning saying that "IDOC saved successfully but it should not or cannot be sent". i am tring to

  • Faxing of PO`s

    OK so this is what i have SMTP is configured external FAX server is ready PO is Created In the Vendor details i have captured the vendors fax number So if i have created the PO and i am looking at it ....... what do i do from here how do i sent this

  • Asigning a name to a host without using hosts file

    Hi, we have developed a rich client application that connects to a websphere Appserver in order of using ejb. This app is intended to work in different places, connecting to a different Appserver in each place. When the service locator of our client

  • When i want download Firefox it won't find it. the system can not find a stock.

    I did a few clean ups but now Firefox can not be installed on my laptop anymore. When i download it it wont find it anymore on my system. Can you explain what it is. With respect Marien