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


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Asad Ali
Post New Web Links

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

Posted By: Amit Mehra     Posted Date: November 16, 2009    Points: 2   Category :Sql Server
 
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.


View Complete Post


More Related Resource Links

SharePoint Portal Server 2001: Search and Access Disparate Data Repositories in Your Enterprise

  

The knowledge worker is greatly empowered if she is able to access information across the enterprise from a central access point. With the SharePoint Portal Server 2001 Search Service you can catalogue information stored in Exchange public folders, on the Web, in the file system, and even in Lotus Notes databases. This article discusses the use of ActiveX Data Objects and the Web-based Distributed Authoring and Versioning protocol for creating search solutions based on SharePoint Portal Server 2001.

Kayode Dada

MSDN Magazine April 2002


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.

Search Server 2010 Express Error when crawling LOB Data with BCS Error while crawling LOB contents.

  
Ok so search server is crawling our BCS external data source which has some columns that allow null. When it hits a null in one of these columns it dies out with: Error while crawling LOB contents. ( '.', hexadecimal value 0x00, is an invalid character. Line 94, position 11. ) This is in the crawl log Is the a Fix / Update / Work around for this (other than modifying the table, taking off allow nulls and using a "blank" default value)

Hiding rows/columns completely in SSRS tablix even when they have data

  
I have several columns and rows in my tablix.  I don't want to see all of them at once.  I am using a parameter that controls the visibility of the columns or rows of the tablix.  The issue is that it hides but the white space is left.  How do i take out that white space?

BCS data caching in Search Server 2010

  
I am using BCS to pull Oracle data into a SharePoint external list via an .asmx web service so that it can be indexed and searched in Search Server 2010.  I created a .NET connector assembly which implements ReadItem() and ReadList() methods to accomplish this.  Both methods call web service methods to either retrieve a record by id or the entire list of data, respectively.  The data retrieved by the web service is done so using an Oracle stored procedure.  

The data retrieved by the web service is refreshed in the Oracle database on a nightly basis by perl scripts.  Because of this, search results muct also reflect any changes on a nightly b

BCS data caching in Search Server 2010

  
I am using BCS to pull Oracle data into a SharePoint external list via an .asmx web service so that it can be indexed and searched in Search Server 2010.  I created a .NET connector assembly which implements ReadItem() and ReadList() methods to accomplish this.  Both methods call web service methods to either retrieve a record by id or the entire list of data, respectively.  The data retrieved by the web service is done so using an Oracle stored procedure.  

The data retrieved by the web service is refreshed in the Oracle database on a nightly basis by perl scripts.  Because of this, search results muct also reflect any changes on a nightly b

SSIS data flow task not loading all rows from sybase server

  

Hi,

Using a data flow task I am trying to load data from a table in sybase server to sql server. There are approx 10000 rows in the sybase table, however for some reason which I am not able to find out, at random certain no of rows are getting inserted. e.g. in one run 800 rows then 200 rows etc.

Can somebody please guide me on this?



How to Import Excel Data into SQL Server 2008(64 bit) Using SQL Query (in Windows Server 2008 64bit

  
I am developing VB .Net application in Visual Studio 2008(64bit), SQL Server 2008(64bit) and Windows Server 2008(64bit) environment.

I need to import an Excel and Flat files data into SQL Server database using SQL Query. I tried a lot with the following SQL Queries directly with SQL Server Management Studio,

1. SELECT * INTO  dbo.ExcelImportTest FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=D:\PTPLDCT\DCT Test Datasource\DCT_Excel_Test_Sample_1.xls',
'select * from [Sheet1$]')

While executing i got an error as below,

Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered.

2. I have also tried with MSDASQL provider,

Select * from openrowset('MSDASQL','Driver={Microsoft Excel Driver (*.xls)};
Dbq=DCT_Excel_Test_Sample_1.xls;DefaultDir=D:\PTPLDCT\DCT Test Datasource\', 'Select * from [Sheet1$]')

Then i encountered the following error,

OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".

3. Finally i have tried the Query with Linked Server,

EXEC sp_addlinkedserver @server = '

Getting server non system databases, getting database tables, getting table columns

  

I use next code to get server databases

string connectionString = "Data Source=DENIS\\SQLEXPRESS;Integrated Security=SSPI;";
DataTable tables = new DataTable("Tables");
using (SqlConnection connection =
    new SqlConnection(connectionString))
{
  SqlCommand command = connection.CreateCommand();
  command.CommandText = "sp_databases"; 
  command.CommandType = CommandType.StoredProcedure;
  connection.Open();
  tables.Load(command.ExecuteReader(CommandBehavior.CloseConnection));

}

this.dataGridView1.DataSource = tables;

I've got many databases :

- model ( i guess it is system )

- master ( i guess it is system )

- tempdb ( i guess it is system )

- db1 ( my table )

and etc.

How to determinate what table is system.

http://blog.sqlauthority.com/2007/06/26/sql-server-2005-list-all-tables-of-database/

SELECT *

FROM information_schema.Tables

So how to determinate what table is system or not.

Can I get tables of database

Need a search query based on Columns

  

I have webform having these columns/fields WoNo,partNO,Customer,DDueDate,PDuedate,TMSDuedate,QADueDate,qty field  and a button called WorCenters.when i click on this button all the values should be listed based on these inputs DDueDate,PDuedate,TMSDuedate,QADueDate(4 columns are called as Worcenters).for example user wants to list all the WoNo(work orderNumber),customer under a particular work center,how can i do this,i dont have any column on WorkCenter either on webform or in database.Can any one help me how to acheive this

 


Writing a keyword query for Filtering the search items

  

I am trying to search only the documents created by a an author. Below is the code that i am trying to use for keyword query but i am not getting any results at all.

string strQuery = "contentclass:" + "STS_ListItem_DocumentLibrary" + "author:" + strQueryText

Can anyone help me out here please.

 


How to Improve the query Performence in Retriving the data from the tables

  

Hi

I am working on the T-Sql i am writing the the Queries to retrive the data from Multiple tables using Joins,Sub Queries....etc and it is giving the result fine but my worry is the performence is too low, can any any body help me to increase the performance of the Query please provide any link or Example so that i can increase my Query performance  please help me  my team is complaining about my query performance  please help Thanks in advance

Regards

Sunil Yoganna


How to Query Survey list data from Sql Server

  

Hi,

I have a Survey list and i have the 2 Columns with the "Rating Scale" type and want to fetch the data from sql server for each que.

Usually i write Query on the Content database's Userdata table , but this time i dont get the Ans in the nvarchar3,4 etc. only i am able to get is the name of the Question with comma (,) with out answer to it. can anyone please let  me know that How can i query the Survey Data from the Content database

Thanks

Parth


Thanks, Parth

compare two columns in two data tables

  

Hi,

is there an easy way to compare two columns in two datatable to see if they match?

I need to check if the values in column["x"] of datatable1 occur in column ["y"] of datatable2, without iterating through both tables (for each value in column of dt1, check column of dt2).

I tried:

foreach (DataRow dr in dt1.rows)

if (dt2.rows.find(dr["x"])

but this checks the whole row and if finds an "x" in any column, "if" condition is true. I need to only check one column of dt2.

Tables have different columns but the same primary column and that's what I need to check

 


How to insert data into CLOB columns in DB2 from sql server ssis packages

  

Hi,

Could any one let me know how to insert values into CLOB from sql server 2005 to DB2.  Its as emergency

Thanks & Regards,Sridhar


Search Query From Multiple Tables

  

Hello,

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

India


Crawl doesn't work and Query server is not responding; Search works only for old (crawled) contents

  

We have following three servers with MOSS 2007 STD deployed in SharePoint server farm,

 

App01- Query Server

App02 - Index Server (We are using this server as dedicated web front end computer for crawling)

SPDBServer - SQL 2005

 

Search was working fine till 01/05/2008 and it stopped working after this date only for new contents meaning search is still working fine for the old contents which were added before 01/05/2008 but not for new contents added after 01/05/2008.

 

We have been working to find out reasons why did that happen? We have found following event ids on Query server,

 

Event ID:10042 - A new query machine, 'App01', has been added to the query rotation based on changes to farm topology.

Categories: 
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