sql-server-2000 Questions
10
Solved
I am creating a winform application in c#.and using sql database.
I have one table, employee_master, which has columns like Id, name, address and phone no. Id is auto increment and all other datat...
Horney asked 13/7, 2012 at 10:53
3
Solved
Can anyone find my error in this query? I'm using SQL Server 2000 and I want to update all entries in the CostEntry table to the corresponding value in the ActiveCostDetails table. The where clause...
Foxglove asked 5/10, 2010 at 19:49
5
Solved
Is there a printf-like function in Sql Server? I want the same features as the RAISERROR function, but instead of throwing an error, or printing a message, I want to write it in a varchar, because ...
Ferreby asked 28/2, 2011 at 10:2
6
Solved
Simple question, as the title suggests:
What is the syntax to drop a Stored Procedure (SP) in SQL Server 2000, by first checking that the SP exists?
Please provide the full code.
Crisis asked 2/8, 2010 at 10:48
6
Table1
id
01
wire
02
steve
ram123
03
....
from the table1 i want to select only numeric values,
It should not display alphanumeric values like (ram123)
Expected Output
01
02
03
....
How to...
Prognosis asked 30/9, 2012 at 6:18
7
Solved
I have a stored procedure in SQL Server 2000 that performs a search based on parameter values. For one of the parameters passed in, I need a different WHERE clause depending on its value - the prob...
Grapery asked 1/5, 2009 at 9:2
9
Solved
I have a number of stored procedures I call from code with ExecuteNonQuery.
It was all good but 2 of my stored procedures started timing out intermittently today with:
Timeout expired. The time...
Zillah asked 5/2, 2009 at 11:17
6
Solved
How do I get the row number in an SQL query using SQL Server 2000, where the ROW_NUMBER() function is not supported?
Bautista asked 16/11, 2009 at 13:3
6
Not sure if this is even allowed, but if so, can someone tell me what the T-SQL is? I've tried the following but to no avail.
alter [View_Name]
alter column [Coln_Name] [New size/length] not null
...
Stripy asked 5/1, 2012 at 15:40
4
Solved
Does anyone know of any way to list open transactions on SQL Server 2000 database?
I am aware that I can query the view sys.dm_tran_session_transactions on SQL 2005 (and later) database versions, ...
Clothing asked 15/12, 2010 at 12:10
7
Solved
How do I get structure of temp table then delete temp table. Is there a sp_helptext for temp tables? Finally is it possible to then delete temp table in same session or query window?
Example:
sele...
Tapes asked 23/1, 2012 at 18:7
6
Solved
I have the field:
APP_DATE (smalldatetime)
I'm doing this query:
INSERT INTO table (TYPE, CODE, APP_DATE, DATE) VALUES ('APP', '123', '02/10/2010 12.30', GETDATE())
It fails:
Msg 296, Level ...
Fechter asked 23/2, 2010 at 13:47
3
Solved
Flag1 is a varchar column with values "true" and "false". I need to convert this into bit column.
When I try to do this:
Convert(Bit,Flag1)
it shows an error
Msg 245, Level 16, State 1, Line 2...
Banister asked 13/3, 2014 at 15:13
7
Solved
I've got a table of invoices and a child table of related data related by key. In particular, for each invoice, I'm interested in only the first related row from the child table. Given that I want ...
Kendall asked 14/1, 2011 at 15:5
4
Solved
I need to run a query against a legacy table that stores URL encoded text. I need this text to be decoded in my results. How do I achieve this?
Grandeur asked 30/9, 2010 at 17:32
3
Solved
I am looking for a quick-and-dirty way to import CSV files into SQL Server without having to create the table beforehand and define its columns.
Each imported CSV would be imported into its own t...
Trilemma asked 2/5, 2012 at 17:7
2
Solved
Is there a way, in SQL Server, to declare a table variable without knowing the table definitions?
Exempli gratia:
DECLARE @Results TABLE
INSERT INTO @Results EXEC MyProc @param1 = @myValue
or
...
Carpophore asked 10/11, 2010 at 15:31
8
Solved
Is there a way to persist a variable across a go?
Declare @bob as varchar(50);
Set @bob = 'SweetDB';
GO
USE @bob --- see note below
GO
INSERT INTO @bob.[dbo].[ProjectVersion] ([DB_Name], [Script]...
Chant asked 1/6, 2009 at 23:47
4
I have an installer which as part of the installation creates a SQL Server 2000 (and up) database.
Some users change database server, detach database, ... and want to reinstall.
If the file exist...
Beginner asked 18/5, 2011 at 8:25
5
Solved
I have been searching for an answer for the last 30 minutes on google, but haven't been able to find a satisfactory answer.
I am able to retrieve a list of db logins from the syslogins table, but...
Xerosere asked 13/11, 2011 at 22:30
3
Solved
I want write a query to get the last 24 hours worth of job record from the "msdb.dbo.sysjobhistory" table, but I can't get because I get the "run_date" and "run_time" columns are returned as a numb...
Polad asked 9/10, 2010 at 6:41
4
Solved
I need to convert Datetime fields to a specifically formatted INT type. For example, I want
2000-01-01 00:00:00.000 to convert to 20010101.
What is the most performant way to make that conversio...
Sweater asked 1/9, 2010 at 16:30
10
Solved
How will you find last sunday of a month in sql 2000?
Testator asked 25/11, 2009 at 4:48
5
Solved
I have a stored procedure for SQL Server 2000 that can only have a single instance being executed at any given moment. Is there any way to check and ensure that the procedure is not currently in ex...
Koblas asked 29/7, 2009 at 21:5
2
Solved
I've a query like below:-
DECLARE @rptID VARCHAR(8)
SET @rptID = (SELECT reportID FROM Reports)
In general @rptID contains numeric digits like '00001234' etc. But is there any way to validate if...
Sall asked 12/8, 2013 at 13:46
© 2022 - 2024 — McMap. All rights reserved.