sql-server-2000 Questions
6
Solved
I know I can get a list of tables from a given database with the following query:
select *
from information_schema.tables
How do I go about excluding system tables though?
Persia asked 9/7, 2010 at 20:14
8
Solved
SQL Server 2000 was deployed with English Query. At that time, I was young and new to SQL so I skipped that chapter. Now after years, there is again an idea of making a logical program which can un...
Hell asked 20/5, 2009 at 6:58
10
I am using SQL2000 and I would like to join two table together based on their positions
For example consider the following 2 tables:
table1
-------
name
-------
'cat'
'dog'
'mouse'
table2
-----...
Inweave asked 27/4, 2009 at 11:52
45
Solved
How can I add a column with a default value to an existing table in SQL Server 2000 / SQL Server 2005?
Helvetian asked 18/9, 2008 at 12:30
7
How can I get the time for a given datetime value?
I have a datetime in database like this:
2010-09-06 17:07:28.170
and want only the time portion:
17:07:28.170
Is there a function for that or so...
Freezing asked 7/9, 2010 at 7:14
7
Solved
I have a trigger which deals with some data for logging purposes like so:
CREATE TRIGGER trgDataUpdated
ON tblData FOR UPDATE
AS
BEGIN
INSERT INTO tblLog ( ParentID, OldValue, NewValue, UserID ...
Castleman asked 15/4, 2010 at 15:13
30
Solved
I would like this to be the ultimate discussion on how to check if a table exists in SQL Server 2000/2005 using SQL Statements.
Here are two possible ways of doing it. Which one is the standard/bes...
Vasilek asked 3/10, 2008 at 16:0
5
Solved
I need to export some data using SQL Server 2000's BCP utility. Sometimes my data contains characters, such as \t and \n, that I need to use as column and row terminators. How do I get BCP to escap...
Eustatius asked 29/12, 2009 at 18:24
3
Solved
I was writing a query against a table today on a SQL Server 2000 box, and while writing the query in Query Analyzer, to my surprise I noticed the word LineNo was converted to blue text.
It appear...
Prebo asked 29/10, 2010 at 17:50
13
Solved
I need to make a temporary table that holds of range of dates, as well as a couple of columns that hold placeholder values (0) for future use. The dates I need are the first day of each month betwe...
Barnum asked 25/5, 2011 at 13:50
2
Solved
I want to check if SQL logins have passwords same as thier login name. E.g. login name 'abc123' has password= 'abc123'.
I need to do this for a security audit across many 2000 and 2005 servers.
Is...
Polyester asked 22/2, 2010 at 0:9
19
Solved
I realize that parameterized SQL queries is the optimal way to sanitize user input when building queries that contain user input, but I'm wondering what is wrong with taking user input and escaping...
Hemimorphic asked 26/9, 2008 at 12:41
7
Solved
How can I get the records from a db where created date is today's date?
SELECT [Title], [Firstname], [Surname], [Company_name], [Interest]
FROM [dbo].[EXTRANET_users]
WHERE DATE(Submission_date)...
Translucid asked 14/8, 2012 at 15:4
5
Solved
I have a fairly simple query that I keep getting timeouts (it takes over three minutes to complete, I stopped it early so I could post this question) on when it is running in code, however when I r...
Chilson asked 3/10, 2011 at 16:34
8
Solved
I made a view to abstract columns of different tables and pre-filter and pre-sort them. There is one column whose content I don't care about but I need to know whether the content is null or not. S...
Furtek asked 1/10, 2008 at 11:2
4
Solved
I am inserting record in a remote Sql Server using Linked server, Now I wanna get the id of inserted record. something like scope_identity() in local server.
My remote sql server is 2000 version.
...
Relief asked 18/4, 2011 at 21:15
4
Solved
I need to select a nullable bit column in a view, but use a default value of FALSE whenever the value is NULL. (For other reasons, I can't add the default value on the source table itself.) Here is...
Brandibrandice asked 27/7, 2010 at 18:46
23
Solved
Is there a straightforward way of finding the index of the last occurrence of a string using SQL? I am using SQL Server 2000 right now. I basically need the functionality that the .NET System.Strin...
Stope asked 21/6, 2009 at 23:10
9
Solved
I have a stored procedure which executes a select statement. I would like my results ordered by a date field and display all records with NULL dates first and then the most recent dates.
The state...
Chromatograph asked 4/5, 2009 at 20:10
5
i'm trying to call a User-Defined Function (UDF) on a linked server:
CREATE FUNCTION [dbo].[UserGroupMembershipNames](@UserGUID uniqueidentifier)
RETURNS VARCHAR(8000)
AS
BEGIN
RETURN ASILIVE.Re...
Tramel asked 8/11, 2010 at 16:31
21
Solved
I need a different random number for each row in my table. The following seemingly obvious code uses the same random value for each row.
SELECT table_name, RAND() magic_number
FROM information_sc...
Condolence asked 25/6, 2009 at 17:17
4
Solved
I've got a number of ASP.Net websites (.Net v3.5) running on a server with a SQL 2000 database backend. For several months, I've been receiving seemingly random InvalidOperationExceptions with the ...
Vicarage asked 20/7, 2009 at 18:54
19
Solved
Using SQL Server 2000, how can I get the first and last date of the current year?
Expected Output:
01/01/2012 and 31/12/2012
Kornher asked 18/11, 2012 at 4:2
4
Solved
i have two queries being combined with a UNION ALL1:
--Query 1
SELECT Flavor, Color
FROM Friends
--Query 2
SELECT Flavor,
(SELECT TOP 1 Color
FROM Rainbows
WHERE Rainbows.StrangerID =...
School asked 10/9, 2010 at 14:45
6
Solved
I have address data stored in an sql server 2000 database, and I need to pull out all the addresses for a given customer code. The problem is, there are a lot of misspelled addresses, some with mis...
Ratty asked 9/2, 2011 at 22:1
1 Next >
© 2022 - 2024 — McMap. All rights reserved.