sql-server-2000

Issue With Apostrophe

I have a Proc that was coded in Dynamic SQl for one of my Application. It is using to search the Applicants with their last name. Right now it is searching applicants with either their first 2 digits of their last name or full last name. But i have a problem searching Applicants that have Apostrophe in their last name(Example O'Connor). ...

Need help in save image in sql database using asp.net

Hi all, I trying to save employee image in employee database. I have three field in database table empid, empname, empimage. Here is my database part. CREATE DATABASE [Employee] GO USE [Employee] GO CREATE TABLE EmpDetails ( empid int IDENTITY NOT NULL, empname varchar(20), empimg image ) In the button click event, i have written th...

replacing special characters in SQL 2000

Hi, how can I replace special characters in my data files (special characters such as bullet points, percent sign, hyphen etc) ? Thanks ...

String comparison

When comparing two strings how to avoid checking if a string is of different case in MS SQL 2000 Example: String1 = Anish String2 = anish When comparing Anish = anish the result will be "the strings are not equal".How we camapre these strings in that way? ...

Merge these two queries into a single query

I have the following queries: SELECT Sites.EDISID, Sites.[Name], (SUM(DLData.Quantity) / 8) AS TiedDispense FROM Sites JOIN UserSites ON UserSites.EDISID = Sites.EDISID JOIN Users ON Users.[ID] = UserSites.UserID JOIN MasterDates ON MasterDates.EDISID = UserSites.EDISID JOIN DLData ON DLData.DownloadID = MasterDates....

Select Top 5 records of every employee in SQL Server

I have the following issue, I have this query that select the latest 5 records created for an employee: SELECT TOP 5 p.value, p.record_date AS FECHA FROM employee_loan_movements p WHERE p.employee_code = '1' AND p.record_date <= '2009-11-11' AND p.movement_type = 1 AND p.value > 0 ORDER BY p.record...

what is sqlserver database remark returned fom sp_databases?

The sp_databases stored proc in sqlserver returns a remarks column. Where does this information come from, and can I edit it? ...

How do I do a SQL BETWEEN where the date and time are stored seperatly as integers.

At the company I work for date and time values have always been stored separately in integer fields, so for example 8:30 this morning would be stored like this: date of 20091116 and time of 83000 (no leading zeros as it is an integer field) Whereas the time as I type this the time would be stored like this date 20091116 time 133...

How to put row number for sql query in sql 2000 where rownumber() is not supporting?

How to put row number for sql query in sql 2000 where rownumber() is not supporting? ...

Restore SQL Server 2008 database to SQL Server 2000

I have to move an entire database from a SQL Server 2008 machine to a SQL Server 2000 machine. I created a backup using Management Studio 2008, copied it to the hard drive of the 2000 box, and from withing Management Studio 2008, I choose Restore Database to the 2000 box. I get an error message stating, "The media family on device ... ...

Select column, if blank select from another

How does one detect whether a field is blank (not null) and then select another field if it is? What I really need is a IsBlank function that works the same as IsNull but with with blanks. REPLACE doesn't work with blanks, COALESCE only works with NULLS. ...

Changes to sysusers and sysxlogins in SQL 2008

Hi all, I am currently updating a MS SQL 2000 server to SQL 2008. One of the issues highlighted by the Upgrade advisor is that the undocumented table sysxlogins has been removed. I currently have a procedure that is run by a user 'foo' to determine if the user 'bar' exists in the database blah. If the user exists the user's password is...

LINQ, Skip, OrderBy, and SQL Server 2000

I'm accessing a data context object that is auto-generated by using LINQ to SQL. The SQL database is a SQL Server 2000 box. The class I'm working with is a SQL View. I have a statement that is similar to this: query = _context.OrderDetails .Where(w => w.Product == "TEST") .OrderBy(o => o.DateCompleted) .ThenBy(t => t.LineIte...

Sql server 2005 on sql server 2000

I want to ask is there any issues or risks involved in installation of SQL Server 2005 Enterprise Edition on SQL Server 2000 Enterprise Edition in production server? Please tell me the guidelines in installation... ...

SQL Replication snapshot deployment from SQL2005 to SQL2000 bcp parameters incorrectincorrect

I am replicating using transactional replication from SQL2005 to SQL2000 however the deployment of the snapshot is failing on the bulk insert of the data into the subscriber tables (works fine to a 2005 subscriber), providing the following error details: Error 'The process could not bulk copy into table '"dbo"."tableName"'. (Source: MSS...

SQL Sever Management Studio for SQL Server 2000

We use mostly SQL Server 2005 but have a few SQL Server 2000 servers laying around. Is there a SQL Server Management Studio like application for SQL Server 2000? Thank you. ...

SqlServer performance with a large number of tables in database

I am updating a piece of legacy code in one of our web apps. The app allows the user to upload a spreadsheet, which we will process as a background job. Each of these user uploads creates a new table to store the spreadsheet data, so the number of tables in my SqlServer 2000 database will grow quickly - thousands of tables in the near t...

How do I define a work week in SQL Server 2000?

I need to split a report by work week, and our work week is Saturday through Friday. How would I convert an ISO week from DATEPART(WW, ) into a work week? ...

I m using one database with the same name in SQL Server 2000 and SQL Server 2005.

I am using one database with the same name in SQL Server 2000 and SQL Server 2005. How can I manage the connection string in the web.config file so that we can differentiate the connection. While we are using the same user name and password for the both databases. ...

Big Table Advice (mssql)

Hey all, I'm experiencing massive slowness when accessing one of my tables and I need some re-factoring advice. Sorry if this is not the correct area for this sort of thing. I'm working on a project that aims to report on server performance statistics for our internal servers. I'm processing windows performance logs every night (12 ser...