sql-server-2000

how do i generate scripts for all tables with single stroke in sql server 2000 [closed]

邮差的信 提交于 2019-12-01 15:19:17
how do i generate scripts for all tables with single stroke in sql server 2000. You can't do this with one click of a button. You have to: Right click Database Select All Tasks > Generate SQL Scripts Click Show All Check All Tables Click the Formatting tab. Select the options you require Click the Options tab. You may want to script out the Indexes, Full-Text Indexes, Triggers, Primary & Foreign Keys. Then choose whether you want it all in one file or one file per object. 来源: https://stackoverflow.com/questions/5114667/how-do-i-generate-scripts-for-all-tables-with-single-stroke-in-sql-server

INSTEAD OF UPDATE Trigger - is this possible?

烈酒焚心 提交于 2019-12-01 15:18:47
I am making some tweaks to a legacy application built on SQL Server 2000, needless to say I only want to do the absolute minimum in the fear that it may just all fall apart. I have a large table of users, tbUsers, with a BIT flag for IsDeleted. I want to archive off all current and future IsDeleted = 1 user records into my archive table tbDeletedUsers. Moving the currently deleted users is straight forward, however I want a way to move any future users where the IsDeleted flag is set. I could use a standard AFTER trigger on the column however I plan to add some constraints to the tbUser table

how do i generate scripts for all tables with single stroke in sql server 2000 [closed]

自作多情 提交于 2019-12-01 15:02:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . how do i generate scripts for all tables with single stroke in sql server 2000. 回答1: You can't do this with one click of a button. You have to: Right click Database Select All Tasks > Generate SQL Scripts Click Show All Check All Tables Click the Formatting tab. Select the options you require Click the Options

Is triple des Encryption /Decryption Support in sql server 2000?

随声附和 提交于 2019-12-01 14:24:52
For Example: Here, Is this function EncryptByPassPharase() support in sql server 2000? If Not Then is there any function like that in sql server 2000? How Can I do same thing in sql server 2000? INSERT INTO login_details(username,password) VALUES('smith2',EncryptByPassPhrase('12','XXX')) No, the function EncryptByPassPharase() is not support for SQL Server < 2008. On microsoft doc has been detail about it. You can se more detail here ENCRYPTBYPASSPHRASE 来源: https://stackoverflow.com/questions/47279379/is-triple-des-encryption-decryption-support-in-sql-server-2000

Is triple des Encryption /Decryption Support in sql server 2000?

不问归期 提交于 2019-12-01 13:21:50
问题 For Example: Here, Is this function EncryptByPassPharase() support in sql server 2000? If Not Then is there any function like that in sql server 2000? How Can I do same thing in sql server 2000? INSERT INTO login_details(username,password) VALUES('smith2',EncryptByPassPhrase('12','XXX')) 回答1: No, the function EncryptByPassPharase() is not support for SQL Server < 2008. On microsoft doc has been detail about it. You can se more detail here ENCRYPTBYPASSPHRASE 来源: https://stackoverflow.com

How to use LIKE clause with IN caluse in Sql Server?

走远了吗. 提交于 2019-12-01 08:58:26
I want to use LIKE clause and IN clause together. e.g: Currently my query is - SELECT * FROM [USER_DETAILS] WHERE [NAME] LIKE 'Dev%' OR [NAME] LIKE 'Deb%' OR ...... ...... How can i use IN clause to achieve this? Can someone please help? :) Put the parameter values in a table, then use a single JOIN condition e.g. SELECT * FROM [USER_DETAILS] AS U1 INNER JOIN Params AS P1 ON U1.[NAME] LIKE P1.param + '%'; Agree with NullUserException - there is no such syntax. "In" is "syntax sugar" for predicate equal. There is no analog for other operations like >, <, so you should use OR. 来源: https:/

SQL address data is messy, how to clean it up in a query?

北城以北 提交于 2019-12-01 05:56:25
问题 I have address data stored in an sql server 2000 database, and I need to pull out all the addresses for a given customer code. The problem is, there are a lot of misspelled addresses, some with missing parts, etc. So I need to clean this up somehow. I need to weed oout the bad spellings, missing parts, etc and come up with the "average" record. For example, if New York is spelled properly in 4 out of 5 records, that should be the value returned. I can't modify the data, validate it on input,

Executing stored proc from DotNet takes very long but in SSMS it is immediate

。_饼干妹妹 提交于 2019-12-01 04:14:27
I have a stored proc on SQL Server 2000 that takes 3 parameters. When I call the stored proc from DotNet using SqlCommand.ExecuteReader () it takes about 28 seconds. When I run the same query inside SSMS directly it returns immediately. When I take the query out of the stored proc and run it directly using DotNet it also returns immediately. These are the results from a SQL Profiler session SP Inside Dot Net Duration: 28030 Reads: 2663365 Writes: 0 SP Inside SSMS Duration: 450 Reads: 23535 Writes: 65 Query directly inside Dot Net Duration: 360 Reads: 24865 Writes: 57 The following things stand

Selecting SUM of TOP 2 values within a table with multiple GROUP in SQL

為{幸葍}努か 提交于 2019-12-01 03:29:38
I've been playing with sets in SQL Server 2000 and have the following table structure for one of my temp tables (#Periods): RestCTR HoursCTR Duration Rest ---------------------------------------- 1 337 2 0 2 337 46 1 3 337 2 0 4 337 46 1 5 338 1 0 6 338 46 1 7 338 2 0 8 338 46 1 9 338 1 0 10 339 46 1 ... What I'd like to do is to calculate the Sum of the 2 longest Rest periods for each HoursCTR, preferably using sets and temp tables (rather than cursors, or nested subqueries). Here's the dream query that just won't work in SQL (no matter how many times I run it): Select HoursCTR, SUM ( TOP 2

Schema, Owner for objects in MS SQL

做~自己de王妃 提交于 2019-12-01 02:17:11
By default, objects (tables, stored procedures, etc) are set up with the dbo owner/schema (I think ms sql 2000 calls it owner, while ms sql 2005 calls it schema) The owner/schema is really a role or user in the database. I've always left the default of dbo, but I've recently seen some examples in microsoft training books where some of their tables & stored procedures had different owners/schemas. When is it beneficial to do this and why? The use of schemas is exceptionally beneficial when you have security concerns. If you have multiple applications that access the database, you might not want