Need help regarding SELECT statement

Hello, first time here but need help badly.
I been using SQL syntax with another SQL server by the following statement doesnt seem to work in Oracle database.
SELECT firstname+" "+lastname AS fullname FROM customers
basicially, I just want to display date from two column as one column.
Thanks

Oracle has pipe sign for concate
SELECT firstname||' '||lastname AS fullname
FROM customers;Khurram

Similar Messages

  • Need Help in Select Statement

    Dear gurus
    Below is my select statement. Im having problem with statement.
    the problem is that  the table vbfa  have some entries like this
    800     1400004654     10     3900012235     10     M     424,672.68
    800     1400004654     10     3900012257     10     M     137,093.36
    800     1400004654     20     3900012311     20     M     214,257.36
    800     1400004654     30     3900012412     30     M     81,248.44
    800     1400004654     30     3900012901     30     M     166,920.68
    When the select statement is run it does not fetch the data of LINE number 2 and Line number 5
    LOOP AT itab1.
        SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_vbfa
        FROM vbfa
        WHERE vbelv = itab1-vgbel
        AND posnn = itab1-vgpos
        AND vbtyp_n = 'M'.
        SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_vbrk
          FROM vbrk
          WHERE vbeln = wa_vbfa-vbeln
          AND vbtyp = 'M'.
        IF sy-subrc = 0.
            itab1-lfimg = wa_vbfa-rfmng.
           itab1-old_price = wa_vbfa-rfwrt.
           MODIFY itab1.
           ELSE.
        ENDIF.
      ENDLOOP.
    Please Help
    Regards
    Saad Nisar

    Hello Saad,
    The reason why you are not getting the 2nd and 5th entries is that, the where conditions vbelv, posnn and vbtyp_n matches for both the 1st and 2nd record where select will pick only the 1st record. The same way for 4th and 5th record. so its picking only 4th.
    So to avoid this add even vbeln in the where condition of the select query
    LOOP AT itab1.
        SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_vbfa
        FROM vbfa
        WHERE vbelv = itab1-vgbel
        AND posnn = itab1-vgpos
       AND vbeln = itab1-field           " Add the corresponding field here
        AND vbtyp_n = 'M'.
        SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_vbrk
          FROM vbrk
          WHERE vbeln = wa_vbfa-vbeln
          AND vbtyp = 'M'.
        IF sy-subrc = 0.
            itab1-lfimg = wa_vbfa-rfmng.
           itab1-old_price = wa_vbfa-rfwrt.
           MODIFY itab1.
           ELSE.
        ENDIF.
      ENDLOOP.
    Vikranth

  • Need help on select statement...

    Hi,
    I need to fetch from vbfa table those records where vbeln starts with '0800'.
    my select statement given below gives a syntax error..pl help.
    SELECT * FROM vbfa WHERE vbeln(4) = '0800'.
    vbeln(4) is not accepted and i get the message ' field vbeln(4) is unknown' ...what to do?
    thks

    Use LIKE. Please see F1 on this.
    Rob
    (changed CP to LIKE)
    Edited by: Rob Burbank on Sep 15, 2008 11:18 AM

  • Need help with select statement or query

    Not familiar with what to call it, but here is what i need...
    To give our analyst a better idea of warranty on some of our
    equipment, i
    would like to add to the page a column that displays if the
    device is still
    under warranty
    I currently capture the date the equipment was returned from
    repair, so what
    could i use within my select statement or query to display a
    warranty
    expiration date or display on the page...
    example :
    Returned from repair 10/20/2006 warranty expires on
    11/20/2006
    each equipment has different warranties, so i need a formula
    or something to
    say... device #1 has 60 day warranty ( so 10/20/2006 + 60days
    =
    12/19/2006 )
    I would imagine this to be a query
    Table 1 would contain the equipment type and warranty time
    Table 2 would contain the current status of the equipment
    Query would take the back from repair date + warranty =
    expiration date

    Simple. Join the two tables and create a derived column for
    the expiration date. The exact syntax is dependant on your DBMS, so
    check the manual for whichever you are using and look at the date
    functions. There will be a function that will allow you to add a
    number of date units (day, month, year, etc) to a date
    field.

  • Need help using Select statement  to  retrieve one record

    Hi guys, my first post so be gentle please. The basis of this fucntion is to search my dtabase using the select statement to find the record the user wants, by retrieving the name of theitem from the text box. details are then displayed on a joption message box.
    Everytime I run this program it throws an exception 'Exception: null'. Can anyone see where I am going wrong, I have only bn learning java for thepast 6 months so perhaps I am doing something wrong.
    Or perhaps there is another way for me to close the st, con, rs?
    Your help appreciated
    public void searchproducts(){
    Connection con = null;
    Statement st = null;
    ResultSet rs = null;
    try{
    //creating and loading a database connection
    String dbUrl = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=db2.mdb;"; // String dbUrl = "jdbc:odbc:people";
    String user = "";
    String password = "";
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection c = DriverManager.getConnection(
    dbUrl, user, password);
    int count;
    st = con.createStatement();
    rs = st.executeQuery("SELECT ItemName, Country, Yearmade, ValuePrice, Forsale FROM Collectman WHERE ItemName="+" '"+txtsearchproduct.getText()+"'" );
    while(rs.next()) {
    String ItemName = rs.getString(1);
    String Country = rs.getString(2);
    String Yearmade = rs.getString(3);
    String ValuePrice = rs.getString(4);
    String Forsale = rs.getString(5);
    JOptionPane.showMessageDialog(null, "product details are: " + ItemName + " " + Country + " " + Yearmade + " " + ValuePrice + " " + Forsale);
    //It keeps on throwing this excpetion with null
    catch (Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(rs != null)
    rs.close();
    if(st != null)
    st.close();
    if(con != null)
    con.close();
    } catch (SQLException e) {
    }

    And while we're waiting on that, I'll just say it's nice to see you almost got the general layout of a db call correct...that's a rare thing around here. The finally should have a try/catch round each of the close statements and not around all three in one go. If the resultset throws an exception in your version then you would fail to close either the statement or the connection.
    The second thing is, look up PreparedStatements. They're a better choice for handling SQL requiring variables than using a bog standard Statement.

  • Need help on select statement in ABAP

    Hi,
    I have 2 table. in that I need to do join. But 2 fields of table A that I need to join with the 2 fields in table B.
    But problem is that both the fields of table A can be NULL(either of them).
    i.c.
                          Table A                                                                      Table B
    KONDA     KUNNR      PRICESHEET                                     KONDA       KUNNR
    KA             NULL           A                                                       KA            1000
    KA             NULL           B                                                       KA            1001
    DZ             NULL            C                                                      DZ             1002
    NULL         1000            D                                                       DZ             1003
    NULL         1001            E                                                       DZ             1004
    NULL         1002            F
    NULL         1003            F
    NULL         1004            G
    After Joining I need for KONDA = 'KA'
    KONDA     KUNNR      PRICESHEET 
    KA             NULL           A            
    KA             NULL           B
    NULL         1000            D 
    NULL         1001            E 
    Could you plz help me...Plz reply soon. Thanks in advance
    Regards
    Anutosh

    select a~konda a~kunnr a~pricesheet  from table_a as a
    join table_b as b on ( a~konda = b~konda or a~konda eq space ) and (a~kunnr = b~kunnr or a~kunnr eq space )
    where b~konda = 'KA'.
    Try that
    Edited by: Ramiro Escamilla on Apr 3, 2008 11:48 PM

  • Need help on Select statement/Formula

    Post Author: Krazy Kasper
    CA Forum: Data Connectivity and SQL
    My crystal report (Crystal Reports X) pulls about five thousand records/transactions. When any 2 transactions have every field the same except STATUS, I want to select from those 2 that transaction where STATUS = I.
    Appreciate any help you can provide.
    Krazy
    [email protected]

    Use LIKE. Please see F1 on this.
    Rob
    (changed CP to LIKE)
    Edited by: Rob Burbank on Sep 15, 2008 11:18 AM

  • Need Help regarding text Output

    Dear gurus.
    I need help regarding formatting of a text.
    I want to format a employee sub group text.
    im getting a text workers (7) from a table t503t having field ptext.
    i want to show only (7) in the output not the whole text how can i do this ?
    Please help
    regards
    Saad.Nisar

    DATA: BEGIN OF itab_odoe OCCURS 0,
      department_text LIKE t527x-orgtx,"Holds the short text for department
      department_no LIKE pernr-orgeh,
      pernr LIKE pernr-pernr,
      ename LIKE pernr-ename,
      grade like t503t-ptext,   "THIS AREA GET ME TEXT OF EMPLOYEE SUBGROUP"
    *  department_text LIKE t527x-orgtx,"Holds the short text for department
      current_year LIKE sy-datum,
      wt0001 LIKE q0008-betrg,"Basic Pay
      wt1101 LIKE q0008-betrg," COLA
      wt3002 LIKE p0015-betrg,"Overtime
      per_basic type p DECIMALS 2,"Overtime percentage on basic
      per_basic_sum type p decimals 2,"Overtime Sum Division
      overtime_sum LIKE p0015-betrg,"holds sum of overtime
      basic_sum like q0008-betrg,"holds sum of basic
    END OF itab_odoe.
    Im using the select statement to get the employee subgroup from the table
    select single ptext
        from t503t
        into itab_odoe-grade
        where persk eq pernr-persk
        AND SPRSL eq 'EN'.
    now in itab_odoe-grade the values comes is Workers (7) , Snr Mgt (M3)
    i want to show only the text in Brackets.

  • Need HELP regarding installinfg CR2008/Visual Advantage

    I need help regarding installing CR2008/Visual Advantage. I had the evaluation copy of cr2008. My compnay purchased the CR2008 Visual Advantage. Upon calling your customer service, I was told that I had to UN-install the CR2008 evaluation copy then install the CR2008. I did the unstall HOWEVER, when I try to install the CR2008 that we purchased, i get the following error..HR
    HR -2147024770-"c:\program files\business objects enterprise 12.0\win32_x86\REPORTCONVTOOL.DLL FAILED TO REGISTER"..
    I get more that just that one...I have received this before and based upon this formum, i have delted the regristry in the following using regedit.exe
    HKEY_LOCAL_MACHINE\SOFTWARE\BUSINESS OBJECT ;
    HKEY_CURRENT_USER\SOFTWARE\BUSINESS OBJECTS..
    Afeter i deleted the keys, I re-boot my pc and try to install the coftware again...BUT I GET THE SAME ERRORS...I have tryied this several times....what am i missing/not doing correctly

    Hi Shamish
    Actually you were on the right track, i think you just have to increase PSAPTEMP a bit and you will be fine. 358 MB seems just too small, i suggest you increase it to at least 2GB.
    1. what will be the difference in use of PSAPUNDO and PSAPTEMP while copy is running. ( i.e. what will be entered in PSAPUNDO and what will be filled in PSAPTEMP.)
    PSAPTEMP: is needed for large sort operations, as mentioned when you have a select with an ORDER BY clause, or if you do join two tables. During the client copy some sorting might be needed for special tables (cluster tables) where data is stored sorted.
    PSAPUNDO: undo space is only needed for DML (data manipulation), if data is changed undo is generated. This obviously is heavily the case during a client copy.
    2. the target client already has a copy taken 1 month before. so I think while importing it first delete existing data and then copies the new one.
    So If I first delete the target client and then take import on it; will it have advantage in regards of getiing UNDO or TEMP segments getting filled ?
    Deleting the client first might help for the undo problem, but you already solved that. I cannot imagine, it will help for the PSAPTEMP issue. As i said i would just increase PSAPTEMP and restart the copy.
    One more add: if you are doing the client copy with parallel processes, this will influence your requirements on temp and undo space, because of the concurrently running processes.
    Best regards
    Michael

  • Hey guys need help regarding iTunes U. My school is moving for iOS and Mac in the classroom and I have been appointed Junior Administrator for the schools technical department and integrating these devices into the classroom.

    Hey guys need help regarding iTunes U. My school is moving for iOS and Mac in the classroom and I have been appointed Junior Administrator for the schools technical department and integrating these devices into the classroom.
    I have an appointment with a director on Tuesday. I want to demo iTunes U. Problem is I have never used it before and have no idea how to set it up and even if I should sign up.
    Please help any ideas regarding iTunes U and how I should direct the meeting tomorrow.
    Please please post here.
    Thanks
    Tiaan

    Greetings fcit@!A,
    After reviewing your post, it sounds like you are not able to select none as your payment type. I would recommend that you read this article, it may be able to help the issue.
    Why can’t I select None when I edit my Apple ID payment information? - Apple Support
    Thanks for using Apple Support Communities.
    Take care,
    Mario

  • Need Help ASAP  my State tax form is in a PDF file and the attachment in my email says Please wait

    Need Help ASAP  my State tax form is in a PDF file and the attachment in my email says Please wait...
    I tried downloading updates like it said to but it still will not display the document.  How do I print the PDF file ASAP

    Can you give us a LOT more info?
    What email client? What version of Reader (I can only assume you even have Reader at this point)?
    Please wait? I'm sure it says more than that, right?
    Have you tried simply saving the PDF (it IS a PDF correct?) to your desktop and opening it from there?
    Did you get this form from the IRS or did it come from somewhere else? If the IRS again, what version of Reader?
    Help us help you.

  • Need Help Regarding Enabling The Matrix

    Hi All,
    We have got one user form and we have got one choose from list and one matrix, on click of choose from list the value will be displayed in the text box and at the same time matrix should get enabled. But it;s not happening in our case. The value is coming in the text box through choose from list but matrix is not getting enabled. We are able to change the back ground color of the matrix, make first column invisible and all but not able to enable the matrix. We need help regarding this one.
    Regards,
    Jayanth

    Hey first bind the columns of matrix to any user datasource
    and then you can enter any thing into your matrix 
    following code may help
    suppose you have one column
    oForm = SBO_Application.Forms.Item("URFRM")
    oUserDataSource = oForm.DataSources.UserDataSources.Add("URDSName",
    SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
    oMatrix=oForm.Item("URMATRX")
    oMatrix = oItem.Specific
    oColumns = oMatrix.Columns
    oColumn = oColumns.Item("URCOLName")
    oColumn.DataBind.SetBound(True, "", "URDSName")
    oMatrix.Addrow()
    hope this will help
    additionally you can look at this sample
    .....SAP\SAP Business One SDK\Samples\COM UI\VB.NET\06.MatrixAndDataSources

  • Need Help Regarding JAVA BEAN

    Is any one tell me that JAVA BEAN only used in WEB or also you in Desktop applications???? and aslo tell how i implement Java class and use JAVA BEAN. I need help regarding above matter
    thanks in advance
    Rehan MIrza

    Here is a good link that indicate that JavaBean is not only for applets
    http://java.sun.com/docs/books/tutorial/javabeans/whatis/beanDefinition.html
    quote:
    The JavaBeans API makes it possible to write component software in the Java programming language. Components are self-contained, reusable software units that can be visually composed into composite components, applets, applications, and servlets using visual application builder tools. JavaBean components are known as Beans.
    Francois

  • I need help regarding setting my mail accounts on macbook pro

    I need help regarding resetting my mail accounts on macbook pro

    What kind of accounts do you need to reset? IMAP or POP accounts using one of the many web-based messaging systems? An Exchange server account? Were they working and now just not working any longer?
    You're going to have to be a little more specific in what you need...
    Clinton

  • I need help regarding installation of Netweaver 2004s

    Hi,
    I need help regarding installation of Netweaver. When ever i am running setup.exe, i am getting a page asking for local host and port number as 21212. When I enter my local host name and the port number as 21200 i am getting the error message given below and the installation stops. I am not able to proceed further. can any one help me what i need to do here. I created MS lookupadapter and entered my static ip address in 'host' file after 127.0.0.1 localhost and i disabled port number 3201 in system file. I verified system variables also. Everything is fine. I dont have firewall or antivirus installed in my system. Is there any thing else i need to do. please help me. Thanks in advance.
    " SAPinst is getting started.
    Please be patient ...
    starting gui server process:
      sapinstport: 21200
      guiport    : 21212
      guistart   : true
      command    : "C:\j2sdk1.4.2_09/bin\javaw.exe" -cp "C:/DOCUME1/ADMINI1/LOCALS1/Temp/sapinst_exe.6496.1162659801\jar\instgui.jar;C:/DOCUME1/ADMINI1/LOCALS1/Temp/sapinst_exe.6496.1162659801\jar\inqmyxml.jar" -Xmx256M -Dsun.java2d.noddraw=true SDTServer config=jar:sdtserver.xml guiport=21212 sapinsthost=localhost sapinstport=21200 guistart=true
    load resource pool G:\SAP\Softwares\IDES mySAP2005\51031898\IM_WINDOWS_I386\resourcepool.xml
    guiengine: no GUI connected; waiting for a connection on host (local hostname) , port 21200 to continue with the installation
    guiengine: login in process...............................
    guiengine: login timeout; the client was unable to establish a valid connection
    Exit status of child: 1"
    Regards,
    Farooq Shaik.

    Hi
    Run the sapinst.exe with the port 21212.This port 21212 is the default port used during the installation of netweaver.

Maybe you are looking for

  • More than one ipod on same computer

    Can I use an ipod video and nano on the same computer?

  • External monitor initially flashes on waking from sleep

    I recently upgraded to 10.4.8. My PowerBook is connected to an external monitor and now often flashes when I wake the machine from sleep. It takes a while too settle down but then works fine. If I wake from sleep without the external monitor, there a

  • IPad - SUP connection questions

    The import works perfectly on device but I'd like to have more control on that. here are different questions I'm asking myself concerning that : 1) I'd like to check if the connectivity is ok before deleting the local DB ?        When using the code

  • BED and SECess not flowing in ARE-3

    Hai Gurus, BED & SECess percentage and values are not flowing in ARE-3 ..... For Export and Deemed export same pricing procedure. 1.In Export Invoice all values are flowing same way ARE-1 also same values are appering why not ARE-3 2.Condition record

  • 关于windows dbconsole 错误

    目前环境介绍如下: 公司测试环境:win 2008 10.2.0.5 数据库 之前发现dbconsole启动不了,重建之后也启动不了,在启动时候报错: 配置: Stack Trace: oracle.sysman.emcp.exception.EMConfigException: 启动 Database Control 时出错      at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:64