US and Worldwide: +1 (866) 660-7555
Results 1 to 10 of 10

Thread: String replace function on MsAccess showing error in pentaho

  1. #1

    Default String replace function on MsAccess showing error in pentaho

    Hi,
    I was trying to use replace function in access and it is successful. But when using the same syntax in pentaho component it is showing error about replace function. why???????? How to rectify this?
    Thanks,
    Sri

  2. #2
    Join Date
    Apr 2008
    Posts
    801

    Default

    Which step do you use?
    What are you replacing?

    Mick

  3. #3

    Default

    Hi Mick,
    Iam having some tables in an access database file..And i executed a query and it is succeessful.
    Ex: select replace(first_name,"ss","d") from table1;
    Here first_name is a col in table1 which contains some data. I just want to replace 'ss' with 'd' in the data for every row.
    In access it is successful. but when iam using the same query, to output data to afile it is showing error invalid function 'replace' in query.

    Please help me in resolving this.....
    Quote Originally Posted by Mick_data View Post
    Which step do you use?
    What are you replacing?

    Mick
    Thanks,
    Sri

  4. #4
    Join Date
    Apr 2008
    Posts
    801

    Default

    That's because you should use the Table Input step to retrieve data, not to change data.
    I would create a transformation with:
    Table Input (read data)
    Replace in strin (modify data)
    Table Output (write data back to DB)

    Mick

  5. #5

    Default

    Thanks Mick,
    I was using Table input step only... But can we define replace directly in the input component query instead of placing another "replace in strin" component

    Quote Originally Posted by Mick_data View Post
    That's because you should use the Table Input step to retrieve data, not to change data.
    I would create a transformation with:
    Table Input (read data)
    Replace in strin (modify data)
    Table Output (write data back to DB)

    Mick
    Thanks,
    Sri

  6. #6
    Join Date
    Jun 2012
    Posts
    1,444

    Default

    The MS Access ODBC driver supports a dialect called JetSQL.
    MS Access functions are generally not supported.
    pdi-ce-4.3.0-stable
    OpenJDK IcedTea 2.3.7 (7u21)
    ubuntu 12.04 LTS (x86_64)

  7. #7
    Join Date
    Apr 2008
    Posts
    801

    Default

    I think that you are using the wrong tool if all you need is to do a serach and replace in MS Access.

    Mick

  8. #8
    Join Date
    Jun 2012
    Posts
    1,444

    Default

    Mick, all he wants is a computed field, I think...
    pdi-ce-4.3.0-stable
    OpenJDK IcedTea 2.3.7 (7u21)
    ubuntu 12.04 LTS (x86_64)

  9. #9

    Default

    Thanks marabu...
    You have given me the answer which i required..
    Quote Originally Posted by marabu View Post
    The MS Access ODBC driver supports a dialect called JetSQL.
    MS Access functions are generally not supported.
    Thanks,
    Sri

  10. #10

    Default

    Thanks Mick...
    I just decribed my thread in a general way..Any way thanks for ur help at #4..
    Quote Originally Posted by Mick_data View Post
    I think that you are using the wrong tool if all you need is to do a serach and replace in MS Access.

    Mick
    Thanks,
    Sri

Posting Permissions

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