not Using first and last

not Using first and last

Post by Roy Goldhamme » Tue, 21 Jan 2003 01:56:41



Hello there

I have mdb file that i want to transfare to adp file.

one of the quries that don't transfare to sql server are quries width first
and last functions.

I tried to build diffrent quries without first and last and i succedded by
adding subqurey to the quries

The problem of the subquries is that they work slower and on many data the
qurey stuck.

Can someone help me how to solve it?

 
 
 

not Using first and last

Post by Mary Chipma » Tue, 21 Jan 2003 06:29:03


See SQL Books Online for MIN, MAX, the COUNT and TOP keywords.

-- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446

On Sun, 19 Jan 2003 18:56:41 +0200, "Roy Goldhammer"


>Hello there

>I have mdb file that i want to transfare to adp file.

>one of the quries that don't transfare to sql server are quries width first
>and last functions.

>I tried to build diffrent quries without first and last and i succedded by
>adding subqurey to the quries

>The problem of the subquries is that they work slower and on many data the
>qurey stuck.

>Can someone help me how to solve it?


 
 
 

not Using first and last

Post by Daran Johnso » Fri, 24 Jan 2003 00:57:50


Roy,

There is no first and last function in SQL Server.  You
can use Max and Min to find the highest and lowest
values.  Records are organized by the clustered index on
the table.  

Daran

Quote:>-----Original Message-----
>Hello there

>I have mdb file that i want to transfare to adp file.

>one of the quries that don't transfare to sql server are
quries width first
>and last functions.

>I tried to build diffrent quries without first and last
and i succedded by
>adding subqurey to the quries

>The problem of the subquries is that they work slower and
on many data the
>qurey stuck.

>Can someone help me how to solve it?

>.

 
 
 

1. Procedure returns first EXEC not last?

Hi,

I want to create a procedure that checks whether a server is updated or not.
I compare a number on the client with a number on the server - the one with
the smallest number is not updated.

Here is some code from my procedure:
------------------------------------------------------------

varchar(20)

-- Get local IN_SYNC value

-- Get server's IN_SYNC value


------------------------------------------------------------

The procedures get_insync_* returns the right values, but executing this
procedure returns the first get_insync_local value, and my last SELECT IF
does not validate at all.

What am I doing wrong?

--
Best regards,

Alexander Ris?y
IT Team
Nebb Engineering

2. Help with a Group By and Subquery's

3. Stored Procedure not using first wildcard

4. Loading XML document into SQL Server 2000

5. The last distributor job id and the last subscriber job id do not match

6. [GENERAL] Feature enhancement request : use of libgda in

7. Using ADO to Read a Text File Does not Return First Record

8. cannot open table - problem

9. First/Last Record in a ResultSet

10. first, last, etc.

11. Last day of month, first,...

12. First() and Last()

13. HELP SELECT LAST & FIRST