sql-server-2000

Is there any way/tool to identify estimate query run time in SQL sERVER

筅森魡賤 提交于 2019-12-12 09:05:22
问题 I have been google about this for a while..is there any way to identify the estimated query execution time> There are actual execution plan and estimated execution plan on the ssms .The thing is none of these have estimated time. Is it something lacking in the Sql Server? 回答1: Currently, no. Microsoft is currently researching ways to do this using a combination of work already completed and an estimated execution plan (See the details of their research on the Microsoft Research site), so we

SQL Server 2000: how do i get a list of tables and the row counts? [duplicate]

爱⌒轻易说出口 提交于 2019-12-12 08:38:38
问题 This question already has answers here : Query to list number of records in each table in a database (19 answers) Closed 5 years ago . I know that I can get a list of tables with SELECT TABLE_NAME FROM information_schema.tables WHERE NOT TABLE_NAME='sysdiagrams' AND TABLE_SCHEMA = 'dbo' AND TABLE_TYPE= 'BASE TABLE' But I'm not sure how to modify that to get a 2nd column with the current count of rows for the tables. I though of something like this: DECLARE @tbl VARCHAR(200) (SELECT @tbl =

Connecting SQL server 2000 using Visual Studio 2012

我们两清 提交于 2019-12-12 04:25:47
问题 I'm facing following issue using Visual Studio 2012 when I'm trying to connect with MS SQL Server 2000 (in Data Connections window): Strange is that it's actually getting list of databases when I'm using Microsoft SQL Server (SqlClient) as a data source. Is there any way to connect VS 2012 and SQL Server 2000? Should I use different driver/provider? Is it possible at all to use those technologies together? 回答1: I figured out the solution. .NET Framework Data Provder for OLE DB -> Microsoft

NHibernate not dropping foreign key constraints

▼魔方 西西 提交于 2019-12-11 18:45:30
问题 I'm new to NHibernate, so this is probably my mistake, but when I use: schema.Create(true, true); I get: SchemaExport [(null)]- There is already an object named 'XXX' in the database. System.Data.SqlClient.SqlException: There is already an object named 'XXX' in the database. I grabbed the SQL code nHibernate was using, ran it directly from MSSMS, and recieved similar errors. Looking into it, the generated code is not properly dropping the foreign key constraints. The drop looks like this: if

SQL Server 2000 DTS - Cannot resolve collation conflict for equal to operation

北城以北 提交于 2019-12-11 18:36:27
问题 I have a SQL Server 2000 DTS package. One of the steps of this package has the following SQL: SELECT * FROM [Crocus_Limited$OrderRequestDetail] WHERE (rep_updated > GETDATE() -2) AND NOT EXISTS (SELECT OrderID FROM NavisionUpgrade.navision4.dbo.[WEBOrderDetails] rd WHERE rd.OrderID = [Crocus_Limited$OrderRequestDetail].OrderID AND rd.NavisionItemNo = [Crocus_Limited$OrderRequestDetail].NavisionItemNo ) It is failing- giving me error: cannot resolve collation conflict for equal to operation.

Export view data programmatically in Access/SQL Server

[亡魂溺海] 提交于 2019-12-11 18:07:51
问题 We have an Access application front-end connected to a SQL Server 2000 database. We would like to be able to programmatically export the results of some views to whatever format we can (ideally Excel, but CSV / tab delimited is fine). Up until now we've just hit F11, opened up the view, and hit File->Save As, but we're starting to get results with more than 16,000 results, which can't be exported. I'd like some sort of server side stored procedure we can trigger that will do this. I'm aware

MS Sql Server 2000:Multiple database query

最后都变了- 提交于 2019-12-11 15:23:28
问题 I am having separate database for each dept.I have all depts list in a master database table.All database are named as a1,a2 etc Now i want to fetch the employee detail from all the dept databses returned by a query.pls help me 回答1: something like: select <columnlist>, '[databasename1]' AS dbname from [databasename1].[owner].[table or view name] UNION select <columnlist>, '[databasename2]' AS dbname from [databasename2].[owner].[table or view name] UNION select <columnlist>, '[databasename3]'

SQL Server: Splitting string by '/' and put each split element into a different column

痞子三分冷 提交于 2019-12-11 14:39:25
问题 I have a table on an external site that I need to copy to a local DB, but with some transformations. One of the columns I have to heavily modify is called product_url. The URL is in the form site.com\category\sub-category\brand\model#. The table in my local db will have 4 columns to hold this data. They will be category, sub-category, brand and model#. So, I will have to first trim the site.com (I did this using truncate), but now I have to parse \category\sub-category\brand\model# I found a

Int to Date in SQL SERVER 2000

让人想犯罪 __ 提交于 2019-12-11 13:19:58
问题 How to convert an int column ,Birthdate( sample value 20090301) to a date column in the format(01/03/2009) Sql Server 2000 I was trying to convert some thing like below select * from tabl where cast(dob as datetime)>='01/03/2009' which gives an error Msg 8115, Level 16, State 2, Line 1 Arithmetic overflow error converting expression to data type datetime. 回答1: SQL Server doesn't allow you to cast int -> datetime directly, but if you're sure you can cast it to nvarchar first and then cast it

replacing special characters in SQL 2000

荒凉一梦 提交于 2019-12-11 12:56:20
问题 how can I replace special characters in my data files (special characters such as bullet points, percent sign, hyphen etc) ? Thanks 回答1: You can use T-SQL REPLACE: REPLACE(FieldWithStars,'*','STAR') For more than one substitution you could use cascading REPLACE statements. No clue though about bullet points - but you should be able to replace anything looking for the right escape sequence for that particular character. 回答2: This is a late answer, but it might be helpful when replacements