Substring'ing a Number-field

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mirador

    Substring'ing a Number-field

    Hi :) and thanx for reading my post.

    I have to create a view based on a character in a number-field (fnr)
    which is 11 char's long. I have to get character nr "7".

    The problem is that i cannot use :

    --> SELECT fnr FROM table WHERE substring(fnr,7 ,1)
    since it's not a string.

    Any other way i can solve this ? Would be greatly and insanely happy if
    anyone could help me out with a sample code or something.!



    Best regards
    Mirador


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • David Portas

    #2
    Re: Substring'ing a Number-field

    SELECT fnr
    FROM Sometable
    WHERE SUBSTRING(CAST( fnr AS VARCHAR),7,1) = ?

    --
    David Portas
    ------------
    Please reply only to the newsgroup
    --


    Comment

    Working...