How to manipulate Date Fields of MSSQL server

I build a database link from my oracle Database to an sql Server , i can run any select statement that i want with no problem but when i try to run the above :
select empl."emp_id", "emp_code", "emp_first", "emp_last" ,
"empio_dtin", "empio_dtout", "section_id",
to_date ( "empio_dtin" , 'dd/mm/yyyy hh24:mi:ss')
from "dbo.employees"@ATERMON empl INNER join "dbo.empio"@atermon empio on empl."emp_id" = empio."emp_id"
where "empio_dtin" > '05/01/09'
order by "section_id", "emp_code"
i took the message :
ORA-02070: database ATERMON does not support TO_DATE in this context
The problem is the time because when i run the select statement the date fields brings as value only the dates values for example "01/05/09" without the time value that i need most,
i try to insert the values into an oracle table with Date format fields but i take only the dates values again.

Is the empio_dtin field defined with a date datatype or a character datatype?? If the field is a date, try using TO_CHAR instead of TO_DATE:
to_char ("empio_dtin" , 'dd/mm/yyyy hh24:mi:ss')
Assuming that empio_dtin is defined as a date datatype, you might want to try directly converting the string '05/01/09' to a date rather than letting Oracle impliciting covert the string to a date.
"empio_dtin" > to_date('05/01/2009', 'MM/DD/YYYY')
Edited by: user1983440 on Jun 24, 2009 9:58 AM
Edited by: user1983440 on Jun 24, 2009 9:59 AM
Edited by: user1983440 on Jun 24, 2009 10:00 AM
Edited by: user1983440 on Jun 24, 2009 11:30 AM

Similar Messages

  • How to retrieve data from a MSSQL?

    Dear All,
    How can I retrieve data from a MSSQL server in my custom iView which is developed by Eclipse?
    Thanks
    Sam

    Hi Sam,
    you have a bunch of possibilities... (and they do not really differ from accessing a DB from within any J2EE app).
    You can use a direct connection, setting Database, port, user, ... within your component.
    Or you can set all these things within VisualAdmin and then reference the DataSource via JNDI from within your component.
    You can directly use SQL.
    Or you can use ObjectRelationalMappers like Hibernate...
    Any more questions?
    Hope it helps
    Detlev

  • HTTP Submit Button - How to post data to a Web Server

    HTTP Submit Button - How to post data to an IIS Server
    Steveoruni - 09:50am Sep 4, 2007 Pacific
    Hello,
    I have created a simple form in LiveCycle designer. The form only has some check boxes, radio buttons and text fields for users to fill out. Everyone in my office is on webmail so the Email Submit button is not a smooth option for getting the xml data back to me.
    I would like to use the HTTP Submit button to allow users to submit their form data back to me but I am having trouble. I would like the xml files to end up in a directory on the web server.
    I set up an IIS 6 server and granted the Write right to the anonymous web user account. When I fill out the PDF form and click the HTTP Submit button it doesn't seem to work. Are there any special configuration changes I need to make to my IIS server to allow this data to be posted?
    Should this plan work? Should I be able to have users use the HTTP Submit button to post their data right to my IIS web server or is there some Adobe server I need to buy for this simple form? I'd also be happy if this could work with Apache; it doesn't need to be IIS. I guess my main issue is that I don't know how to get either web werver to accept data in an HTTP post and save it as a file.
    Also, I noticed that when I configure a standard button and set the Control Type to "Submit", there is an option on the Submit Tab to change the Submit As setting to "PDF". Does this mean that my users can fill out my form with Acrobat Reader and HTTP Submit the form to my web server as a PDF complete with their data? If not that's fine, I would be sufficiently happy if the users could post their XML files to the web server so I can open them in the form with Acrobat Professional.
    I am lost and would appreciate any helpful feedback.
    Thanks,
    Steve

    HI again,
    I want to have a pdf fillable form opened on a link.Once user has entered data, the user clicks a button(or some action to invoke saving). At this point I want the filled pdf file to be saved on a certain directory.
    How can save a filled pdf form in pdf format on a certain directory?
    Is it possible to dynamically give the final pdf a name so that it doesnt overwrite everytime it saves the file?

  • How to replicate data from MS SQL Server  to Oracle

    Hi,
    Can someone please help me on how to replicate data from MS SQL Server to Oracle 8i database.

    Dear,
    I'm a student.
    I do simple replication on Oracle 8.0.5 successfully. (one master site and one snapshot site). I only use the SQL*Plus and Schema Manager to do.
    But when I do advance replication (multimaster replication) I meet many problem. So I don't get the result.
    Do you show me the technology to do that ?
    Thanks !

  • Manipulate data of a SQL SERVER 2000 database

    Problem:
    I need to manipulate data of a SQL SERVER 2000 database that it’s installed in a Windows
    from an oracle 8.1.7 database that is installed in a red hat linux server.
    This access has to be made in a procedure created in this Oracle instance.
    The Solution’s Environment:
    - oracle 8.1.7 database - red hat linux server - ORCL INSTANCE
    - SQL SERVER 2000 version 5.0 database - Windows server - SQLSERV INSTANCE
    - Oracle 8.1.7 database - windows 2000 professional server - HSDB INSTANCE
    We did the following steps:
    1) We installed an oracle database 8.1.7 in the windows 2000 professional.
    The name of this instance is HSDB.
    2) We configured the HSODBC resource in this HSDB instance so as to access the SQLSERVER database.
    3) It was created a database link in the ORCL instance (LINUX) so as to access the oracle HSDB instance
    4) It was created a procedure in the ORCL instance that insert data into the SQLSERVER database using the database link.
    This procedure pass through the following instances:
    ORCL Instance (database link) => HSDB Instance (HS Resource) => SQLSERV Instance
    5) When I execute this simple procedure of the ORCL Instance, the process takes a long time. Although if I run this insert on a SQL Plus, the transaction ends fast. Why it’s happening?
    PROCEDURE PRC_TESTE(P_CD_CMC7 IN VARCHAR2) IS
    BEGIN
    BEGIN
    INSERT INTO VSolicitacaoRetirada@MSSQLDB
    ("CMC7")
    VALUES
    (P_CD_CMC7);
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR '||SQLERRM);
    END;
    COMMIT;
    END;
    Tranks

    I modified the PRC_TESTE procedure and worked fine when I made the following change.
    In spite of using the P_CD_CMC7 parameter on the INSERT command, I included a fixed value. Althoug I can´t use this fixed value. What it can be?
    Example:
    CREATE OR REPLACE PROCEDURE PRC_TESTE(P_CD_CMC7 IN VARCHAR2)
    IS
    BEGIN
    BEGIN
    INSERT INTO VSolicitacaoRetirada@MSSQLDB
    ("CMC7")
    VALUES
    ('123456');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERRO NO INSERT '||SQLERRM);
    END;
    COMMIT;
    END;
    ------------------------------------------------------------

  • Transfering Date field into UNIX server

    Hi,
    I transferring date field to UNIX server from SAP which later read by MAINFRAME system from UNIX server.I would like to transfer the date field with length 5 into Unix server.I tried to transfer using PACK, but packed date is not readable to validate the unix file.Can anybody help me out on this.
    Thanks in Advance,
    Kilaru

    hi,
      For writing the fields into Unix file, they have to character fields.
      to pass a date field, try like this.
    data: v_date(10) type c.
      concatenate sy-datum6(2) sy-datum4(2) sy-datum+0(4) into  v_date separated by '/'.
      now send v_date to unix file.
    Regards,
    Sailaja.

  • How to send data back to the server

    i create a program to send data back to ther server using j2me.
    its work well on emulator but when i install the application on sony ericsssin p910i or k700i or nokia 7710 then its not working and simply hang.
    here is sample code which is run well on emulator but not on mobile.
    what is the problem in that or how can this code run in mobile is there any mobile specific setting or internet setting.
    Pls reply asap.
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    * An example MIDlet to invoke a CGI script.
    public class ThirdExample extends MIDlet {
    private Display display;
    // String url = "http://www.javacourses.com/cgi-bin/getgrade.cgi?idnum=182016";
    String url = "http://sampler.infopro.stpn.soft.net/midletdata.asp?name=name";
    public ThirdExample() {
    display = Display.getDisplay(this);
    * Initialization. Invoked when we activate the MIDlet.
    public void startApp() {
    try {
    getGrade(url);
    } catch (IOException e) {
    System.out.println("IOException " + e);
    e.printStackTrace();
    * Pause, discontinue ....
    public void pauseApp() {
    * Destroy must cleanup everything.
    public void destroyApp(boolean unconditional) {
    * Retrieve a grade....
    void getGrade(String url) throws IOException {
    HttpConnection c = null;
    InputStream is = null;
    OutputStream os = null;
    StringBuffer b = new StringBuffer();
    TextBox t = null;
    int x = 5, y =7;
    try {
    c = (HttpConnection)Connector.open(url);
    c.setRequestMethod(HttpConnection.GET);
    c.setRequestProperty("IF-Modified-Since", "10 Nov 2000 17:29:12 GMT");
    c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Confirguration/CLDC-1.0");
    c.setRequestProperty("Content-Language", "en-CA");
    os = c.openOutputStream();
    String str = "?idnum=182016";
    byte postmsg[] = str.getBytes();
    for(int i=0;i<postmsg.length;i++) {
    os.writeByte(postmsg);
    os.flush();
    is = c.openDataInputStream();
    int ch;
    while ((ch = is.read()) != -1) {
    b.append((char) ch);
    System.out.println((char)ch);
    t = new TextBox("Final Grades", b.toString(), 1024, 0);
    } finally {
    if(is!= null) {
    is.close();
    if(os != null) {
    os.close();
    if(c != null) {
    c.close();
    display.setCurrent(t);
    }>

    i create a program to send data back to ther server using j2me.
    its work well on emulator but when i install the application on sony ericsssin p910i or k700i or nokia 7710 then its not working and simply hang.
    here is sample code which is run well on emulator but not on mobile.
    what is the problem in that or how can this code run in mobile is there any mobile specific setting or internet setting.
    Pls reply asap.
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    * An example MIDlet to invoke a CGI script.
    public class ThirdExample extends MIDlet {
    private Display display;
    // String url = "http://www.javacourses.com/cgi-bin/getgrade.cgi?idnum=182016";
    String url = "http://sampler.infopro.stpn.soft.net/midletdata.asp?name=name";
    public ThirdExample() {
    display = Display.getDisplay(this);
    * Initialization. Invoked when we activate the MIDlet.
    public void startApp() {
    try {
    getGrade(url);
    } catch (IOException e) {
    System.out.println("IOException " + e);
    e.printStackTrace();
    * Pause, discontinue ....
    public void pauseApp() {
    * Destroy must cleanup everything.
    public void destroyApp(boolean unconditional) {
    * Retrieve a grade....
    void getGrade(String url) throws IOException {
    HttpConnection c = null;
    InputStream is = null;
    OutputStream os = null;
    StringBuffer b = new StringBuffer();
    TextBox t = null;
    int x = 5, y =7;
    try {
    c = (HttpConnection)Connector.open(url);
    c.setRequestMethod(HttpConnection.GET);
    c.setRequestProperty("IF-Modified-Since", "10 Nov 2000 17:29:12 GMT");
    c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Confirguration/CLDC-1.0");
    c.setRequestProperty("Content-Language", "en-CA");
    os = c.openOutputStream();
    String str = "?idnum=182016";
    byte postmsg[] = str.getBytes();
    for(int i=0;i<postmsg.length;i++) {
    os.writeByte(postmsg);
    os.flush();
    is = c.openDataInputStream();
    int ch;
    while ((ch = is.read()) != -1) {
    b.append((char) ch);
    System.out.println((char)ch);
    t = new TextBox("Final Grades", b.toString(), 1024, 0);
    } finally {
    if(is!= null) {
    is.close();
    if(os != null) {
    os.close();
    if(c != null) {
    c.close();
    display.setCurrent(t);
    }>

  • How change the Date parameter based on server date

    Hi,
    We are using Query browser to connect to Bex Query.In BEx Query we have a date prompt which is mandatory.So by using Query prompt selector the dashboard has been created.But in our scenario the date has to be picked up from current system date/Server date and it has to change automatically when ever the dashboard has been opened.How to achieve this.
    Regards,
    Venkat

    Using the query prompt selector, the date will be listed in the drop down box. Here you can see only the date available in the server. Use the "Insert selected items" option you can pass the current date using =today() function.
    But the pain behind using the query prompt selector on date you have scroll a lot to search for a specific date, on this case i would suggest you to take the calender component to trigger the query. You have the same flexibility to pass the current date in this component.

  • How to download data to the presentation server in background?

    Hi,
    I would like to download data to the presentation server in background.
    Currently, the report uses FM GUI_DOWNLOAD to download in foreground.
    However, this FM does not work in the background.
    But please let me know how to download to the presentation server in background.
    Thanks and regards,
    Anishur

    Moderator message - FAQ - Please search before asking - post locked
    Rob

  • How to make Date fields Editable or Non-Editable based on Call Staus

    Hi,
    We are using CRM2007 Web GUI for Service call creation. We are using date profile to populate the dates. Here my requirement is if call status is 'Call created' then some set of date fields to be appeared in display mode(Non Editable) and some set of date fields to be appeared in change mode(Editable). How to achieve this. Kindly suggest me.
    Regards,
    Steve

    Hello,
    Kindly check the following thread which is giving many solutions for your requirement:
    Re: how to make field non-editable (display mode)
    Kind regards,
    Nicolas Busson.

  • How to reset Date field

    Hi
    I want to reset the Date field of the form.
    I hava a search cirtaria in that i have the folling fields
    1. Indent No
    2. Start Date      and   End Date:
    when i select Indent No:  the Start and End Date should be null;
    When i select Start Date and End Date the Indent No Should be null.
    When i first select Start Date and End Date select search the data displaying between dates
    one again i select Indent No the Start date and End date will be like that only
    now i want to set Start data and end  Date with null or Empty values.
    and let me know what is the default value of the Date
    regards
    mmukesh

    Hi Mukesh ,
    To set date to null..
    Date d = null;
    wdcontext.<Element>.set<dateAttribute>(d);
    Regards,
    Sunitha

  • How to display date field in ALV in format 'YYYY-MM-DD'?

    Hi experts,
    I am not getting displayed the date field in ALV in the format 'YYYY-MM-DD' if it is different than my user setting's format (DD.MM.YYYY).
    Tried with the edit mask
    LVC_S_FCAT-EDIT_MASK = '____-__-__'  but it does not work.
    I could not find the conversion routine for this. Is it possible to write customer conversion routine?
    I have to use DATE field, otherwise if I display this format in CHAR10 field , sorting in ALV does not work for this field.
    PLEASE ANY HELP!
    Kind regards,
    Danijela

    Hi,
    Use FM FORMAT_DATE_4_OUTPUT.
    TYPE-POOLS : slis, KKBLO.
    TYPES: BEGIN OF t_data,
           sel     TYPE char1,
           matnr   TYPE matnr,
           bldat   type char10,
           END OF t_data.
    DATA: it_tab TYPE STANDARD TABLE OF t_data,
          it_fcat TYPE slis_t_fieldcat_alv.
    DATA: wa_tab TYPE t_data,
          wa_fcat TYPE slis_fieldcat_alv,
          wa_layout type SLIS_LAYOUT_ALV.
    data: lv_repid    TYPE syrepid.
    data : lv_date    type NLEI-IBGDT,
           lv_outdate type RN1DATUM-DATEX,
           lv_format  type RN1DATUM-FORMAT value 'YYYY-MM-DD'.
    lv_repid = sy-repid.
    lv_date = sy-datum.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000001'.
    APPEND wa_tab TO it_tab.
    lv_date = sy-datum + 1.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000002'.
    APPEND wa_tab TO it_tab.
    lv_date = sy-datum + 2.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000003'.
    APPEND wa_tab TO it_tab.
    wa_fcat-fieldname = 'SEL'.
    wa_fcat-ref_fieldname = 'XCHPF'.
    wa_fcat-ref_tabname = 'MARA'.
    wa_fcat-edit = 'X'.
    wa_fcat-checkbox = 'X'.
    APPEND  wa_fcat TO  it_fcat.
    CLEAR :  wa_fcat.
    wa_fcat-fieldname = 'MATNR'.
    wa_fcat-ref_fieldname = 'MATNR'.
    wa_fcat-ref_tabname = 'MARA'.
    APPEND  wa_fcat TO  it_fcat.
    CLEAR :  wa_fcat.
    wa_fcat-fieldname = 'BLDAT'.
    wa_fcat-ref_fieldname = 'BLDAT'.
    wa_fcat-ref_tabname = 'BKPF'.
    APPEND  wa_fcat TO  it_fcat.
    call 'REUSE_ALV_GRID_DISPLAY'' after this
    Edited by: Ankur Parab on Oct 1, 2009 2:50 PM
    Edited by: Ankur Parab on Oct 1, 2009 2:51 PM

  • How to load date field from a remote Oracle DB with DB Connect

    Hi,
    Does any one have experience extracting Date field from a remote Oracle database through DB Connect to BW?  I am experiencing data format issue.  The extracted data shows '04-Oct-0' for '10/4/05'.  It works fine if I create a view in Oracle database to preformat the data to '20051004'.  But, I am not allowed to create view in Remote DB.
    Any suggestion is very appreciated.
    Regards,
    Frank

    You have to change it to a varchar2 field. YYYYMMDD. I do not know of any other option.

  • How to validate date fields in the flash form

    i want to validate the date fields to make sure the values
    are not greater than today's date and from-date is less than or
    equal to to-date in the flash form. Does the actionscript have a CF
    DateDiff function for the validatation?
    Thanks

    I finally (after much reading up on actionscript) figured out
    my problem with date validation...which was similar to yours...
    I posted the solution I found for my AS date validation issue
    here:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=22&threadid=1232361
    I hope it helps!!!

  • How to make date fields in CRMD_ORDER as GRAY (i.e non editable)

    hi Experts,
    i am new to SAP -CRM ,, here i have one queiry related to CRMD_ORDER.
    In my requirement at the time of creating the leases in the CRMD ORDER The date option for Build up period should be grayed out means non editable, and it should be available to amend later means when user want change the order in CRMDORDER it should be editable..
    is it possible in CONFIGURATION level or we need to modify any BADi's..
    please suggest..
    thanks in advance..
    Best regards,
    pradeep.

    Hi Pradeep,
    If u are talking about the date field which are from date pfofile then i date profile u can set the date types as a non-editable (display only) the the user will not able to edit the dates.
    Date Profile->Date Types->Screen Areas: Dates->tick checkbox(only display field)
    Regards,
    DD's

Maybe you are looking for

  • Does Apple have any plans on making an Iphone app to control Logic Pro like Motu has done for Digital performer? They make it for free which is a HUGE plus!

    i was wondering if Apple has any intentions on making an Iphone/Ipad app to remotely control Logic like Motu has for Digital performer. Motu has it available for free which is a huge plus but Id be willing to pay for one if Apple came out with one of

  • Cannot create file "/Applications/ " Permission denied.

    When installing new software Iget the following error message: "Cannot create file "/Applications/ ". Permission denied. I have used disk utilities to try to repair my permissions with no sucsess. I have also tried reinstaling the software. Any advis

  • Help with layout managers

    I can't seem to understand layouts. Or maybe it's text components. Anyway, this little JFrame class seems to act really strangely, and I cannot figure out why. Can anybody tell me how to get pack() to do something sensible with the components in the

  • Why is the video blurry on the iPad2?

    When I watch a video on the iPad2 , using the ABC Player App, uTube app, TV.com app, Netflix  app or just using websites on sky fire, the video will start out crystal clear but will become so blurry that I can't continue to watch, it will occasionall

  • Error in field symbol

    Hi all, i'm converting a field symbol table to internat table, where field symbol table structure is defined at runtime. for that i'm using call method cl_alv_table_create=>create_dynamic_table                exporting                   it_fieldcatal