Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011
    Posts
    2

    Unanswered: Build Query Result

    Hi,

    Im tring to build a custum field query without sucess.
    Here is the problem, i have two fields that have to concatenate in order to have a result with difined size.

    E.g

    integer x = 1234
    varchar(10) y= "hithere"

    The result must be x + y = "001234000hithere"

    For start if i try NVL(REPLACE(x[1,6]," ","0"),"000000") it dosent work for Integer.
    If i aplly it to the y: NVL(REPLACE(y[1,10]," ","0"),"0000000000") the result will be "hithere000".

    Any one can help?

  2. #2
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    381
    Provided Answers: 1
    hum,

    hardly readable ( therefore hardly maintainable ) query ....

    why don't you try to build a stored procedure,
    where you can handle strings more easily than within the very query ?
    You won't be affected by loss of performance, and your code can be much more
    versatile and debuggable...

    Eric

Tags for this Thread

Posting Permissions

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