Professional Web Applications Themes

ELF function ? - IBM DB2

Hi, my application uses the ELF function of MySql. How can I use that in DB2? Zsolt...

  1. #1

    Default ELF function ?

    Hi,

    my application uses the ELF function of MySql. How can I use that in DB2?

    Zsolt


    Zsolt Guest

  2. #2

    Default Re: ELF function ?

    "Zsolt Koppany" <com> wrote in message
    news:bm5fie$hs4$01$t-online.com... 
    For those who don't know what ELF is, maybe you can explain it and then
    someone can figure out how to do that in DB2.


    Mark Guest

  3. #3

    Default Re: ELF function ?

    What's "ELF"?


    Zsolt Koppany wrote:
     

    Larry Guest

  4. #4

    Default Re: ELF function ?

    Sorry,

    I mistyped it, it is ELT.

    Zsolt


    "Larry Edelstein" <com> schrieb im Newsbeitrag
    news:com... [/ref]
    DB2? 
    >[/ref]


    Zsolt Guest

  5. #5

    Default Re: ELF function ?

    Zsolt Koppany <com> wrote:
     

    From what I gather in the MySQL doentation, a simple CASE expression will
    do the job. Here is what I found:

    ELT(N,str1,str2,str3,...)
    Returns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is less
    than 1 or greater than the number of arguments. ELT() is the complement of
    FIELD():
    mysql> SELECT ELT(1, 'ej', 'Heja', 'hej', 'foo');
    -> 'ej'
    mysql> SELECT ELT(4, 'ej', 'Heja', 'hej', 'foo');
    -> 'foo'


    I would implement this in DB2 (and standard SQL) like this:

    CASE n
    WHEN 1 THEN str1
    WHEN 2 THEN str2
    WHEN 3 THEN str3
    ELSE NULL
    END

    --
    Knut Stolze
    Information Integration
    IBM Germany / University of Jena
    Knut Guest

Similar Threads

  1. Replies: 3
    Last Post: March 19th, 07:59 PM
  2. #25866 [NEW]: Using error_reporting() function don't change output of phpinfo() function
    By sfournier at dmsolutions dot ca in forum PHP Development
    Replies: 0
    Last Post: October 14th, 04:26 PM
  3. note 33714 added to function.register-tick-function
    By icy2@bol.com.br in forum PHP Notes
    Replies: 0
    Last Post: July 4th, 06:21 PM
  4. note 33575 added to function.register-shutdown-function
    By jules@sitepointAASASZZ.com in forum PHP Notes
    Replies: 0
    Last Post: July 1st, 05:41 AM
  5. Replies: 0
    Last Post: July 1st, 12:31 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139