Find That Data
Jun 18, 2007Hi ALL
Just wondering is there an easy way to search every table and every column for a specific piece of data in sql 2000?
Any ideas would be appreciated
Cheers
Phil
Hi ALL
Just wondering is there an easy way to search every table and every column for a specific piece of data in sql 2000?
Any ideas would be appreciated
Cheers
Phil
Hi all,
It looks like these options are only available in the SQL Server Management Studio? I installed SQL Server Management Express Studio and I can't even find the DTSWizard.exe on my machine.
Can you please help how I can import data from excel or where can I download the SQL Server Management Studio?
Your prompt response is greatly appreciated.
Thanks!!
Tram
Hi,
I wanted to find the location in database objects(table/stored proc/view/function) for particular text.
For example a text 'BU1032' is located in tiles and titleathor table at PUBS databse.
I wanted get the result like
text_name filed_name table_name
--------- --------- ---------
BU1032 title_id titles
BU1032 title_id titleauthor
if we are using in stored proc/view for comparison that should be display
like
text_name storedproc_name
-------- ---------------
BU1032
Anybody has script for this kind of search?.
Thanks,
Ravi
What I would like to do, is loop through a table, extract two fields from each record, and pass the values of those fields to a stored proc. I found some help on using cursors to do this, but can I use two cursors at the same time? Below is what I would like to do:
DECLARE @cursorPhone CURSOR, @cursorName cursor, @phone VARCHAR(30), @UserName varchar(50)
SET @cursorPhone = CURSOR
FOR
SELECT userPhone FROM dbo.RPM_Data
OPEN @cursorPhone
FETCH NEXT FROM @cursorPhone INTO @Phone
SET @cursorName = CURSOR
FOR
SELECT userName FROM dbo.RPM_Data
OPEN @cursorName
FETCH NEXT FROM @cursorName INTO @UserName
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC sp_Subscription_Individual @phone, @UserName
FETCH NEXT FROM @cursorPhone INTO @phone
FETCH NEXT FROM @cursorName INTO @Username
END
DEALLOCATE @cursorPhone
DEALLOCATE @cursorName
is it possible to find out all the data about the table so I need Table columns, type etc.
View 1 Replies View Relatedhow to find data mining 's example from sql2005
how to apply data mining in project
Hi,
I use Visual Studio 2005 Pro.
I installed Microsoft SQL Server Compact Edition Developer Software Development Kit .
When i try to make a connection , i can't change the datasource to the compact version.(Not vissible)
What could be the problem.
Sorry for my bad english,
Thx
JoskeXP
I got a table in sql server....
i don't know the field name where data is present.
i just want to search and find, where data is present in any field of that table.
How can i do?. I forgot that SQL.
Please help me.
TableName: EmployeeCloumns: EmployeeID EmployeeName If I do "Select * From Employee", is there a way to do something like this...
Loop through each result IterateThroughControls.ID &= dbTable & dbColumnName & "<br />"EndSo that the end result would assign ID values...EmployeeEmployeeIDEmployeeEmployeeName
How do I find data having max length in the Database ?
View 1 Replies View RelatedHello,
I have a quick question. Can you please tell me how to find/search a string/value in all of my tables in a database.
For example I need to find a value/data "GH45678", where-ever it appears in a database.
I would really appreciate your prompt response. I would also like to thank you very much in advance for your time/help.
Note: I need to find specific data in all of my tables, I am looking for something like text search in my database. I am using SQL Server 6.5. Thanks
I need to find out when the data file and transaction log file is full. Is there any stored procedure that will let how much space left. We don't want to set Autogrow for the files.
Thanks,
Rau
I need to find a table and column name from some given data. I know what data i want to edit, I just need to know where it is located and the database is too big to manually go through. It is Microsoft sql server 2000. Any help is appreciated.
View 9 Replies View RelatedI have partitions that I have filled with data. I am not trying to figure out exactly how much data the partitions contain, and therefore I will be able to see if any of them are close to hitting their autogrow conditions. If I were looking at a single unpartitioned table, then I could maybe look at the table properties to determine data and index sizes, and compare that to the size of the mdf file size, but for partitions, then I am not sure how I would query this information out. Any pointers on how this information could be queried out of the system?
View 3 Replies View RelatedI am trying to write a piece of SQL which gives me a list of enquiries within 10 metre distance of a enquiry.
The idea is to identify possible duplicates.
Table: enquiry
Primary key: enquiry_number
Co-ordinates data fields: enquiry.enquiry_easting and enquiry.enquiry_northing.
I will need to self-search on the same table to find possible enquiries within 10m distance.
Here is an issue that has me stumped for the past few days. I have atable called MerchTran. Among various columns, the relevant columns forthis issue are:FileDate datetime, SourceTable varchar(25)SQL statement:SELECT DISTINCTFileDate, SourceTableFROMMerchTranORDER BYFileDate, SourceTableData looks like this:FileDate DataSource-----------------------------------2005-02-13 00:00:00.000S12005-02-13 00:00:00.000S22005-02-13 00:00:00.000S32005-02-14 00:00:00.000S12005-02-14 00:00:00.000S22005-02-14 00:00:00.000S32005-02-15 00:00:00.000S22005-02-15 00:00:00.000S32005-02-16 00:00:00.000S12005-02-16 00:00:00.000S22005-02-16 00:00:00.000S32005-02-17 00:00:00.000S12005-02-17 00:00:00.000S22005-02-18 00:00:00.000S12005-02-18 00:00:00.000S22005-02-18 00:00:00.000S32005-02-19 00:00:00.000S12005-02-19 00:00:00.000S3We run a daily process that inserts data in to this table everyday forall 3 sources S1, S2, S3Notice how some data is missing indicating the import process for thatparticular source failed.Example: Missing record2005-02-15 00:00:00.000S12005-02-17 00:00:00.000S32005-02-19 00:00:00.000S2Can someone please help me with a SQL Statement that will return me the3 missing records as above.Thanks in advance for all your help!DBA in distress!Vishal
View 4 Replies View RelatedI would like some advice on a data and query problem I face. I have adata table with a "raw key" value which is not guaranteed to be validat its source. Normally, this value will be 9 numeric digits and map toa "names" table where the entity is given assigned an "official name".My problem is that I'd like to be able to identify data values that are"close" to being "correct". For example, in the case of anine digit number such as 077467881, I'd like to be able to identifyrows with values close to this raw string. That is, ifthere were a row with a value for this column that was "off" by say, atransposed single digit (such as 077647881 in this example)I would like to find a query to locate the "close candidates" in aresult set. If I can find rows having a raw keyvalue that is close to a "good key" then I can allow my user to useother criteria to possibly assign the "close key" asan alternate or alias of the official key. Here is part of my schema:CREATE TABLE MYData (StateCD char (2) NOT NULL ,CountyCD char (3) NOT NULL ,MYID int NULL ,RawNumString varchar(9) NULL ,SaleMnYear datetime NOT NULL ,NumberWidgets int NOT NULL ,)CREATE TABLE MYNames (MYID int IDENTITY (1, 1) NOT NULL ,OfficialName varchar (70) NOT NULL ,CONSTRAINT PK_MYNames PRIMARY KEY CLUSTERED(MYID))CREATE TABLE MYAltID (RawNumString varchar (9) NOT NULL ,MYID int NOT NULL ,CONSTRAINT PK_MYALTID PRIMARY KEY CLUSTERED(RawNumString) ,CONSTRAINT FK_HasName FOREIGN KEY(MYID) REFERENCES MYNames (MYID))So, how to generalize something like:SELECT * FROM MYData WHERE RawNumString = '077467881'OR RawNumString = '077647881'
View 6 Replies View Related
I need a query that checks each row in a column (hardness) to see if the last character is a "space". The column holds numbers (73.45) but is a varchar 50 type. It will always be the 5th character but it would be nice to not make this assumption. Please help!!
Thanks.
SQL Server 2000 Enterprise
While testing an update script I found that a number of data rows are inaccessible using my query, though the data does exist in the table. I can browse records to find the data or query the record by some column names, but not by others.
For example:
SELECT name FROM tblPersonalInformation WHERE [ID Number] = 2358899;
would not find the data sought. However, if I put in:
SELECT address FROM tblPersonalInformation WHERE name = ‘Doe, John’;
the query yields the desired data. Many of the records queried display the specified data with no problem. I have found this problem to exist on a number of data rows, but can’t figure out a reason. The front-end application displays the data without any apparent problems.
Ideas please.
SQL Server 2000 Enterprise
While testing an update script I found that a number of data rows are inaccessible using my query, though the data does exist in the table. I can browse records to find the data or query the record by some column names, but not by others.
For example:
SELECT name FROM tblPersonalInformation WHERE [ID Number] = 2358899;
would not find the data sought. However, if I put in:
SELECT address FROM tblPersonalInformation WHERE name = ‘Doe, John’;
the query yields the desired data. Many of the records queried display the specified data with no problem. I have found this problem to exist on a number of data rows, but can’t figure out a reason. The front-end application displays the data without any apparent problems.
Ideas please.
how to find who delete/Truncate the data from table ,because i don't have any trigger on the table.
View 5 Replies View RelatedI need to find the history in SQl server.
I need to find the data, When was data last inserted/updated/deleted in a specific table?. is it possible?
Table name: Employee
Can you create an UPDATE TRIGGER and use some typeof code to figure out which SP just updated the current table?If not how can i achieve what i want?I tried to run SQL Profiler and i don't understand why i can'tsimply have the Profiler filter events only for the specific database idand the table's object id i chose?What am i doing wrong with SQL Profiler? I was testing thisthrough SQL EM. I had the filters chosen for a specific database idand a specific table's object id, yet when i open another table SQLProfiler captures that information too.Thank you
View 2 Replies View Related
Hello everybody,
I have a problem concerning the execution status of a data driven subscription. The problem is that
I´m creating a datamart and rendering several thousands of pdf based reports after that. I´ve found out how
to start the subscription using stored procedures with DTS.
Now I want to take further actions after the report building is done. But how do I find that out?
tfr
LG
Is there a Tool/Utility/StoredProcedure/Query/View that can tell me the last time the data in a particular table was changed?
That change can be the result of either an ADD , INSERT, or DELETE statement.
I am using SQL Server 2005.
We have records in one table that are marked as accepted/rejected based on eligibility start and end dates in another table. We're loading new eligibility data into an ETL table and if the start or end date is going to change, I want to report any records that need to be reviewed to see if their status should change. The new dates could be before or after the existing dates, and the new or existing end date could also be NULL. Currently I'm using 4 > < statements and it seems to catch any scenario, but I'm wondering if there's a better way:
DECLARE @RECORDS TABLE(RecordDate date,ID varchar(8))
INSERT INTO @RECORDS(RecordDate, ID)VALUES('20100101','99'),('20110101','99'),('20120101','99'),('20130101','99'),('20140101','99')
DECLARE @ORIGINALDATES TABLE(StartDate date,EndDate date,ID varchar(8))
INSERT INTO @ORIGINALDATES(StartDate,EndDate, ID)VALUES('20100101',NULL,99)
[code]....
I have two tables of book information. One that has descriptions of thebook in it, and the isbn, and the other that has the book title,inventory data, prices, the isbn.Because of some techncal constraints I won't get into now, I can'tcombine them both into one table. No problem. Things are going fine aslong as there is a description in the one table to corrispond to theisbn and other data in the other table.However, about half of the products are not yet entered into thedescrition table. I'd like to run a sql query that pulls up all theisbns that don't exist in the other. In other words, I'd like to get aquery that tells me exactly which isbns do not yet have descrition datain them. I know there is some sql that says to search from one filewhere the number does not exist in the other, but it slips my mind. Cansomeone help me on this please?Thank you!Bill*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
View 2 Replies View Relatedhow to find the columns names in a table in sql 2008r2.
as i need to compare the midsing fields in the table from two database.
I am writing an SQL query to find an replace data in a column. I have a table that is filled with
C:usersXXXXappdata
C:usersYYYYappda
C:usersZZZZZZappdata
I would like to replace the c:usersXXXXX part with %userprofile%
The end result would be %userprofile%appdata
I know how to dot the replacement in powershell. it's quite easy
-replace "c:users[^]+","%userprofile%"Â Â
Basically how would transfer this into SQL...
How to find the CDC enabled date and time in database.
View 3 Replies View RelatedHello Everyone,A have a Managed Stored Procedure ([Microsoft.SqlServer.SqlProcedure]). In it I would like to call a UserDefinedFunction:public static SqlInt32 IsGetSqlInt32Null(SqlDataReader dr, Int32 index) { if(dr.GetSqlValue(index) == null) return SqlInt32.Null; else return dr.GetSqlInt32(index) }I than allways get the following ErrorMessage:Column, parameter, or variable #1: Cannot find data type SqlDatareader.Is it not possibel to pass the SqlDatareader to a SqlFunction, do the reading there and return the result.My original Problem is, that datareader.GetSqlInt32(3) throws an error in case there is Null in the DB. I thought SqlInt32 would allow Null.Would appreciate any kind of help! Thanks
View 1 Replies View RelatedHi,I want to know the optimal solution, to find if all the data was entered. Lets say, Table A (date field) and for a given month, i need that all the days in the given month are present in the Table A. Right now i have different solutions, 1) a stored procedure which loops through all the days in the given month against a select statement on Table A2) a stored procedure, create a temp table which contains all the dates in the given month, and a single select statement using where condition (select * from.... where datefield not in (select * from...))I want to know what is the best solution of these two or any other solution.Thanks
View 9 Replies View RelatedI have created some dynamic sql to check a temporary table that is created on the fly for any columns that do contain data. If they do the column name is added to a dynamic sql, if not they are excluded. This looks like:
If (select sum(Case when [Sat] is null then 0 else 1 end) from #TABLE) >= 1 begin set @OIL_BULK = @OIL_BULK + '[Sat]' +',' END
However, I am currently running this on over 230 columns and large tables 1.3 mil rows and it is quite slow. How I can dynamically create a sql script that only selects the columns in the table where there is data in a speedier manner. Unfortunately it has to be on the fly because the temporary table is created on the fly.