sql-server-2000

SQL: Finding duplicate values in a field, but using SubString()

Here's a question for all those SQL SERVER 2000 experts: I have only 1 table... I can already find if any of the values in a certain field, also appears in another record. I.E.: Does any record have "ABCDEFGHI" in a field, and then "ABCDEFGHI" again in that same field... but in another record. But I run into trouble when I...

How can I get a list of tables in a database without a timestamp column?

How can I get a list of tables in a database without a timestamp column? Any suggestions? ...

[SQL Server] There is already an object named '##Temp' in the database.

I have a stored procedure on SQL Server 2000. It contains: select ... into ##Temp ... ... drop table ##Temp When I run the stored procedure with ADO a second time, it prompts: There is already an object named '##Temp' in the database. Could anyone kindly tell me what's wrong? ...

Error converting data type varchar to int error? can anyone tel me the reason for this error

during inserting values from ASP page to SQL 2000 ...

How Can I Sort A 'Version Number' Column Generically Using a SQL Server Query

I wonder if the SQL geniuses amongst us could lend me a helping hand. I have a column VersionNo in a table Versions that contains 'version number' values like VersionNo --------- 1.2.3.1 1.10.3.1 1.4.7.2 etc. I am looking to sort this, but unfortunately, when I do a standard order by, it is treated as a string, so the order comes ou...

[ADO] Why can't I get the recordset directly from the stored procedure?

I have a SP as follows. When I execute it with ADO, the first returned recordset is closed. I have to call the NextRecordset method to get the recordset I want. Why is that? How can I avoid the trouble? Thank you. create proc GetTeamCurrentPlan @ReleaseID varchar(30) as set nocount on declare @CurrentSp smallint set @CurrentSp=...

Displaying data from database in TEXTAREA of form

Can anyone tel ma From OP comment: "how to show the values of textarea(asp form) from sql server 2000 " ...

Execute Query depending upon select query value.

How to achieve the following query - SELECT CASE WHEN COUNT(*) > 0 THEN -- UPDATE operation ELSE -- INSERT operation END AS [RESULT] FROM [TABLE_1] WHERE [CONDITION] I am using SQL Server 2000. Can someone please help me? ...

SQL 2000 - Enterprise Manager & Triggers

We use SQL 2000 Enterprise Edition. We have noticed that the triggers are not executed when we make data changes using the Enterprise Manager. That is, we execute a "Select" query, and we edit the results directly in the grid results table. The trigger is valid since it is executed as expected if we run an update query. I am just wonde...

Invalid primary key datatype [int]

I am using Afo Castle AR Code Generator v1.0.0.4 at first I was receiving errors for using tinyint as a primary key so I changed those to int but the only error I have left and can't seem to get rid of is Invalid primary key datatype [int] for table dbo.Level_Code. Only int identity and uniqueidentifier primary keys are suppor...

SQL Server: Any value in vertical partitioning when i'm always going to re-JOIN them?

i'm faced with having to add 64 new columns to table that already had 32 columns. For examples sake: Customers ( CustomerID int Name varchar(50) Address varchar(50) City varchar(50) Region varchar(50) PostalCode varchar(50) Country varchar(2) Telephone varchar(20) ... ...

Calling web service from SQL Agent Job not working

I have a a SQL 2000 DTS package that is scheduled to run from a SQL 2005 SQL Agent job. In this DTS there is a ActiveX step that has the following VBScript to call a webservice. Dim http: set http = CreateObject("MSXML2.ServerXMLHTTP.6.0") http.setProxy 2, "http://123.45.67.89:8080" http.open "GET", "http://mywebservices.com/MyWebMet...

Query compatibility SQL server 2008/2000

Hi, I am developing some stored procedures in SQL Server 2008. Some of our customers are running SQL Server 2000. Is there a way to check whether my queries are compatible without having to install SQL Server 2000? Maybe a transact sql tester? Regards, Michel ...

SysIndex - difference b/w is_unique and is_unique_constraint

runing a select query on SQL Server 2008, sys.indexes gives me information on the index define for a database . There 2 fields is_unique and is_unique_constraint. I dont understand the difference b/w them . ...

Insert Null value in ADO Recordset

Is it possible to insert a null value into a field using the AddNew method of an ADO Recordset in VB6? In a typcial INSERT query, you would simply use NULL; however, I've discovered that this doesn't work through ADO; it inserts "NULL" instead. Is there another way to insert a null value when adding a new record? ...

Dynamic Database Name and Schema/Owner assignment.

I need to update a table from another table several times in succession. In order to make this script easier for people to use, I'd like to be able to dynamically reference it. Something like this: declare @databasename sysname set @databasename = 'm2mdata01.dbo' select * from @databasename.mytable This isn't working. Any suggestion...

How to use a SQL2000 Linked Server to query an Oracle 11G table

Can someone help me construct the SQL that I need to query the Projects_dim table using the Linked Server "idwd"? To test the connection, I ran a sample query using the linked server name. To access the tables on the linked server, I used a four-part naming syntax: linked_server_name.catalog_ name.schema_name.table_name. replacing t...

Need help with a sql delete query

There are 2 tables: report (which has a primary key of reportId and a bit field called migrated) and report_detail (which has a foreign key of reportId). I want to delete all the rows from report_detail that have a reportId which, in the report table, has migrated = 1. This is the select query that selects all the rows I want: select * ...

Remove duplicates - SQL server 2000-2005

Only for MSSQL 2000-2005 by SQL query and no stored procedures No cursors and temp tables The table create table my_table ( row_id int identity(1,1), _key varchar(20), _total decimal(18,2) ) Insert the data insert into my_table (_key,_total) Values('qwe',10) insert into my_table(_key,_total) Values ('qwe',10) insert into my_table(...

Sql server 2000 pivot query

Hi everyone. Please forgive me if this has been answered before. I'm looking for some advice on how to build a pivot or cross tab query. I have a table that looks likes this Vessel Date Inspector A 02/05/10 Morris B 05/20/10 Clouseau A 07/25/10 Gadget I need the results to be look like this Vessel J...