Skip to content

SELECT RIGHT('00000'+ CONVERT(VARCHAR,Num),6) AS NUM FROM Numbers #588

Closed

Description

@MarioVanDenEijnde

Hello ALASQL team,

Can we achieve something like below:

SELECT RIGHT('00000'+ CONVERT(VARCHAR,Num),6) AS NUM FROM Numbers

Kind regards,
Mario

Activity

  1. agershun commented on Feb 4, 2016

    @agershun
    Member

    You can try:

    SELECT ('00000'+ CONVERT(VARCHAR,Num))->substr(-6) AS NUM FROM Numbers
    

    I think you are right and we need to add RIGHT() and LEFT() string functions...

  2. mathiasrw commented on Feb 5, 2016

    @mathiasrw
    Member

    I created a new issue and im closing this one. Please reopen if this did not solve your question :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions