User Profile

Collapse

Profile Sidebar

Collapse
raysefo
raysefo
Last Activity: Jun 22 '07, 08:58 AM
Joined: Jan 21 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • raysefo
    started a topic Where Statement?
    in DB2

    Where Statement?

    Hi,

    I have a varchar field and in this field there may be chars like 'A','C' etc. or strings like "A-C", "A,C,H" etc or just decimal numbers like '0.4','4.2'.

    What i want to do is, just check for decimal numbers and which are bigger than 4.0.?

    here what i wrote but gives error:

    ...

    where left(RESULT,1) not between 'A' and 'Z' AND
    DECIMAL(SONUC) >=...
    See more | Go to post

  • raysefo
    started a topic Common Table Expressions (Cte) ON db2
    in DB2

    Common Table Expressions (Cte) ON db2

    Hi,

    ID NAME PARENTID
    1 ABC
    2 Sales 1
    3 Avdertisement 2
    4 Accounting 1
    5 DEF
    ...

    Select name from [mytable] where ID = 1

    if ID = 1 than NAME is ABC
    if ID = 2 than NAME is ABC/Sales
    if ID = 3 than NAME is ABC/Sales/Advertisement
    if ID = 4 than NAME is ABC/Accounting
    and
    if ID = 5 than NAME is DEF

    How can i do a...
    See more | Go to post

  • raysefo
    started a topic 42610 Invalid use of a parameter marker ?
    in DB2

    42610 Invalid use of a parameter marker ?

    Hi,

    I have a select statement below which gives "AbtError: rc=-1 for '42610' in
    an AbtIbmCliCSData baseConnection at (29.01.2007 15:43:13)
    '[SQLSTATE=42610 - [IBM][CLI Driver][DB2/NT] SQL0418N A statement contains
    a use of a parameter marker that is not valid. SQLSTATE=42610 [Native
    Error=-418]]" error when i put it into multirow query. I guess its beacause
    of variables beside the...
    See more | Go to post

  • raysefo
    started a topic coalesce?
    in DB2

    coalesce?

    Hi,

    I m trying to use coalesce but i m getting this error below, btw i m using db2 8.2.
    what i m doing is;
    ...
    where eh.toblm = coalesce(NULL,e h.toblm)

    SQL0206N "NULL " is not valid in the context where it is used.

    Actually what i want to do is, get the result of this select statement either @id is NOT NULL or NULL! if @id is NULL then all results should be displayed!...
    See more | Go to post
No activity results to display
Show More
Working...