.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

Need help to search for extra space in all tables.

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :Sql Server
Hi, I try to search for data which has some extra spaces in ALL TABLES. Does any one know if there a tool that can do that or the scripts can return all the data (see desire results below). Thank you in advance.  SQL2008. IF OBJECT_ID('Tempdb.dbo.#T1', 'u') IS NOT NULL   DROP TABLE #T1 GO CREATE TABLE #T1 (   FullName   VARCHAR(30) ) GO INSERT INTO #T1 VALUES ('Joe  Smith') INSERT INTO #T1 VALUES ('April Smith ') INSERT INTO #T1 VALUES ('Peter Chen') INSERT INTO #T1 VALUES ('Kristine Nguyen') GO IF OBJECT_ID('Tempdb.dbo.#T2', 'u') IS NOT NULL   DROP TABLE #T2 GO CREATE TABLE #T2 (   FullName   VARCHAR(30) ) GO INSERT INTO #T2 VALUES (' John Smith') INSERT INTO #T2 VALUES ('Lisa Tran ') INSERT INTO #T2 VALUES ('Nicole  Ngo') INSERT INTO #T2 VALUES ('Brandon Lee') GO    SELECT *      FROM #T1;    GO       SELECT *      FROM #T2;    GO -- Desire results. FullName         TableName ---------------- --------- Joe  Smith       #T1   (2 spaces in between) April Smith      #T1   (space after Smith)  John Smith      #T2   (space in front) Lisa Tran  &

View Complete Post

More Related Resource Links

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

TextField control add extra character space at end of it



On one of my publishing page layout i have added Content Field (field of content type) that is

<SharePointWebControls:TextField FieldName="MyName" runat="server"></SharePointWebControls:TextField>
"MyName" is single line text column in the content type.

Then i edit the page which is using this page layout and add one text "Sandip" in that MyName field. Now problem is, this filed show the text on the page but at the end of it, it add space. i.e- "Sandip "

I m not getting why it is showing this.

Please help..!

Regards Sandip Patil Sharepoint Developer http://www.worldofsharepoint.com

Page Header, PrintOnFirstPage=False, HTML render fine, PDF export leaves extra space

As it says in the header.Setup:SSRS 2008, VS 2008 SP1Local Mode, rdlc fileDesign:Make a 1/2" Page header with a text box in it. Set PrintOnFirstPage=FalseBody contains a Table that spans multiple "hard" pages.Results:Renders to HTML in the report viewer just fine.PDF export leaves blank 1/2" at the top of page 1. With no header for page 1, I had hoped it would remove the extra space the same as in the report viewer.Question:Any way to tell SSRS not to leave space when page header is turned off for the first page?Attempts:Tried putting everything in a rectange in the header and set the visibility to false. Still leaves space.

Search in two linked tables

I've 2 tablesCorsi with a list of courses and AttivitaCorsi where I've a list of activities linked to each courseCREATE TABLE [dbo].[AttivitaCorsi]( [ID] [int] IDENTITY(1,1) NOT NULL, [IDAttivita] [int] NULL, [IDCorso] [int] NULL, [ConcurrencyId] [timestamp] NULL, CONSTRAINT [PK_AttivitaCorsi] PRIMARY KEY CLUSTERED ( [ID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]CREATE TABLE [dbo].[Corsi]( [ID] [int] IDENTITY(1,1) NOT NULL, [IDTipologia] [varchar](1) NULL, [IDFornitore] [int] NULL, [Descrizione] [varchar](200) NULL, [ConcurrencyId] [timestamp] NULL, CONSTRAINT [PK_Corsi] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] CREATE TABLE [dbo].[Attivita]( [ID] [int] IDENTITY(1,1) NOT NULL, [DescrizioneAttivita] [varchar](200) NULL, [ConcurrencyId] [timestamp] NULL, CONSTRAINT [PK_Attivita] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] Attivita table is used for know the description of each attivita in AttivitaCorsi (using IDAttivita)Now I've a SP where I can

Search a word in all the tables(all columns) of a database

Dear Friends, I am developing the Home page of a Client. Apart from various things on this home page I have a text box and search button.Having said that, I have a database in which I have almost 12 tables with varying number of columns.Now my question is,Is there anyway to search a word typed by a user in the textbox to search it in all the tables(all columns) of the database.A simple,concise and easy to follow solution would be a great help.

ReportExecutionService always printing an extra space after character 'w'

I am using ReportExecutionService to print SSRS report. For some odd reason it always prints an extra space after a character 'w'. I have adjusted the resolution to 300 and 600 dpi and that's not helping. Can anyone tell me how I can get this issue resolved?

Search Query From Multiple Tables



I have a order master table in which orderId is PK.

Now i have 5 Diffrent tables in which OrderId is FK. Column Name in each table is same.

I want to find all columns by orderId from all 5 tables. that means If i pass the orderid = 5 then query should check for each table and find the orderId = 5 and get all records from that table.

If you think any logic for solve this problem please write. I really thankfull if i got any clue for this.

Thanks & regards

Shwetamber Chourey


SharePoint Gets Search Analytics

Microsoft's SharePoint Portal Server 2003 was sold into a large number of organizations based solely on the strength of the search tool. Organizations hungered for a way to find the data they had generated.

Using SharePoint Search feature in ASP.Net Application

Integrating ASP.Net application in to MOSS 2007 to utilize SharePoint Enterprise Search Feature can be done by using Business Data Search.

Get more then google search from here

Just make it home page and enjoy more then google search you not only get google result and prizes for searching but also free ebooks and link from here like orkut,facebook,twitter,yahoomail etc...


Adding Search Refinements in SharePoint 2010

I have been playing around with SharePoint 2010 Search this morning. I love the new UI. The search refinements panel is just begging to be messed with. In my case I wanted to add the file extension JPG as an Image Type refiner.

Temporary Tables - MS SQL Server

Usage of temporary tables in MS SQL Server is more developer friendly and they are widely used in development. Local temporary tables are visible only in current session while global temporary tables are visible across all sessions.

Temporary tables in SQL Server vs. table variables

When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.

Search Engines and Multilanguage Websites - using .resx


I have a website (asp.net 3.5+c# +linq ) having thopition to change languages (2) by the user, Am using the search engine like in the example of:


this search will find any searched word in all the pages and return the link in the default language of the site, but problem for the second language , because by default the site language is English and the user have the option to change to other language.

and as I understood that the .resx files can not be searched like the aspx by the search engines.

I looked in many blogs and discussion boards for similar  case but unfortunately no clues on this issue .
The only same case posted :


and also I could not find any clue to move on, 

 Kindly requsted to guide me for the soultio

Thanks for your time and wish you all the best
your help is always appreciated


how to make a dropdownlist looks like google search box


dear all...

any idea how to do that ?

Thnx in advance

Membership Search user


Is there a membership function to search a username Like this:   LIKE '%UserName%' ?

This is not working.

MembershipUser User = Membership.GetUser("%" + TextBox1.Text + "%");

Thank you.

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