Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 To: Manish Swami
  Where is Manish Swami?
 SRI GANGANAGAR
 India
 Manish Swami
 Tags
Subject: RE: SQL Server Error (Driver)
Thread ID: 394008 Message ID: 394024 # Views: 48 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Saturday, December 28, 2013 6:17:20 PM         
   


> I m using first time SQL server and there is a problem ...
>
> Error :
>
>
>
> Regards
>
> MANISH SWAMI
> www.gaurisoftwares.com
> My Blog : - www.gaurisoftwares.blogspot.com
> code.google.com/p/gaurisoftwares


Hi,

The reason for your error is the row_number() function was only introduced starting
with SQL Server 2005. In SQL Server 2000 this function call did not exist yet.

In order to achieve a row number in SQL Server 2000 the SQL below will achieve this for
you:

In the below code based upon getting row number from an Employee table
with a already existing primary key of EmployeeId.
I am using a temp table as an intermediate work-a-round.

SELECT IDENTITY(int, 1,1) AS RowNumber, EmployeeId INTO #Temp 
	FROM Employee ORDER BY EmployeeId ASC
SELECT * FROM #Temp ORDER BY RowNumber DROP TABLE #Temp


Pete "the IceMan", from the Great White North of Canada.
www.marathongriffincomputers.com

ENTIRE THREAD

SQL Server Error (Driver) Posted by Manish Swami @ 12/28/2013 1:23:22 PM
RE: SQL Server Error (Driver) Posted by David Mustakim @ 12/28/2013 1:29:13 PM
RE: SQL Server Error (Driver) Posted by Manish Swami @ 12/28/2013 1:42:33 PM
RE: SQL Server Error (Driver) Posted by David Mustakim @ 12/28/2013 2:03:40 PM
RE: SQL Server Error (Driver) Posted by Manish Swami @ 12/28/2013 4:11:21 PM
RE: SQL Server Error (Driver) Posted by Pete Sass @ 12/28/2013 6:17:20 PM
RE: SQL Server Error (Driver) Posted by Manish Swami @ 1/1/2014 3:29:24 PM