sql-server-2000 Questions

5

I have field called CallingParty in My CDR table it contains data like this: CallingParty ------------ 267672668788 I want to select the first 3 number of each of those numbers like CallingParty -...
Guttersnipe asked 31/5, 2012 at 6:57

5

Solved

I've got a query I'm working on and I want to increment one of the fields and restart the counter when a key value is different. I know this code doesn't work. Programmatically this is what I wan...
Olander asked 9/7, 2010 at 16:17

10

Solved

I'll use a concrete, but hypothetical, example. Each Order normally has only one line item: Orders: OrderGUID OrderNumber ========= ============ {FFB2...} STL-7442-1 {3EC6...} MPT-9931-8A Lin...
Ebeneser asked 11/1, 2010 at 16:44

5

Solved

I have a stored procedure that creates and opens some cursors. It closes them at the end, but if it hits an error those cursors are left open! Then subsequent runs fail when it tries to create curs...
Cleopatracleopatre asked 5/11, 2008 at 16:2

6

I need to create an application for monitoring SQL Server 2000 Agent Job status and info when Job occur same as show on Windows application event log. Now I connect to the database already via a co...
Armpit asked 21/9, 2010 at 4:35

3

Using SQL Server 2000, is there a way to search for a pattern globally in all trigger procedures? Where a stored procedure is being called is hiding from me. This is my first post so be kind.
Sacramentarian asked 22/3, 2013 at 17:59

2

Solved

In Sql Server 2000, is it possible to return, via SQL query, a complete list of database roles that exist in a given database? I know it is possible to see these roles by expanding the Security, R...
Monoxide asked 3/1, 2013 at 16:36

3

###RFC 4180: RFC 4180 defines Common Format and MIME Type for Comma-Separated Values (CSV) Files. One of the requirements of the RFC 4180 is stated as below. This is the point #7 in the RFC link. I...
Future asked 11/2, 2013 at 15:45

2

Solved

I have a table Items, which has fields Inventory and ItemId (the primary key). And I have another table Allocations, which has fields Allocation and ItemId, which is a foreign key referencing Ite...
Microeconomics asked 6/6, 2018 at 17:37

4

Solved

Any suggestions how to join tables from different servers in stored procedure?
Druid asked 6/1, 2012 at 1:51

5

Solved

I have a table with data similar to the following: [ID], [State], [foo], [DateCreated], [DateUpdated] The longer I work on this, the uglier my SQL is getting, which tells me I'm probably doing so...
Foxglove asked 10/7, 2012 at 17:40

5

Solved

What is the best way to replace all '&lt' with < in a given database column? Basically perform s/&lt[^;]/</gi Notes: must work in MS SQL Server 2000 Must be repeatable (and...
Gabbi asked 29/9, 2008 at 22:16

5

Solved

I generated script from old database, created a new database and imported all data from old database. So far so good, however, no user has execute rights for stored procedures. I know I can use GRA...
Youthful asked 25/3, 2011 at 4:1

10

Solved

I know this must be simple, but how do I preface the creation of a function with a check to see if it already exists? If it exists, I want to drop and re-create it.
Drawbridge asked 18/2, 2010 at 17:36

4

Solved

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...
Davey asked 13/8, 2010 at 7:44

6

Solved

Is it possible to define a sort order for the returned results? I would like the sort order to be 'orange' 'apple' 'strawberry' not ascending or descending. I know ORDER BY can do ASC or DESC but...
Pathogen asked 25/1, 2011 at 1:52

6

Solved

I have a bunch of orderIds '1, 18, 1000, 77 ...' that I'm retreiving from a nvarchar(8000). I am trying to parse this string and put the id into a temporary table. Is there a simple and effective w...
Natishanative asked 21/4, 2011 at 2:25

2

Solved

I've got the problem that select datepart(ww, '20100208') is returning as result week 7 in SQL Server 2000. But 08.02.2010 should be week 6 according to the ISO 8601 specification! This is causi...
Sitzmark asked 8/2, 2010 at 10:12

2

Solved

I tried the following on SQL-Server: create table #TmpLOGSPACE( DatabaseName varchar(100) , LOGSIZE_MB decimal(18, 9) , LOGSPACE_USED decimal(18, 9) , LOGSTATUS decimal(18, 9)) insert #TmpLO...
Anglonorman asked 10/5, 2011 at 7:46

2

Solved

This is a follow-up of a question I asked earlier this morning (posted here.) Following the instructions provided, I've managed to query my SQL Server 2000 database for a SID associated with an AD ...

4

I have a query that allows me to get records from a database table by giving it a minimum and maximum limit. It goes like this: SELECT T1.CDUSUARIO, T1.DSALIAS, T1.DSNOMBRE_EMPRESA, T1.DSCARGO, ...
Amphibrach asked 2/11, 2010 at 20:20

7

Solved

In order to perform a case-sensitive search/replace on a table in a SQL Server 2000/2005 database, you must use the correct collation. How do you determine whether the default collation for a data...
Moribund asked 22/9, 2008 at 9:2

4

Solved

I need to round money values up to the nearest cent, then do some operations on that rounded value. I cannot use Round() because this will also round down. These are all money values. 123.4567 -->...
Fallonfallout asked 31/8, 2011 at 19:51

5

Solved

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 ...
Voile asked 13/8, 2010 at 5:8

4

Solved

Is there a way to query the database and retrieve a list of all stored procedures and their parameters? I am using SQL Server 2000.
Clemons asked 28/2, 2010 at 11:38

© 2022 - 2024 — McMap. All rights reserved.