.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Text Alignment in SQL server

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :


Is it possible to align the resultset of SQL query in center place.

If yes means , can you plz send teh SQL code.



View Complete Post

More Related Resource Links

Read a text file on another server from a web page

How do I read/write a text file on another server from a web page. I get the error "Access to the path '//Server2/mydatafiles/test.txt' is denied". I do not get the error if I am running the browser on the server where the files exist. I think I need to set permissions on the destination server in some way.   Can you help? Thanks  

How to create a SSIS package to import records form SQl Server 2008 tables to text files

I am a newbie to SSIS and would like to create a package to accomplish the task referenced in the above title. Will appreciate any links and pointers in the right direction.   Thanksakoranteng

When I click on a TextBox the text moves a little bit for Vertical Alignment

I have a Grid of text boxes defined in the XAML using the following code:         <Border Grid.Row="2" Grid.Column="11" Style="{StaticResource BorderStyleContent}" >             <TextBox Text="-15.11" Style="{StaticResource EditableTextBox}"/>         </Border> The styles are defined below:         <Style x:Key="BorderStyleContent" TargetType="Border">             <Setter Property="BorderBrush" Value="Black"/>             <Setter Property="BorderThickness" Value="1"/>             <Setter Property="Padding" Value="2"/>             <Setter Property="SnapsToDevicePixels" Value="True"/>         </Style>         <Style x:Key="EditableTextBox" TargetType="TextBox">         &nb

Convert Text to Numeric in reports generated by Microsoft SQL Server 2000

Our programming team is producing Excel reports using Microsoft SQL Server 2000 and cannot seem to find a way to produce numeric data as numeric.  It is being produced in the spread sheet as text (with the green triangle in the corner of the cell).  If the user viewing the report has an older version of Excel they cannot even convert it to numeric manually. 

Is there a way to produce numeric data as numeric in the Excel report?

reading text file using sql server 2000 , 2008



can any one tell me how to read the data's in the text file using sql server 2000 and 2008.

i have a text file in a server and it contains one column name with the multiple column values i need to read that informations and i need to update in a table in the database.

how can we do this.



Moving full-text catalog from one server to another using backup / restore


Dear Sirs,
I'm having a problem with Full-Text Catalog in SQL SERVER 2005.
The problem is: I did a backup of a database that has a full-text catalog from one server and restored on another server.
The restore worked perfectly, but the catalog is down because it is pointing to the physical path from the source server.
To recover this full-text catalog I tried the commands below:

use master

sp_detach_db 'SiteEng2004'

(FILENAME = 'D:\SQL SERVER\DADOS\SiteEng2004\SiteEng2004_Data.MDF'),
(FILENAME = 'E:\SQL SERVER\LOGS\SiteEng2004\SiteEng2004_Log.LDF'),

Unfortunately it did not work and the following error message occurs :

Msg 5120, Level 16, State 101, Line 2
Unable to open the physical file "D:\SQL SERVER\DADOS\SiteEng2004". Operating system error 5: "5(error not found)".

Could anyone help me on what I should do to restore this full-text catalog on the destination server ?
Thanks in advance.

Masked text box text alignment


Hi All,


I have an issue which smells like a culture issue, but I can't find any difference in the language/region settings.


I have a windows forms application using masked edit text boxes to display comma separated numbers. The boxes' RightToLeft property is set to 'Yes' and the TextAlign property is set to 'Left'. This is so that the mask is aligned to the right, and when focus moves to that edit box the cursor is at the far right and the number expands to the left as you type.


When I package the app up and deploy it, the mask is still aligned to the right, but the cursor goes to the left-most position, and the number expands to the right as you type.


This looks like an environment problem to me, but I can't see anything in the language and regional settings on my test box that's different from my development machines.


Any ideas?



Enable Full Text Index in VWD 2008 / SQL Server Express 2008


 Hi, I am using VWD 2008 Express and SQL Server 2008 Express. I want to enable full text index in some of my table. How do I do that? I only have  SQL Server Management Studio Express 2008. As far as I know, I cannot use SQL Server Management Studio Express 2008 to update the full text catalog according to : http://msdn.microsoft.com/en-us/library/ms365247.aspx

My tables are also not enable Full Text Search by default. 


 Any help would be very much appreciated!

 Edit 1: Someone had a similar problem to mine on this link: http://forums.asp.net/t/1169961.aspx
I installed the Sql Server 2008 Express with Advance Services and made sure that Full Text functionality is installed. However I don't get a full text menu in SQL Server Management Studio. 

 Edit 2: I uninstall and reinstall SQL Server 2008 Express with Advance Services but still couldn't be able to enable full text index.

 Edit 3: After see this, I guess I have to do it manually then:  http://forums.microsoft.com/MSDN/ShowPost.aspx?siteid=1&PostID=3912985

Windows Server 2008 + IE 8 + Text File


Hi  friends i am using VS 2008. My Problem is in Report Spooling. I will read some textfile(Notepad file) from particular folder, it will be good in( IE 6 & Windows XP), when i run same in windows server 2008 & IE 8 its not working alignment is mismatching in WS 2008.

When i read textfile using Solutions its working fine & reading text file using Publish Url its not working, alignment mismatches,

Help me!

Thanks in Advance

sql server how to insert text with syntax words and single quotation?

i would like to insert text in sql server that contains words like select and a single quotation mark but sql server gives errors like if i wanna insert this :

1. Move the cursor to cell A1.
2. Click in the formula area of the Formula bar.
3. Use the backspace key to erase the 's,' 'e,' and "n.'
4. Type ker.
5. Press Enter.

it gives error about the 'use' word and any other word that might be a command or a syntax


How to align the text in justify format with SQL Server Reporting Services?



        How to align the text in justify format In SQL server Reporting Services? Is there any code to do so?

Text box Properties / Action and url calling a file:\\ SQL Server 2008 R2



I have installed the new version of sql server 2008 r2.  It looks like it does not support file:\\ in the url only http, https, ftp, mailto and news.  I need to use file:\\dir\filename.ext any idea of how to do this.


Thank you again



How to move the SQL Server SQLFT log files created by the full text catalog process.


I need to move the location of the SQLFT text log files from it's current location %ProgramFiles%\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\LOG folder to another larger drive to accomodate the log file growth.  I cannot find anything on how to make this change.  Does anyone have an answer?  I have found this is a default at install - but during install did not find how to change this. 

Thank you.



Text node containing processing instructions and comments is broken by SQL Server?


Hello, I'm adding xml documents to a typed xml column in SQL Server 10.0.1600. In the document I have text nodes with processing instructions and comments. For some reason these are moved from the middle of the text (between to CDATA nodes) to in front of them; in other words this:

<a:e>Some <?antin oma pi?> text<!-- antin kommentti --></a:e>

becomes this:

  <?antin oma pi?>
  <!-- antin kommentti -->Some  text</a:e>

What am I doing wrong?! A configuration issue? A limitation in the SQL Server? A bug? A known bug? Is there a workaround?


PS. The behaviour can be repeated with this minimalistic test case:


USE SampleDB

N'<?xml version="1.0" encoding="UTF-16"?>
<xs:schema targetNamespace="http://www.index.fi/a"
   xmlns:xs="http://www.w3.org/2001/XMLSchema" >
    <xs:element name="e" type="OtsikkoTyyppi"/>
    <xs:complexType name="OtsikkoTyyppi">

How to create hyperlink with text data in sql server


How do we get hyperlink from text data in sql server?



Text on buttons appears fine on Windows 7 machine but is partially chopped off on Windows Server 200


I have an application that was developed in Visual Studio 2010 on a Windows 7 machine. When testing from any Windows 7 machine, all is well - the text of the buttons are showing fine. However, when I try to run the same application on a Windows Server 2008 machine, the end of the text (right side) is chopped off. Does anyone what may cause this?

I have done research and found some info about default fonts, but this does not apply here because all needed fonts are on both machines. I have also found an article at http://msdn.microsoft.com/en-us/library/bb756969.aspx that mentions that the DPI scaling may be causing this issue. The DPI scaling is set to 96 on the development machines (WIndows 7), but I cannot view the DPI on the WIndows Server 2008 machine. If the latter is the likely problem, can someone please point me towards a solution for this problem?

Any help would be appreciated.

Serialization using SQL server or storing a table object as text in a text column



I have a requirement in SQL server 2008 as follows:

I need to Insert into a particular table say Output at runtime where one of the columns (Content) of type text should contain an object of another table (Audit). This is currently being done through C# by serializing the Audit table and updating the Content with the serialized value. But this needs to be done in SQL now as per the requirement.

Can this be done by creating an object of Audit and storing in Output.Content in SQL itself?

Thanks in advance for the help.




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend