![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
CONVERT() problem
In access query, i can use following expression to show "AnyInteger"
in the format of "0000" CStr(Format(AnyInteger,"0000")) eg: 12 yields to 0012 8 yields to 0008 how should i use CONVERT() function in SQL SERVER to achive my goal please? |
|
|||
|
Re: CONVERT() problem
On Jul 17, 6:54*pm, mezzanine1974 <savas_karadu...@yahoo.com> wrote:
> In access query, i can use following expression to show "AnyInteger" > in the format of "0000" > > CStr(Format(AnyInteger,"0000")) > > eg: > 12 yields to 0012 > 8 yields to 0008 > > how should i use CONVERT() function in SQL SERVER to achive my goal > please? Formation matters only if you want to show them in front end application. Otherwise use Select right('0000'+cast(anyinteger as varchar(4)),4) |
|
|||
|
Re: CONVERT() problem
In a tiered architecture, formatting and display are done in the front
end and not the database. You will need about a year to UN-learn ACCESS (monolithic single user desktop design) and start writing SQL (tiered, multi-user, client server). |
|
|||
|
Re: CONVERT() problem
>> It sounds to me very dramatic <<
No, that estimate of a year of un-learning is based on being involved with the ANSI/ISO Standards, teaching SQL and RDBMS for a few decades, and writing eight books on the topic. "Perfecting oneself is as much unlearning as it is learning." -- Edsger Dijkstra |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|