Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11

    Unanswered: character column and '

    I remember from SLQ/DS 1.1.5 that it was possible to select data from a char column, that kept only digits, to say :
    select * from table where col=123456
    after that this was removed, to keep a kind of standard
    char col : col='123456'
    num col : col=123

    in 9.5fp8 db2 ese on linux this again is allowed

    (0)[db2inst1@dlx00003 DEV]$ db2 "select ssin,newfirst,newfirst2,newfirst3,newname from register.new_name_info where ssin =89071742513 "

    SSIN NEWFIRST NEWFIRST2 NEWFIRST3 NEWNAME
    ----------- ------------------------------------------------ ------------------------------------------------ ------------------------------------------------ ------------------------------------------------
    xxxx (not displayed for privacy)
    1 record(s) selected.

    (0)[db2inst1@dlx00003 DEV]$ db2 "select ssin,newfirst,newfirst2,newfirst3,newname from register.new_name_info where ssin ='89071742513' "
    same row is displayed
    is this correct as it should be ?
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Yes, DB2, especially starting with 9.7, now does implicit casting of data types in a lot more places than before.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    Thanks for the update Nick..
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Posting Permissions

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