.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

Find '' in a table in MS SQL SERVER 2008

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :Sql Server


I need to find white spaces in my table. the table contains 35 columns, therefore, I cannot check with AND or OR operator something like this

SELECT * FROM MS_Exchange_IS WHERE (TMZDIFF != ' AND Timestamp != '..........)

Also I don't want to use cursors as it will greatly hamper the performance of my application.

Please suggest any other option.


Any link or pointers would be helpful


Thanks in Advance,


View Complete Post

More Related Resource Links

Under the Table: Programming with FileStreams in SQL Server 2008


There's always been disagreement about whether large blobs, such as document and multimedia items, should be stored in the database or file system. In SQL Server 2008 you don't have to choose; filestream storage provides the best of both approaches.

Bob Beauchemin

MSDN Magazine May 2009

Under The Table: Spatial Data Support In SQL Server 2008


New spatial data support in SQL Server 2008 opens the door to mapping and querying geometric and geographic data, allowing you to build exciting new applications.

Bob Beauchemin

MSDN Magazine February 2009

sql server 2008 Table Partition

HI i want to implement partitioning in my sql server 2008 database table http://blogs.msdn.com/b/manisblog/archive/2009/01/18/easy-table-partitions-with-sql-server-2008.aspx   i have used this link. but when i try this link then i am able to create only primary file group no secondary file group..so help me also by fault i have created partition in wrong table .so i want to detete tha partition from that table but of i delete the PARTITION SCHEME and PARTITION FUNCTION THEN it throws error..so what shoul i do to remove partition from my current table

sql server 2008 Table Partition

HI http://blogs.msdn.com/b/manisblog/archive/2009/01/18/easy-table-partitions-with-sql-server-2008.aspx  i have used  above link to create partition,but my problem is i want to do partition on daily basic, one column in my table is date(by default has getdate()),on the base of this i want to do partition, eg.in this link i need to give time duration between which one can do partition, and also either daily or monthly or quarterly or yearly need to be specify ..if i give date between 01/08/2010 to 01/08/2012 and then select daily wise partition which i am in need then table create more than 700 partion but problem comes when i need to assign group to them how cud i select Primary file group more than 700 times to assign it to each partiotion.it becomes very lengthy process  Please help me

Partitioning a table in SQL Server 2008

Our application has got few tables which has grown to a larger size. Hence one suggestion put forward is to consider table partitioning. Since this does not involve any code changes in the application, we are looking into this option. 1. Is there any disadvantage if we use table partitioning feature 2. Will table partitioning affect the current indexes that exist on the table? 3. Database mirroring is enabled in our schema. Will partitioning have any effect on this? 4. Any suggestion on how we should try this out?  

SQL Server 2008 R2 installation error "Could not find the Database Engine startup handle."



I am unable to install SQL Server 2008 R2 Developer Edition (x86) on my Windows 2008 (32 bit) virtual machine. It fails everytime with "Could not find the Database Engine startup handle." error.

Any pointers?

How to take backup of single table in SQL server 2008 and SQL Server Management Studio Environment



I know how to take total database backup in SQL server 2008 and SQL Server Management Studio Environment but i failed to take single table backup in database.

It is possible to take single table backup in Oracle using PL/SQL Developer IDE.

Thanks in Advance..... 

Inserting XML into SQL Server 2008 table



I'm generating an XML file from front end, I'm using 4 Data Transfer Object classes comprising of full details of a Customer like CustomerPersonalInfoDTO.cs, CustomerLoginInfoDTO.cs, CustomerPreviousAddressDTO.cs, CustomerAddressInfoDTO.cs.

Everything is fine and XML is also generated, But the problem is with SQL Server Stored Procedure. I've created a table Customer with 20 columns.

CustomerPersonalInfoDTO.cs holds 10 customer fields and CustomerLoginInfoDTO.cs holds another 10 customer fields (total =20)..

I now need to insert at a time these 20 FIELDS into SQL server Customer Table. My XML Data will look like the below:

<?xml version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ?> 
- <CustomerDTO>

- <CustomerPersonalInfo>

Can't find CU3 for SQL Server 2008 R2 x64?!


Several MSDN articles points to the existence of a file by the name of "SQLServer2008R2_RTM_CU3_2261464_10_50_1734_x64"

However, I am unable to find the file and am in desperate need of it. We are unable to modify any of our SQL Server Agent Jobs due to the issue here: http://support.microsoft.com/kb/2315727/!!

Here's the link to the CU3 downloads: http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2261464&kbln=en-us

It contains four x64 downloads. The one we need (named above) is not present in the list. This is extremely frustrating!





SQL Server 2008 - Alter Table Switch Statement Fails Where Partition Key Defined as a Persisted Comp


Here's a very annoying and poorly (or undocumented) issue in SQL Server 2008 Ent. Ed. post-SP1, CU8:

When creating a table with a persisted computed column as the clustered primary and partitioning key (see below), where the computation includes a call to CONVERT, watch out for the representation of this calculation on sys.computed_columns.  The query parser will modify the definition at table creation to insert a default style parameter of "(0)", if no other style is specified.  If the original definition did not include any style parameter and you later attempt to programmatically recreate the table using the stored definition contained on sys.computed_columns, the query optimizer will throw an error when you then attempt to switch partitions from the original table into the new programmatically created table, as follows:

Msg 4966, Level 16, State 1, Line 72

ALTER TABLE SWITCH statement failed. Computed column '%' defined as '%' in table %' is different from the same column in table %' defined as '%'.

This is so, eventhough the two definitions are completely functionally equivalent, considering the default value of the style parameter.  This can cause a lot of headaches, because correcting the problem requires dropping and rebuilding the computed column with a definition that include

How can we reindex single table in s sql server 2008?



I have a requirment truncate and reindex the single table,how can we reindex a table?

If we truncate the table,is it necessary to reindex the table(if busines needs).

What is the code for reindex the table in sqlserver2008?




Where can I find my named instance inside SQL server 2008?

I am looking for the connection string on my Visual Basic Program. My problem is I forgot what named instance I gave my SQL server 2008 when I loaded it. Where can I find the NAMED INSTANCE inside my SQL server?

SQL server express 2008 R2 , Could not find the Database Engine startup handle.


when i set the SQL Server database engine to NT AUTHORITY\NETWORK SERVICE the install works correctly but when i set it to NT AUTHORITY\SYSTEM i get a "Could not find the Database Engine startup handle." error , The Database engine services is not installed


The Summary Log File


Overall summary:
  Final result:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
  Exit code (Decimal):           -2061893609
  Exit facility code:            1306
  Exit error code:               23
  Exit message:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
  Start time:               

HOW to write the one insertion Procure for multiple table Records in sql server 2008


i m facing the Proble

i want to insert values into multiple table in one insertion Procedure is it Possible?

see my info

Table name UserPersonal columns

            ([UserRegform_pkID] PK


second table userRegForm columns

            ([UserRegform_pkID] PK

exporting data from table on sql server 2008 to Ms access 2007



i wana know how can i export data from a table  to access through a sql job

i am using sql server 2008 and office 2007




Cannot generate table scripts with DateTime2 datatype in SQL Server 2008


When trying to generate a "CREATE TO" script from a SQL Server 2008 table containing either DATE or DateTime2 data types,  I get the following error:

Script failed for Table 'dbo.tMyTable'.  (Microsoft.SqlServer.Smo)
Column SnapshotDate in object tMyTable contains type DateTime2, which is not supported in the target server version, SQL Server 2005. (Microsoft.SqlServer.Smo)

However, I've checked all my databases (including master, tempdb, etc.) and ALL are cmptlevel=100.


sql server 2008 / cannot enter more data colums in table ??



I am entering data into my table directly using management studio interface.

after I get to ROW 200 in a table, it wont let me enter more rows and the next text column is shaded

with a red warning sign saying I should execute as cell is ready only

when I execute /  the row is deleted so i still can not get above row 200.


any help appreciated!



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