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.
| Author |
Topic |
|
exorbitant
Starting Member
17 Posts |
Posted - 2008-12-23 : 05:21:20
|
| Hi all,I am trying to format data extracted from query. my query is something like thisselect column1 + column2 as data from table1I want some spaces between both of the columns but it should be aligned. mean if i define some spaces in query like this:select column1 + ' ' + cloumn2 as data from table1then the result is not aligned and result of query is like this:1 Name12 Name210 Name3110 Name41110 Name5but i want something like this1 Name12 Name210 Name3110 Name41110 Name5how can i do this? thanks in advance... |
|
|
darkdusky
Aged Yak Warrior
591 Posts |
Posted - 2008-12-23 : 05:51:56
|
| Are you formatting in SQL Server Query window or somewhere else like a webpage etc? |
 |
|
|
exorbitant
Starting Member
17 Posts |
Posted - 2008-12-23 : 06:07:33
|
| hii don't know why the text in my post is not displaying well. i want records like this1 Name12 Name210 Name3110 Name41110 Name5i don't know whether its going to be displayed well or not. i think i should explain what i want exactly that Name1, Name2, Name3, Name4, Name5 are right aligned |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-12-24 : 04:38:22
|
quote: Originally posted by exorbitant hii don't know why the text in my post is not displaying well. i want records like this1 Name12 Name210 Name3110 Name41110 Name5i don't know whether its going to be displayed well or not. i think i should explain what i want exactly that Name1, Name2, Name3, Name4, Name5 are right aligned
This is formation issue. Do this in your front end application. To post formatted text here use code tags [ CODE ]...[/ CODE ] without spacesMadhivananFailing to plan is Planning to fail |
 |
|
|
exorbitant
Starting Member
17 Posts |
Posted - 2008-12-24 : 06:41:01
|
quote: Originally posted by madhivanan
quote: Originally posted by exorbitant hii don't know why the text in my post is not displaying well. i want records like this[Code]1 Name12 Name210 Name3110 Name41110 Name5[/Code]i don't know whether its going to be displayed well or not. i think i should explain what i want exactly that Name1, Name2, Name3, Name4, Name5 are right aligned
This is formation issue. Do this in your front end application. To post formatted text here use code tags [ CODE ]...[/ CODE ] without spacesMadhivananFailing to plan is Planning to fail
OK thanks a lot. |
 |
|
|
|
|
|
|
|