Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / October 2003

Tip: Looking for answers? Try searching our database.

Format function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bryan - 06 Sep 2003 22:30 GMT
I see the format function is not supported with SQL . Is
there a equivilant I can use.

e.g.
[integer datatype]

format(employee_number,"000000") so all employee numbers
display in a 6 digit length

052365
002563
000235

instead of

52365
2563
235

thanks folks
Jens S??meyer - 07 Sep 2003 00:40 GMT
Hi Brian !

Try this:

RIGHT("000000"+convert(varchar, NAME_OF_COLUMN), 6)

HTH, Jens S??meyer.

> I see the format function is not supported with SQL . Is
> there a equivilant I can use.
[quoted text clipped - 16 lines]
>
> thanks folks
Bryan - 08 Sep 2003 08:59 GMT
Thanks. I will give it a try.

>-----Original Message-----
>Hi Brian !
[quoted text clipped - 27 lines]
>
>.
Samuel - 15 Oct 2003 07:56 GMT
can make your MyFormat :

ALTER   FUNCTION MyFormat (@strFormat nvarchar(255), @StrOrigen
nvarchar(255))
RETURNS nvarchar(255)
AS
 BEGIN
    RETURN  SUBSTRING ( @strFormat , 1 , Len(@strFormat) - Len(@StrOrigen))
+ @strOrigen
 END

> Hi Brian !
>
[quoted text clipped - 24 lines]
> >
> > thanks folks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.