Questions tagged [sql-server-2000]

Use this tag for questions specific to the 2000 version of Microsoft's SQL Server. Note that as of April 9, 2013, Microsoft no longer supports this version of SQL Server, to the point that even security patches are no longer created.

SQL Server 2000 (codename Shiloh, version 8.0), released in September 2000, is the successor to SQL Server 7.0.

2588 questions
0
votes
2 answers

InTime and OutTime for the modified date?

Using SQL Server 2000 Table CARDNO CARDEVENTDATE CARDEVENTDATE CARDEVENTTIME ADJUSTED 0121 20090611 20090610 025050 0121 20090611 20090611 …
Jash
0
votes
2 answers

Stored procedure question with IS_MEMBER

I have a table Users with columns ID nvarchar(4000) GroupRank int Definition nvarchar(4000) ID can be a userid (in which case groupRank is NULL), a domain group with a rank (in which case grouprank is not null) or a reserved default group called…
WOPR
  • 5,313
  • 6
  • 47
  • 63
0
votes
2 answers

SQL Server 2000 query that omits commas in resulting rows?

Wondering if there is a way to query a SQL Server database and somehow format columns to omit commas in the data if there is any. Reason for asking is I have 10000+ records and through out the data the varchar have data like 3,25% and other 1%. I'd…
0
votes
2 answers

exception problem with odbc and C++ causes bizarre database behavior

I have a C++ application (compiled with VS2003 running on windows 2000 server against SQL 2000 database) that ran fine for years and now is crashing. My logging shows that the database connection (ODBC using the SQL Server driver) will be working…
None
0
votes
3 answers

T-SQL 2000: Four part table name

I don't usually work with linked servers, and so I'm not sure what I'm doing wrong here. A query like this will work to a linked foxpro server from sql 2000: EXEC('Select * from openquery(linkedServer, ''select * from linkedTable'')') However, from…
John
  • 17,163
  • 16
  • 65
  • 83
0
votes
5 answers

SQL query for top and bottom value for a particular date

SQL Server 2000 My Table: CARDNO CARDEVENTDATE CARDEVENTTIME 121 20090610 025050 121 20090611 040000 121 20090611 050000 121 20090611 020000 122 20090611 030001 122 20090611 030000 123 20090611 080000 123 20090611 …
Jash
0
votes
2 answers

How do I call a SQL Server 2000 DTS package in VB.net

How do I call a DTS from a VB.net application?
sef
  • 5,115
  • 6
  • 23
  • 23
0
votes
1 answer

Fields in the table should have values equal to the length of the field

I have a table, that has many columns with all kinds of datatypes. I want to fill these columns with values that will be of same length as the size of the field. For example, if a table has a column called: Test Varchar(255) NULL Now this column…
Virus
  • 3,215
  • 7
  • 29
  • 46
0
votes
2 answers

Check for duplicates in the table before inserting data into SQL Server with ASP.NET

I have got 3 columns in the table, I need to check the email field before insertion of new row, so if the email exist, it should not insert that row. Do I have to go through 2 queries to achieve that, so for instance first check : Select count(*)…
Mr A
  • 6,448
  • 25
  • 83
  • 137
0
votes
2 answers

How can I count distinct multiple fields without repeating the query?

I have a query with several groupings that returns a count per month. Something like this: SELECT field1, field2, year(someDate), month(someDate), count(*) as myCount FROM myTable WHERE field5 = 'test' GROUP BY field1, field2, year(someDate),…
froadie
  • 79,995
  • 75
  • 166
  • 235
0
votes
2 answers

Transact SQL Finding Max Registration in each Group

Good Morning All. I have a table structure (I am using SQL SERVER 2000) CourseID StudentName TermPaperID 101 Jon 1 101 Jon 2 101 Jon 3 101 David 1 101 …
user1256813
  • 47
  • 1
  • 7
0
votes
2 answers

TempDB full error

I have a web application running across a few sites, and last week I got a call to say they keep getting an error when accessing one specific page. The error is that tempdb is full, and i'm a bit stumped as to what to do about it. I've restarted the…
beakersoft
  • 2,316
  • 6
  • 30
  • 40
0
votes
2 answers

Update the table with 2 column values

I want to update the table value comparing with two column values. Query UPDATE acc SET slloc = (SELECT Location FROM Duplication$ WHERE Duplication$.GROUP1 = acc.grpcd AND acc.ccode = Duplication$.div) The above query…
JetJack
  • 978
  • 8
  • 26
  • 51
0
votes
4 answers

How to find most recent birthday

Table1 ID Dateofbirth 001 01/01/1988 'dd/mm/yyyy 002 01/05/2001 .... From the table1, i want to find the most recent birthday of each id. Most recent birthday should validate with system date. Expected output ID Dateofbirth MostRecentBirthday 001…
JetJack
  • 978
  • 8
  • 26
  • 51
0
votes
2 answers

How to find the exact years and days

Table id date-of-birth 001 01/01/2011 'dd/mm/yyyy' 002 05/01/2012 003 15/05/2009 .... From the above table, i want to calculate number of days from date-of-join column, date-of-birth should be validate from current year. Finding the date…
JetJack
  • 978
  • 8
  • 26
  • 51