+ Reply to Thread
Results 1 to 8 of 8

Thread: Compatibility issue between DDS and DDL

  1. #1
    ASR Administrator FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE's Avatar
    Join Date
    Nov 2005
    Location
    Phoenix, AZ
    Age
    47
    Posts
    2,204
    Rep Power
    3277

    Compatibility issue between DDS and DDL

    Is there a Value Compatibility issue between a DDS and DDL?

    I have an Original Table with a DDS FieldA defined as 15a
    I have a new Table with DDL that has FieldA defined as Char(15)

    Both tables are the same layouts (sans a few extra fields in the 2nd table)

    Performing the following errors out:

    Insert Into Table1
    Select * from Table2
    Where Condition = "what I want"

    I get a SQL0408 Error: Value for column or variable FieldA not compatible.



    What gives??
    -Rick

    _____________________________
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes.

  2. #2
    Harbinger of Doom tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden You can't touch this U jr programmer U! tomholden's Avatar
    Join Date
    Dec 2007
    Location
    Lebanon, TN
    Posts
    2,728
    Rep Power
    5935

    Re: Compatibility issue between DDS and DDL

    Quote Originally Posted by FaStOnE View Post
    Is there a Value Compatibility issue between a DDS and DDL?

    I have an Original Table with a DDS FieldA defined as 15a
    I have a new Table with DDL that has FieldA defined as Char(15)

    Both tables are the same layouts (sans a few extra fields in the 2nd table)

    Performing the following errors out:

    Insert Into Table1
    Select * from Table2
    Where Condition = "what I want"

    I get a SQL0408 Error: Value for column or variable FieldA not compatible.



    What gives??
    if table2 has additional columns then you should list the columns from table2 to insert. when you select * you are pulling in all columns in the order they are in the table. for example:

    table1 has fieldA char(15), fieldb char(10) and table2 has fielda char(15), fieldc char(20), fieldb char(10) then select * would try to put table2.fieldc in the table1.fieldb
    clear as mud?
    Experience has it's benefits...unfortunately by the time you acquire it you've forgotten what you needed it for -Tommy Holden

  3. #3
    Admin kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1 You are master of all that is CLLE kitvb1's Avatar
    Join Date
    Aug 2007
    Location
    Trebgast, Germany
    Posts
    1,705
    Rep Power
    2456

    Re: Compatibility issue between DDS and DDL

    Where are these new fields? At the end? or in the middle?
    Regards

    Kit
    www.changefit.com
    (free) Change Management Systems for IT
    (free) Cross Reference Software for IT
    ___________________________________
    "The person who says it can't be done...
    should not interrupt the person doing it!" Chinese proverb

  4. #4
    ASR Administrator FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE's Avatar
    Join Date
    Nov 2005
    Location
    Phoenix, AZ
    Age
    47
    Posts
    2,204
    Rep Power
    3277

    Re: Compatibility issue between DDS and DDL

    Kinda all over the place Kit... I guess I'll just have to identify each field and do a detailed select... ARGH!!
    -Rick

    _____________________________
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes.

  5. #5
    Debug Junkie Denny You can get points if you post more! Denny You can get points if you post more! Denny You can get points if you post more! Denny You can get points if you post more! Denny You can get points if you post more! Denny You can get points if you post more! Denny You can get points if you post more! Denny You can get points if you post more! Denny You can get points if you post more! Denny You can get points if you post more! Denny You can get points if you post more! Denny's Avatar
    Join Date
    Feb 2004
    Location
    Gainesville, GA USA
    Age
    64
    Posts
    165
    Rep Power
    787

    Re: Compatibility issue between DDS and DDL

    Why don't you just use CPYF ... FMTOPT(*MAP)
    Denny

    If authority was mass, stupidity would be gravity.

  6. #6
    Experienced Forum Member MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA. MichaelCatalani If you were taller I'd think you were YODA.
    Join Date
    Aug 2008
    Location
    Memphis, TN
    Posts
    707
    Rep Power
    1914

    Re: Compatibility issue between DDS and DDL

    You could also use a cursor, specify data structures for each file, and do an eval-corr. This way, you would let the smart language (RPG) handle field mapping.
    Michael Catalani
    www.ProvatoSys.com

  7. #7
    Analyst B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ! B.Hauser I'll kick a Rocky's  AZZ!
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    919
    Rep Power
    5860

    Re: Compatibility issue between DDS and DDL

    If it is no one shot, you may also create a view built over the file with the greater number of rows, with all columns in the same sequence as in the other file.
    Then execute

    PHP Code:
    insert into myFile2
    as (select from MyView1); 
    Birgitta

  8. #8
    ASR Administrator FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE You are master of all that is CLLE FaStOnE's Avatar
    Join Date
    Nov 2005
    Location
    Phoenix, AZ
    Age
    47
    Posts
    2,204
    Rep Power
    3277

    Re: Compatibility issue between DDS and DDL

    I ended up doing what Michael was eluding to. Loop through the Header ... EVAL-CORR the values and Insert the DS into the Target Table. It actually ended up being the correct way to do things as I had a few other steps to perform at the same time... all things are good.

    Thanks for the feedback...
    -Rick

    _____________________________
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes.

+ Reply to Thread

Similar Threads

  1. Unique issue
    By eddie_b in forum DDS
    Replies: 7
    Last Post: December 2nd, 2009, 02:12 PM
  2. %KDS issue.... not really.
    By rpgdude in forum RPG/RPGLE
    Replies: 4
    Last Post: September 1st, 2009, 01:21 PM
  3. Re: hi all ftp issue..
    By pramendra in forum ANY THING GOES
    Replies: 7
    Last Post: July 17th, 2009, 10:55 AM
  4. SQL Wildcard Issue
    By violinsoundcool in forum SQL
    Replies: 23
    Last Post: August 8th, 2008, 07:52 AM
  5. Replies: 4
    Last Post: August 2nd, 2006, 10:58 PM

Bookmarks

Bookmarks

Posting Permissions

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