Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Carriage Return

Author  Topic 

mikebird
Aged Yak Warrior

529 Posts

Posted - 2009-06-25 : 04:23:37
Can you tell me the code for a carriage return? I think I've used it before, but forgotten the syntax or number.... something like CHR(xx) ?

Maybe 32 ?

It let me format a display field just right

Thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-06-25 : 04:26:24
CHAR(13)


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-06-25 : 04:27:51
10 = line feed --> char(10)
13 = carriage return --> char(13)

Webfred



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-06-25 : 04:28:58
It is always KH


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

mikebird
Aged Yak Warrior

529 Posts

Posted - 2009-06-25 : 04:32:27
That's MAGIC!!
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-06-25 : 04:35:51
quote:
Originally posted by mikebird

That's MAGIC!!


And 32 is space!
Look in google for ascii table.
char(65) would give you 'A'.

Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-06-25 : 04:40:15
quote:
Originally posted by webfred

It is always KH


No, you're never too old to Yak'n'Roll if you're too young to die.



sometimes

Knowing ASCII code like at the back of your hand does show ones age .


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-06-25 : 04:45:46
select number,char(number) from master..spt_values
where type='p' and number<256 order by number

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -