Click here to Skip to main content
15,903,362 members
Home / Discussions / Database
   

Database

 
GeneralRe: Create recurring date in SQL statement Pin
nelsonpaixao17-Sep-08 12:04
nelsonpaixao17-Sep-08 12:04 
GeneralRe: Create recurring date in SQL statement Pin
Shane Leach18-Sep-08 3:29
Shane Leach18-Sep-08 3:29 
AnswerRe: Create recurring date in SQL statement Pin
RyanEK17-Sep-08 14:24
RyanEK17-Sep-08 14:24 
GeneralRe: Create recurring date in SQL statement Pin
Shane Leach18-Sep-08 3:27
Shane Leach18-Sep-08 3:27 
GeneralRe: Create recurring date in SQL statement Pin
RyanEK18-Sep-08 14:50
RyanEK18-Sep-08 14:50 
Questioncan someone help me to code add, edit, delete, search in mysql database using C#.. Pin
cutedrew17-Sep-08 9:59
cutedrew17-Sep-08 9:59 
GeneralRe: can someone help me to code add, edit, delete, search in mysql database using C#.. Pin
nelsonpaixao17-Sep-08 12:10
nelsonpaixao17-Sep-08 12:10 
QuestionSQL Server 2000 sp3 and the WITH Clause in Stored Procedures Pin
Steven J Jowett17-Sep-08 9:28
Steven J Jowett17-Sep-08 9:28 
I have a stored procedure as follows, which runs OK on SQL Server 2005.

CREATE PROCEDURE spGetChildAccounts 
	@ParentId Char(12)
AS
BEGIN
	SET NOCOUNT ON;
	WITH Subsidaries (ACCOUNTID,ParentID)
	AS
	(
		SELECT ACCOUNTID, ParentID FROM Accounts WHERE ParentID = @parentID
		UNION ALL
		SELECT Accounts.ACCOUNTID, Accounts.ParentID FROM Accounts
            INNER JOIN Subsidaries ON Accounts.ParentID = Subsidaries.ACCOUNTID
	)
	SELECT * FROM Accounts INNER JOIN Subsidaries ON Accounts.ACCOUNTID = Subsidaries.ACCOUNTID
END


The problem is that it has to run on SQL Server 2000 sp3 and when I try to create the procedure on the 2000 server it get an error "Incorrect syntax near the keyword WITH".

I am assuming the WITH statement is not supported in 2000 and would appreciate any help converting the above stored procedure to a vaild SQL Server 2000 format.

Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.

AnswerRe: SQL Server 2000 sp3 and the WITH Clause in Stored Procedures Pin
Blue_Boy17-Sep-08 9:45
Blue_Boy17-Sep-08 9:45 
GeneralRe: SQL Server 2000 sp3 and the WITH Clause in Stored Procedures Pin
Steven J Jowett17-Sep-08 10:03
Steven J Jowett17-Sep-08 10:03 
AnswerRe: SQL Server 2000 sp3 and the WITH Clause in Stored Procedures Pin
Mycroft Holmes17-Sep-08 20:15
professionalMycroft Holmes17-Sep-08 20:15 
AnswerRe: SQL Server 2000 sp3 and the WITH Clause in Stored Procedures Pin
Ashfield17-Sep-08 21:53
Ashfield17-Sep-08 21:53 
QuestionGetting Data for current month - Urgent Pin
notes4we17-Sep-08 5:07
notes4we17-Sep-08 5:07 
AnswerRe: Getting Data for current month - Urgent Pin
nelsonpaixao17-Sep-08 12:16
nelsonpaixao17-Sep-08 12:16 
AnswerRe: Getting Data for current month - Urgent Pin
RyanEK17-Sep-08 14:28
RyanEK17-Sep-08 14:28 
AnswerRe: Getting Data for current month - Urgent Pin
notes4we18-Sep-08 3:09
notes4we18-Sep-08 3:09 
QuestionUnique key Pin
topcatalpha17-Sep-08 3:39
topcatalpha17-Sep-08 3:39 
AnswerRe: Unique key Pin
PIEBALDconsult17-Sep-08 3:58
mvePIEBALDconsult17-Sep-08 3:58 
GeneralRe: Unique key Pin
topcatalpha17-Sep-08 4:23
topcatalpha17-Sep-08 4:23 
GeneralRe: Unique key Pin
nelsonpaixao17-Sep-08 12:23
nelsonpaixao17-Sep-08 12:23 
QuestionHow to get last row from a table? Pin
JUNEYT17-Sep-08 3:17
JUNEYT17-Sep-08 3:17 
AnswerRe: How to get last row from a table? Pin
Giorgi Dalakishvili17-Sep-08 3:34
mentorGiorgi Dalakishvili17-Sep-08 3:34 
AnswerNo Last Row Pin
David Mujica17-Sep-08 6:15
David Mujica17-Sep-08 6:15 
AnswerRe: How to get last row from a table? Pin
nelsonpaixao17-Sep-08 12:29
nelsonpaixao17-Sep-08 12:29 
QuestionDatabase optimization Pin
Mohammed Hameed17-Sep-08 0:01
professionalMohammed Hameed17-Sep-08 0:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.