Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2011
    Posts
    6

    Unanswered: Removing leading and Trailing spaces

    For one of the requirements, I had to load 2 flatfiles into 2 temp tables..

    the file had 10 columns

    I loaded 2 files of the same structure and almost same data in 2 different temp tables( (did a ltrim,rtrim before loading them into temp tables)

    Now when i reimport the same tables and use one of the table as lookup table with the join condition(which includes all columns from source and lookup)

    it doesnt return any records meaning there is some mismatch or some spaces/junk characters in the table

    How do i correct this??? please help

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Your problem statement is equivalent to the following.
    My car won't go.
    Tell me how to make my car go.

    You have tables & DDL. We don't
    You have data & DML. We don't.
    You have code. We don't.
    You have requirements. We don't.

    You have ALL the information & can't debug the problem.
    Why do you expect others, who have NO details, to solve your mystery?

    I would not be surprised if CHAR datatype is involved.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jun 2011
    Posts
    6
    I believe its a simple straight forward question..Dont know why you need DMLS,DDLS...

    I have loaded text data into a table and despite using trim functions, I see some disconnect...But anyways, thanks for the prompt reply.

  4. #4
    Join Date
    Feb 2005
    Posts
    57
    as anacedent says...
    we don't know the column datatypes - CHAR or VARCHAR2?
    you haven't shown us any data - we can't confirm if there are leading/trailing spaces!

    SELECT ''''||column_name||'''' from table_name;

    this should reveal whether there are leading/trailing spaces or not.

    we don't know if the problem is in the source or lookup data!

    give some more clues and someone might be able to help.

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I believe its a simple straight forward question..Dont know why you need DMLS,DDLS...
    >I have loaded text data into a table and despite using trim functions,
    >I see some disconnect...But anyways, thanks for the prompt reply.

    we don't see anything since you refuse to post any specific details.
    If situation is so straight forward, why do you require assistance?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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