Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011
    Posts
    13

    Unanswered: Oledb source query through expression

    Hi

    I am putting the below query in a OLEDB SOURCE through a variable (it is a select statement with a where clause from one date to another).

    I am getting through this expression. Can you have a check on it please.I dont know whats is wrong with this expression


    "select TestRecordtype, request_id from department

    where LOAD_TMSTP between
    (select max(END_TMSTP) LOG) and
    (TO_DATE("+RIGHT("0" + (DT_STR,4,1252)DATEPART( "dd" , @[System:tartTime] ), 2) + "-"
    +RIGHT("0" + (DT_STR,4,1252)DATEPART( "mm" , @[System:tartTime] ), 2) + "-"
    +RIGHT("0" + (DT_STR,4,1252)DATEPART( "yy" , @[System:tartTime] ), 2) + " "
    +RIGHT("0" + (DT_STR,4,1252)DATEPART( "hh" , @[System:tartTime] ), 2) + "."
    +RIGHT("0" + (DT_STR,4,1252)DATEPART( "mi" , @[System:tartTime] ), 2) + "."
    +RIGHT("0" + (DT_STR,4,1252)DATEPART( "ss" , @[System:tartTime] ), 2) +",'DD-MM-YY HH24.MI.SS')) "

    Thanks

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    TO_DATE is an Oracle function. Should this be posted in the Oracle forum (with the actual error message)?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •