What's the difference between "PreparedStatement" and "Statement"?

What's the difference between "PreparedStatement" and "Statement"?
Which is better??????

Read the docs for the two classes. The differences are apparent there.
Which one is better depends on your needs. I think that constructing and executing a PreparedStatement can be a bit less performant than just a Statement, if you're only executing the query one time. But I don't think that difference will normally be noticable in the context of a given application.
Additionally, if you have to pass any dates or strings to the query, you'll want PreparedStatement's parameters, rather than trying to format and escape things in the query string.

Similar Messages

  • What's the difference between jsp and jsf?

    who can tell me what's the difference between jsp and jsf?
    I'm puzzled when I found some of the technology in jsp is so similar to the ones in jsp( javaserver page)

    Hi,
    Find the difference between JSP and JSF
    1. A developer has more control with JSP, but (should) get easier development with JSF
    2. Event handling is done differently in JSP (HTTP) and JSF (Java)
    3. The UI is designed differently (or should be at least) with JSP (markup) and JSF (components).
    4. The end product should also be defined differently - JSP page versus a JSF application.
    Is this the only thing that is need to make a decision for either or? Probably not. There are other pieces that need to be taken in account when deciding which technology to use - tools support, enough components, type of application etc.... At this point there are not enough JSF components (although there are some interesting projects underway - Ajaxfaces, Myfaces, ADF Faces, and WebChart 3d) and enterprise tools support is still limited to a few tools vendor. Looking at our ADF Faces components they are currently available as early access (not production) and demands for these components are stacking up, literally, outside my office doorstep. Although I would love to make them production - now! - it is not a viable solution since we are still checking features and fixing critical bugs.
    All this combined - not enough enterprise level components in production, lacking tools support etc... - leave customers in a vacuum where the decision is either to continue with JSP, since it is mature and has a wide developer base, or move forward with JSF not sure if the support, or the developers will be there. This is particularly sensitive to customers that need to get started now and be production by summer.
    If you are in this vacuum here are some key points promoting JSF:
    1. Fundamental unit is the Component
    2. Built in event and state management
    3. Component sets can be provided by any vendor
    4. Closer to ASP.Net or Swing development
    5. Choice of UI technology
    6. Scale up (rich clients)
    7. Scale down (mobile devices)
    8. Built into J2EE containers in J2EE 5.0 (tentative)

  • What is the difference between pause and save in Hyper-V?

    hi,
    What is the difference between pause and save in Hyper-V?
    What are the benefits of using each function?
    Thanks

    WHen you save VM, Hyper-V saves VM state to disk and frees all memory and CPU resources used by VM. When you pause a VM, Hyper-V saves VM cpu state in memory, and then stops VM's cpu processes without releasing its memory. Since no disk operations are involved,
    pausing and resuming can be done much faster than saving and restoring a VM.
    Gleb.

  • What is the difference between tkprof and explainplan

    Hi,
    what is the difference between tkprof and explainplan.

    Execution Plans and the EXPLAIN PLAN Statement
    Before the database server can execute a SQL statement, Oracle must first parse the statement and develop an execution plan. The execution plan is a task list of sorts that decomposes a potentially complex SQL operation into a series of basic data access operations. For example, a query against the dept table might have an execution plan that consists of an index lookup on the deptno index, followed by a table access by ROWID.
    The EXPLAIN PLAN statement allows you to submit a SQL statement to Oracle and have the database prepare the execution plan for the statement without actually executing it. The execution plan is made available to you in the form of rows inserted into a special table called a plan table. You may query the rows in the plan table using ordinary SELECT statements in order to see the steps of the execution plan for the statement you explained. You may keep multiple execution plans in the plan table by assigning each a unique statement_id. Or you may choose to delete the rows from the plan table after you are finished looking at the execution plan. You can also roll back an EXPLAIN PLAN statement in order to remove the execution plan from the plan table.
    The EXPLAIN PLAN statement runs very quickly, even if the statement being explained is a query that might run for hours. This is because the statement is simply parsed and its execution plan saved into the plan table. The actual statement is never executed by EXPLAIN PLAN. Along these same lines, if the statement being explained includes bind variables, the variables never need to actually be bound. The values that would be bound are not relevant since the statement is not actually executed.
    You don’t need any special system privileges in order to use the EXPLAIN PLAN statement. However, you do need to have INSERT privileges on the plan table, and you must have sufficient privileges to execute the statement you are trying to explain. The one difference is that in order to explain a statement that involves views, you must have privileges on all of the tables that make up the view. If you don’t, you’ll get an “ORA-01039: insufficient privileges on underlying objects of the view” error.
    The columns that make up the plan table are as follows:
    Name Null? Type
    STATEMENT_ID VARCHAR2(30)
    TIMESTAMP DATE
    REMARKS VARCHAR2(80)
    OPERATION VARCHAR2(30)
    OPTIONS VARCHAR2(30)
    OBJECT_NODE VARCHAR2(128)
    OBJECT_OWNER VARCHAR2(30)
    OBJECT_NAME VARCHAR2(30)
    OBJECT_INSTANCE NUMBER(38)
    OBJECT_TYPE VARCHAR2(30)
    OPTIMIZER VARCHAR2(255)
    SEARCH_COLUMNS NUMBER
    ID NUMBER(38)
    PARENT_ID NUMBER(38)
    POSITION NUMBER(38)
    COST NUMBER(38)
    CARDINALITY NUMBER(38)
    BYTES NUMBER(38)
    OTHER_TAG VARCHAR2(255)
    PARTITION_START VARCHAR2(255)
    PARTITION_STOP VARCHAR2(255)
    PARTITION_ID NUMBER(38)
    OTHER LONG
    DISTRIBUTION VARCHAR2(30)
    There are other ways to view execution plans besides issuing the EXPLAIN PLAN statement and querying the plan table. SQL*Plus can automatically display an execution plan after each statement is executed. Also, there are many GUI tools available that allow you to click on a SQL statement in the shared pool and view its execution plan. In addition, TKPROF can optionally include execution plans in its reports as well.
    Trace Files and the TKPROF Utility
    TKPROF is a utility that you invoke at the operating system level in order to analyze SQL trace files and generate reports that present the trace information in a readable form. Although the details of how you invoke TKPROF vary from one platform to the next, Oracle Corporation provides TKPROF with all releases of the database and the basic functionality is the same on all platforms.
    The term trace file may be a bit confusing. More recent releases of the database offer a product called Oracle Trace Collection Services. Also, Net8 is capable of generating trace files. SQL trace files are entirely different. SQL trace is a facility that you enable or disable for individual database sessions or for the entire instance as a whole. When SQL trace is enabled for a database session, the Oracle server process handling that session writes detailed information about all database calls and operations to a trace file. Special database events may be set in order to cause Oracle to write even more specific information—such as the values of bind variables—into the trace file.
    SQL trace files are text files that, strictly speaking, are human readable. However, they are extremely verbose, repetitive, and cryptic. For example, if an application opens a cursor and fetches 1000 rows from the cursor one row at a time, there will be over 1000 separate entries in the trace file.
    TKPROF is a program that you invoke at the operating system command prompt in order to reformat the trace file into a format that is much easier to comprehend. Each SQL statement is displayed in the report, along with counts of how many times it was parsed, executed, and fetched. CPU time, elapsed time, logical reads, physical reads, and rows processed are also reported, along with information about recursion level and misses in the library cache. TKPROF can also optionally include the execution plan for each SQL statement in the report, along with counts of how many rows were processed at each step of the execution plan.
    The SQL statements can be listed in a TKPROF report in the order of how much resource they used, if desired. Also, recursive SQL statements issued by the SYS user to manage the data dictionary can be included or excluded, and TKPROF can write SQL statements from the traced session into a spool file.
    How EXPLAIN PLAN and TKPROF Aid in the Application Tuning Process
    EXPLAIN PLAN and TKPROF are valuable tools in the tuning process. Tuning at the application level typically yields the most dramatic results, and these two tools can help with the tuning in many different ways.
    EXPLAIN PLAN and TKPROF allow you to proactively tune an application while it is in development. It is relatively easy to enable SQL trace, run an application in a test environment, run TKPROF on the trace file, and review the output to determine if application or schema changes are called for. EXPLAIN PLAN is handy for evaluating individual SQL statements.
    By reviewing execution plans, you can also validate the scalability of an application. If the database operations are dependent upon full table scans of tables that could grow quite large, then there may be scalability problems ahead. On the other hand, if large tables are accessed via selective indexes, then scalability may not be a problem.
    EXPLAIN PLAN and TKPROF may also be used in an existing production environment in order to zero in on resource intensive operations and get insights into how the code may be optimized. TKPROF can further be used to quantify the resources required by specific database operations or application functions.
    EXPLAIN PLAN is also handy for estimating resource requirements in advance. Suppose you have an ad hoc reporting request against a very large database. Running queries through EXPLAIN PLAN will let you determine in advance if the queries are feasible or if they will be resource intensive and will take unacceptably long to run.

  • What is the difference between MOVE and WRITE TO ststement?

    Hi
    What is the difference between MOVE and WRITE TO ststement?
    When do we use both of them?
    Thank You

    Hi,
    <b>MOVE</b>
    Syntax
    MOVE source {TO|?TO} destination.
    destination {=|?=} source.
    Effect
    Both these statements assign the content of the operand source to the data object destination. The variants with the language element TO or the assignment operator = are valid for all assignments between operands that are not reference variables, and for assignments between reference variables for which the static type of source is more specific than or the same as the static type of destination(narrowing cast).
    Variants with the language element ?TO or the assignment operator ?= (casting operator ) must be used if the source and destination are reference variables and the static type of source is more general than the static type of destination (widening cast). For assignments between operands that are not reference variables, use of the question mark ? is not permitted.
    The data object destination can be any data object that can be listed at a write position, and the data object source can be a data object, a predefined function or a functional method (as of release 6.10). The data type of the data object destination must either be compatible with the data type of source, or it must be possible to convert the content of source into the data type of destination according to one of the conversion rules.
    Notes
    If source and/or destination are field symbols, then, as in all ABAP commands, the system works with the content of the data objects to which the field symbols point. The actual pointer content of a field symbol can only be changed using the statement ASSIGN or the addition ASSIGNING when processing internal tables (value semantics). If source and destination are reference variables, the reference contained in source is assigned to destination (reference semantics).
    Strings and internal tables are addressed internally using references. When assignments are made between strings and between internal tables (as of release 6.10), only the reference is transferred, for performance reasons. After the assignment, the actual string or the actual table body of the source as well as the target object are addressed (sharing). When the object is accessed to change it, the sharing is canceled and a copy of the content is made. The sharing is displayed in the memory consumption display of the ABAP debugger and in the Memory Inspector tool (as of release 6.20).
    Obsolete Form: MOVE PERCENTAGE
    Exceptions
    Catchable Exceptions
    CX_SY_CONVERSION_NO_NUMBER
    Cause: Operand cannot be interpreted as number
    Runtime Error: CONVT_NO_NUMBER (catchable)
    CX_SY_CONVERSION_OVERFLOW
    Cause: Overflow with arithmetic operation (type P, with specified length)
    Runtime Error: BCD_FIELD_OVERFLOW (catchable)
    Cause: Operand too large or (intermediate) result too large
    Runtime Error: CONVT_OVERFLOW (catchable)
    CX_SY_MOVE_CAST_ERROR
    Cause: Source or target variable are not reference variables
    Runtime Error: MOVE_CAST_REF_ONLY
    Non-Catchable Exceptions
    Cause: Source field (type P) does not contain correct BCD format.
    Runtime Error: BCD_BADDATA
    Cause: Assignment for deep structures not permitted if these overlap.
    Runtime Error: MOVE_COMPLEX_OVERLAP
    Cause: Type conflict with the assignment between object references.
    Runtime Error: MOVE_INTERFACE_NOT_SUPPORTED,
    Runtime Error: MOVE_IREF_NOT_CONVERTIBLE,
    Runtime Error: MOVE_IREF_TO_OREF,
    Runtime Error: MOVE_OREF_NOT_CONVERTIBLE
    Cause: Type conflict with the assignment between data references.
    Runtime Error: MOVE_DREF_NOT_COMPATIBLE
    Cause: Assignment between the types involved not supported.
    Runtime Error: MOVE_NOT_SUPPORTED
    Cause: Constants and literals must not be overwritten.
    Runtime Error: MOVE_TO_LIT_NOTALLOWED
    Cause: onstants and literals must not be overwritten.
    Runtime Error: MOVE_TO_LIT_NOTALLOWED_NODATA
    Cause: During a loop in an internal table, an attempt was made to overwrite a reference variable that is linked with the internal table by REFERENCE INTO.
    Runtime Error: MOVE_TO_LOOP_REF
    <b>Write</b>
    Syntax Diagram
    WRITE - TO
    Syntax
    WRITE {source|(source_name)} TO destination
                                 [int_format_options].
    Effect:
    This statement assigns the formatted content of the data object source, or the formatted content of the data object whose name is contained in source_name, to the data object destination. The data objects source_name and destination must be character type and flat. source_name can contain the name of the data object to be assigned in upper or lower case. If the data object specified in source_name does not exist, the assignment is not executed, and sy-subrc is set to 4.
    The statement WRITE TO has the same effect as the statement WRITE for lists. This statement formats the content of source or the source field specified in source_name as described in the field. It does not, however, store the result in an output area of a list in the list buffer, but instead stores it in a variable. The output length is determined by the length of the variable.
    The same additions int_format_options can be specified for formatting the content as in the statement WRITE for lists, except for NO-GAP and UNDER.
    System fields
    sy-subrc Meaning
    0 The data object specified in source_name was found and the assignment was executed.
    4 The data object specified in source_name was not found and the assignment was not executed.
    For the static specification of source, sy-subrc is not set.
    Note:
    If destination is specified as an untyped field symbol or an untyped formal parameter, and is not flat and character-type when the statement is executed, this leads to an untreatable exception in a Unicode program. In non-Unicode programs, this only leads to an exception for deep types. Flat types are handled as character-type data types.
    Example:
    After the assignment, the variables date_short and date_long receive the current date in the order specified in the user master record. The variable date_long also contains the defined separators, as the output length is sufficiently long. The content of the variable date_mask is formatted according to the formatting addition DD/MM/YY.
    DATA: date_short(8) TYPE c,
          date_long(10) TYPE c,
          date_mask(8)  TYPE c.
    WRITE sy-datum TO: date_short,
                       date_long,
                       date_mask DD/MM/YY.
    Exceptions
    Non-Catchable Exceptions
    Cause: Negative length specified for offset/length
    Runtime Error: WRITE_TO_LENGTH_NEGATIVE
    Cause: Negative offset specified in offset/length
    Runtime Error: WRITE_TO_OFFSET_NEGATIVE
    Cause: Offset specified in offset/length specification is longer than the field length.
    Runtime Error: WRITE_TO_OFFSET_TOOLARGE
    Thanks
    sunil

  • What is the difference between #variable_name and :variable_name?

    Hi!
    What is the difference between #variable_name and :variable_name?
    I have found that if we use alphanumeric variable then :variable_name return value in quotes but #variable_name without quotes.
    Why it does not work in the same way for variable default values when variable is used in filter? (It works in mapping)
    I use variable in filter like T.OUT_DATE>convert(datetime,:LAST_UPDATE_DATE,121)
    When I use my variable in package and do refresh it works fine. But when I try to execute the same interface with variable default value I get error. Seems that variable name has been not changed to the value. It does not work with default value in quotes neither without quotes.
    Any ideas how to solve that?
    Thank you in advance!
    Edited by: user13278245 on Sep 15, 2010 4:34 AM

    Question is how to make it work with default value, when I execute interface standalone, not in package? And why it works in mapping but not in filter?
    + I have found that it works if source is Oracle. It doesn't work only for MS SQL source.
    Edited by: user13278245 on Sep 15, 2010 6:43 AM

  • What is the difference between start() and run()

    Hi:
    what is the difference between start() and the run()???
    in my app, i have
    Console.debug( "starting thread to listen for clients" );
    _server = new Server( this );
    _server.start();
    _server extends Thread..
    why everytime i use server.start(); my app will terminate on it is own, even though in my servr.run() method, i have a while loop
    and if i call _server.run() explicitly in my code, that while loop will be in execution
    can someone let me know??
    thnx

    what is the difference between start() and the
    run()???start() is a method on Thread that tells it to start.
    run() is a method in the object that the thread executes.
    why everytime i use _server.start(); my app will
    terminate on it is own, Err.... I'm not convinced this is true. It'll throw an IllegalThreadStateException, if you try to restart an existing thread.
    If that's what you're saying.
    even though in my _servr.run()
    method, i have a while loopI don't see the connection. Are you saying that the while loop never terminates, and you don't see why the thread is terminating?
    and if i call _server.run() explicitly in my code,
    that while loop will be in executionIf you call server.run() explicitly, then run() will be executed in the same thread that you called it in.

  • What is the difference between exists and in

    hi all
    if i have these queries
    1- select ename from emp where ename in ( select ename from emp where empno=10)
    and
    2- select ename from emp where exists ( select ename from emp where empno=10)
    what is the difference between exists and in is that only when i use in i have to bring the field name or what.... i mean in a complex SQL queries is it will give the same answer
    Thanks

    You get two entirely different result sets that may be the same. Haah! What do I mean by that.
    SQL> select table_name from user_tables;
    TABLE_NAME
    BAR
    FOO
    2 rows selected.
    SQL> select table_name from user_tables where table_name in (select table_name from user_tables where table_name = 'FOO');
    TABLE_NAME
    FOO
    1 row selected.
    SQL> select table_name from user_tables where exists(select table_name from user_tables where table_name = 'FOO');
    TABLE_NAME
    BAR
    FOO
    2 rows selected.So, why is this? the WHERE EXISTS means 'if the next is true', much like where 1=1 being always true and 1=2 being always false. In this case, where exists could be TRUE or FALSE, depending on the subquery.
    WHERE EXISTS can be useful for something like testing if we have data, without actually having to return columns.
    So, if you want to see if an employee exists you might say
    SELECT 1 FROM DUAL WHERE EXISTS( select * from emp where empid = 10);
    If there is a row in emp for empid=10, then you get back 1 from dual;
    This is what I call an 'optimistic' lookup because the WHERE EXISTS ends as soon as there is a hit. It does not care how many - only that at least one exists. It is optimistic because it will continue processing the table lookup until either it hits or reaches the end of the table - for a non-indexed query.

  • 1)Now I use Lightrom 5.7 how to upgrade to 6 or CC? 2) What is the difference between 6 and CC vercion? 3) When I used lightromm 3, I could see inEXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is ve

    1)Now I use Lightrom 5.7 how to upgrade to 6 or CC?
    2) What is the difference between 6 and CC version?
    3) When I used lightromm 3, I could see in EXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is very sad  I am stiil waiting and hope that it would be possibble in the new  versions. Or this indication may  possible by setting?

    1)Now I use Lightrom 5.7 how to upgrade to 6 or CC?
    Purchase the standalone upgrade from here: Products
    Download CC version from here: Explore Adobe desktop apps | Adobe Creative Cloud
    2) What is the difference between 6 and CC version?
    See this comparison chart: Compare Lightroom versions | Adobe Photoshop Lightroom CC
    3) When I used lightromm 3, I could see in EXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is very sad  I am stiil waiting and hope that it would be possibble in the new  versions. Or this indication may  possible by setting?
    Rob Cole's ExifMeta plugin displays the Subject Distance field (and much more).  Unfortunately, his Web site appears to be down again.  He used to be very active here, but he hasn't posted in several months.

  • What's the difference between thunderbolt and mini displayport?

    I'm trying to connect my Macbook with a monitor and I'm thinking of what cable to get. I will have to connect using a (Thunderbolt to HDMI cable) or a (mini displayport to HDMI cable).
    I was wondering what's the difference between Thunderbolt and mini displayport
    Thanks

    @bontistic: it is not true that only the Macbook Air supports Thunderbolt. All models(!) support thunderbolt: also the Macbook Pro's and Mini's. Eg.: http://www.apple.com/nl/macbookpro/features.html#thunderbolt
    My Macbook Pro from 2011 already supported Thunderbolt...

  • What is the difference between, DSO and DTP in BI 7.0

    Hi Guru's
    what is the difference between, DSO and DTP in BI 7.0 , how it will come the data from r/3 to BI 7.0, can u discribe?
    points will be assined?
    Thanks & Regards,
    Reddy.

    Hi,
    The data will be replicated in the same way as we do in 3.5.
    Activating, and Transporting the same DS in BW, and Replicating them in BW from R/3.
    First you need to know Diff b/w 3.5 nd 7.0, for that check the below doc's:
    http://help.sap.com/saphelp_nw04s/helpdata/en/a4/1be541f321c717e10000000a155106/content.htm
    blogs:
    /people/sap.user72/blog/2004/11/01/sap-bi-versus-sap-bw-what146s-in-a-name
    Re: How to identify Header, Item and Schedule item level data sources?
    For Transformations in BI:
    http://help.sap.com/saphelp_nw70/helpdata/en/33/045741c0c28447e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/f8/7913426e48db2ce10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/a9/497f42d540d665e10000000a155106/frameset.htm
    For DTP:
    DTP:
    http://help.sap.com/saphelp_nw70/helpdata/en/20/a894ed07e75648ba5cf7c876430589/frameset.htm
    For DSO:
    Data Store Objects:
    http://help.sap.com/saphelp_nw70/helpdata/en/f9/45503c242b4a67e10000000a114084/frameset.htm
    Reg
    Pra

  • What is the difference between ojvm and client versions?

    Changing the java vm from client to ojvm result in the following error:
    Errormessage:
    java.lang.UnsatisfiedLinkError: no UniqueC in java.library.path
    Project Settings -&gt; Configurations -&gt; Development -&gt; Runner -&gt; Virtual Machine -&gt; ojvm FAILS
    Project Settings -&gt; Configurations -&gt; Development -&gt; Runner -&gt; Virtual Machine -&gt; ojvm      RUNS OK.
    Project Settings -&gt; Configurations -&gt; Development -&gt;Paths -&gt;Additional Classpath:
    C:\jars\xerces.jar;C:\jars\UniqueC.dll;C:\jars\log4j-1.2.8.jar
    What is the difference between ojvm and client versions? How can I make ojvm to find UniqueC.dll?
    Various version info:
    Output from program:
    java version:1.4.2_01
    java home:C:\programfiler\JAVA\2sdk1.4.2_01\jre
    java vm version:9.0.3.738 cdov
    Taken from JDeveloper Help About:
    Oracle IDE     9.0.3.10.35
    UML Modelers Version     9.0.3.9.4
    Business Components Version     9.0.3.10.7
    java.version     1.3.1_02
    java.vm.name     OJVM Client VM
    java.vm.version     9.0.3.738 o

    However, Adobe offers extra paid services to create PDF or to export PDF to other formats. You are not required to buy them, however.

  • What is the difference between TO_CHAR and TO_DATE()?

    Hi everybody,
    i am facing a problem in my system.It is quite urgent, can you explain me "What is the difference between TO_CHAR and TO_DATE()?".
    According to user's requirement, they need to generate a code with format "YYMRRR".
    YY = year of current year
    M = month of current month (IF M >=10 'A' ,M >=11 'B' , M >=10 'C')
    RRR = sequence number
    Example: we have table USER(USER_ID , USER_NAME , USER_CODE)
    EX: SYSDATE = "05-29-2012" MM-DD-YYYY
    IF 10
    ROW USER_ID , USER_NAME , USER_CODE
    1- UID01 , AAAAA , 125001
    2- UID02 , AAAAA , 125002
    10- UID010 , AAAAA , 12A010
    This is the original Script code. But This script runs very well at my Local. Right format. But it just happens wrong format on production.
    12A010 (Right) => 11C010 (Wrong).
    SELECT TO_CHAR(SYSDATE, 'YY') || DECODE( TO_CHAR(SYSDATE, 'MM'),'01','1', '02','2', '03','3', '04','4', '05','5', '06','6', '07','7', '08','8','09','9', '10','A', '11','B', '12','C') ||     NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE FROM TVC_VSL_SCH                                                       
         WHERE TO_CHAR(SYSDATE,'YY') = SUBSTR(USER_CODE,0,2)                         
         AND TO_CHAR(SYSDATE,'MM') = DECODE(SUBSTR(USER_CODE,3,1),'1','01',          
              '2','02', '3','03', '4','04', '5','05',          
              '6','06', '7','07', '8','08', '9','09',          
              'A','10', 'B','11', 'C','12')                    
    I want to know "What is the difference between TO_CHAR and TO_DATE()?".

    try to use following select
    with t as
    (select TO_CHAR(SYSDATE, 'YY') ||
             DECODE(TO_CHAR(SYSDATE, 'MM'),
                    '01', '1',
                    '02', '2',
                    '03', '3',
                    '04', '4',
                    '05', '5',
                    '06', '6',
                    '07', '7',
                    '08', '8',
                    '09', '9',
                    '10', 'A',
                    '11', 'B',
                    '12', 'C') as code
        from dual)
    SELECT t.code || NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE
      FROM TVC_VSL_SCH
    WHERE SUBSTR(USER_CODE, 1, 3) = t.codeand yes you need check time on your prodaction server
    good luck
    Edited by: Galbarad on May 29, 2012 3:56 AM

  • What is the difference between upgradation and migration.

    Hi Guru's
    what is the difference between upgradation and migration.
    actuallly i involved in upgradation project, here my role is
    1. first i check the query's in 3.5 save the query and transport the query. and check the query in bex analyzer also.
    2. go to BI .7  find the query;s ,give the query name and save the query ,
    3. once save the query, again will come to 3.5 open the query , it will not open. this is my job here,
        come to 7.0 check the query in analyzer also.
    i am having littile bit confusion, how it will comes query in 7.0, why are u saving the query's in 3.5 and 7.0
    query's already available in 7.0 why are u doing this work?
    can i know the upgrades those  objects, is it neccessary, if necessary how can i upgrade.
    infoobje , transferrules, transferstructure ,infosoure, datasoure,updaterules, ods, cubes.
    Points will be Assingned ,
    Thanks & Regards
    prabhavathi

    Hi,
    I was talking in a general sense not on a query level.
    If your taling about migration in that level meaning as a part of larger upgradation (in your case 3.x to 7) there may be many places where you need to do this kind of activities.
    Fr eg migration into new data flow, Migration of Web templates from BW 3.x to Netweaver 2004s, etc
    Hope this helps.
    Thanks,
    JituK

  • What is the difference  between ws_upload and gui_upload

    what is the difference  between ws_upload and gui_upload
    what is the difference  between ws_download and gui_down load
    pls tell  briefly

    Hi Kuamr,
    UPLOAD and DOWNLOAD, the function modules used until now are not part of the standard set of ABAP commands. They are used to display the file interface on the presentation server. UPLOAD and DOWNLOAD are not compatible with USs and have been replaced by GUI_UPLOAD and GUI_DOWNLOAD.
    The new function modules, GUI_UPLOAD and GUI_DOWNLOAD, have an interface that also allows you to write Unicode format to the local hard drive. For a description of these interfaces, refer to the documentation for each function module, available under SAP Easy Access " Development " Function Builder " Goto " Documentation.
    Instead of using the function modules, you can use the static methods GUI_UPLOAD and GUI_DOWNLOAD of the global class CL_GUI_FRONTEND_SERVICES.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

Maybe you are looking for