Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in SQL Server only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
SQL Server
Zerofill
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
sonia.sardana
New Member
Join Date:
Jul 2006
Posts:
95
#1
Zerofill
Feb 17 '08, 07:12 PM
Hi frnds, I want to know that zerofill is a valid function in SQL or not....
ck9663
Recognized Expert
Specialist
Join Date:
Jun 2007
Posts:
2878
#2
Feb 18 '08, 01:36 AM
I think that's a MySQL function. If that's a function that left-pad the value with '0', you can still re-create it in sql-server. Something like:
Code:
SELECT right('0000000000' + rtrim(ltrim(cast(@myInt as varchar(10))),10)
-- CK
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment