sql-server-2000 Questions

2

Solved

I'm trying to calculate percent off values for dollar amounts. At 50%, sometimes you get half a penny, and I need to round it to the nearest cent. In Sql, my calculation is as follows: round(reta...
Selfdenial asked 21/10, 2011 at 17:14

1

Solved

Preface: I have looked all over stackoverflow.com and google for this. I have found hundreds of possible answers but either its not the correct SQL Server version or its not for SQL Server at all a...
Finstad asked 14/10, 2011 at 19:32

3

i am running a delete statement: DELETE FROM TransactionEntries WHERE SessionGUID = @SessionGUID The actual execution plan of the delete is: Execution Tree -------------- Clustered Index Delete...
Haslam asked 5/10, 2011 at 15:58

4

Solved

I'm developing a database-driven web application. I'm not always connected to the network so I'd like to setup a development environment on my laptop with a SQL Server database. The database won't ...
Miun asked 3/10, 2011 at 16:23

2

Solved

I have have two SQL Server's that I primarily use (a 2005 instance and a 2000.) My permission structure works as such-- First I create an Active Directory Group and then I add all necessary user's...

1

Solved

I want to search a table for all rows that contain a non-alphanumeric and non-space character in a specific field. What I have so far: SELECT * FROM myTable WHERE myField LIKE '%[^a-zA-Z0-9]%' A...
Alejoa asked 26/7, 2011 at 7:23

2

Any idea how I can update a column but only for row number=1 to row number=10 for example?
Multilingual asked 18/7, 2011 at 7:7

1

Solved

background: We recently upgraded to handle UTC. ie., went thru each sp and func and changed the t-sql code to handle utc. For eg., changed getdate() to getutcdate() etc. For new shipments we are go...

3

Solved

When executing a SELECT statement with a JOIN of two tables SQL Server seems to lock both tables of the statement individually. For example by a query like this: SELECT ... FROM table1 LEFT JOIN...
Hippy asked 14/9, 2010 at 20:53

3

We are facing a situation in one of our production server. We have a particular Store procedure which perform an Insert operation on one of the biggest tables in the DB (It has more than a few mill...
Begum asked 6/4, 2011 at 6:32

2

Solved

I have a query that I pulled from ms sql 2000 and plugged into a MySql query. It did not work, MySql would choke on the *= operator. In this example I have two varchar columns called person_name. ...
Quiver asked 7/6, 2011 at 18:23

6

Solved

I have a SQL Server 2000 database with approximately 220 tables. These tables have a number foreign key relationships between them. Through performance analysis, we've discovered a number of these ...
Invalidate asked 10/9, 2009 at 15:51

2

Solved

Under other circumstances I might be tempted to use $result = mssql_query("INSERT INTO table (fields) VALUES (data); SELECT CAST(scope_identity() AS int)"); but as I will be inserting user-sub...
Kettering asked 26/5, 2011 at 14:47

5

I have a table which contains an ID and a Date for an event. Each row is for one date. I am trying to determine consecutive date ranges and consolidate output to show the ID,StartDate,EndDate ID D...
Steenbok asked 5/5, 2011 at 16:54

1

Solved

The OUTPUT clause is compatible with SQL Server 2005 but not SQL Server 2000. How do I convert this command to work in SQL Server 2000? CREATE TABLE sample ( ID uniqueidentifier NOT NULL DEFAULT...
Reductive asked 2/5, 2011 at 22:29

4

Solved

I put together a sample scenario of my issue and I hope its enough for someone to point me in the right direction. I have two tables Products Product Meta I need a result set of the followi...
Elanorelapid asked 23/11, 2008 at 19:42

2

Solved

I am not looking for help with the actual code of my stored procedure (yet anyway), but a client sent me a copy of his SQL Server 2000 database stating that a particular proc was returning incorrec...
Ortolan asked 25/4, 2011 at 20:49

2

Solved

I want to end up with a sort of Calendar that shows the different scheduled jobs and their steps (the exact command executed). But I"m having a hard time finding all the data. So my question is two...
Ravenravening asked 18/4, 2011 at 17:29

2

I have a table with column a having not necessarily distinct values and column b having for each value of a a number of distinct values. I want to get a result having each value of a appearing only...
Inkblot asked 6/4, 2011 at 8:36

1

There is no try...catch in sql server 2000 like in 2005? If not what is the equivalent for try...catch in 2000? If there is, what is the correct syntax?
Samekh asked 5/4, 2011 at 13:21

5

Solved

I am working with T-SQL in SQL Server 2000 and I have a table TRANSACTIONS which has a date column TRANDATE defined as DateTime, among many other columns which are irrelevant for this question.. T...
Lamartine asked 25/3, 2011 at 14:45

4

Solved

I have the following insert statement which works fine on one system running SQL Server 2008 but I've tried the same thing on a system running 2000 and it gives an error... Is there an easy fix fo...
Stacey asked 21/3, 2011 at 9:52

1

How do I generate scripts for all tables with a single stroke in SQL Server 2000?
Margemargeaux asked 25/2, 2011 at 7:25

3

Solved

Google-fu is failing me on this one. Can anyone briefly explain what the following statement would do?: UPDATE message WITH (ROWLOCK) SET message = message | 2 I found this in a trigger,...
Bowman asked 14/2, 2011 at 14:49

1

Solved

Is there a simple query to return whether a specific column allows nulls? I want to change this as part of a DB upgrade script. Alternatively, is it better to just change it, even if its already s...
Complacence asked 9/2, 2011 at 17:26

© 2022 - 2024 — McMap. All rights reserved.