Re: Access Format Equivalent

From: Rohtash Kapoor (rohtash_nospam_at_sqlmantra.com)
Date: 06/14/04

  • Next message: anonymous_at_discussions.microsoft.com: "Re: Access Format Equivalent"
    Date: Sun, 13 Jun 2004 20:03:44 -0700
    
    

    CREATE TABLE #Temp
    (
       Employee CHAR(6)
    )

    INSERT INTO #Temp VALUES ('1')
    INSERT INTO #Temp VALUES ('12')
    INSERT INTO #Temp VALUES ('123')
    INSERT INTO #Temp VALUES ('1234')
    INSERT INTO #Temp VALUES ('12345')

    SELECT * FROM #Temp

    SELECT REVERSE(LEFT(LTRIM(REVERSE('000000'+ Employee)),6))
    FROM #Temp

    ---
    Rohtash Kapoor
    http://www.sqlmantra.com
    "Bryan" <anonymous@discussions.microsoft.com> wrote in message
    news:1c02d01c45186$9f7810d0$a001280a@phx.gbl...
    > Hello:
    >
    > What would the equivalent syntax be to format the
    > following in SQL as can be done in Access.
    >
    > Format("000000",employee) to return 012345 from 12345
    >
    

  • Next message: anonymous_at_discussions.microsoft.com: "Re: Access Format Equivalent"

    Relevant Pages

    • Re: Adding a new file extension for Pipe Delimited files
      ... Dim Temp As String ... Dim FileNumber As Long ... open and handle like CSV files? ... allow me to keep the pipe delimited format. ...
      (microsoft.public.excel.programming)
    • Temp Database problems with Access 2007
      ... I've been using Tony Toew's Temp table module and I've now upgraded to ... The database is still in 2003 format. ... ' This subroutine illustrates how to use a temporary MDB in your app. ...
      (comp.databases.ms-access)
    • Re: Best way to import text file into existing table on a daily ba
      ... file, temp table, and permanent table). ... table's field when you run an append query that appends that data item into ... If you need the input mask's format applied to the data for the ...
      (microsoft.public.access.externaldata)
    • Re: This is weird: Pop works but shift doesnt
      ... >> I'm parsing a log file that contains this format: ... >> push @temp, $time; ...
      (perl.beginners)
    • Re: converting to FLOATING_POINT..
      ... Then, the max widths for each column are used in the sprintf function, (which uses a '*' as a placeholder, if thats an accurate term for the ... push @temp, $temp; # incorrect ... The format should be applied at this point so that that when the max_length is calculated below, the width of each $time and $temp variable will be as it will be when printed out. ...
      (perl.beginners)