|
|
|
|
|
|
|
Finding the nth Row
26/02/2008 10:48:20 AM
(Total replies: 1)
|
| Hi All,
I have a requirement to get the nth row from a table. i've tried the following sql but the problem is that if there are n-1 records in the table, it will return me that rows as the nth row, which is obviously incorect.
SELECT TOP 1 * FROM (SELECT top 5 * FROM TableA order by ID) [A] ORDER BY ID DESC
eg, if i want the 5th record but there are only 4 records in the table, it will return me the 4th record.
any ideas?
Thanks in advanced
|
|
|
|
Re: Finding the nth Row
28/02/2008 9:58:19 AM
(Total replies: 1)
|
| opps, i forgot to mention that i want it to retun an empty result set if there is nothing in the 5th row.
It's a very simple table,
CREATE TABLE [dbo].[Club] (
[ClubID] [int] IDENTITY (1, 1) NOT NULL ,
[Name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Email] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
i want to be able to send out an email once the 150th, 200th...etc club has joined our group.
I was thinking that each ... |
|
|
|
Re: Finding the nth Row
28/02/2008 12:26:44 PM
(Total replies: 0)
|
| Excellent,
It's just what i was after!
Thanks Greg |
|
|
|
Need to store Sum of records in a variable
26/10/2007 1:42:44 PM
(Total replies: 1)
|
| Hi All,
I have OLE DB Source and i want to get the sum of one of the columns from the table and store it into a package variable. Can someone please advise me on how to do that? Fortunately RowCount allows you to store a custom variable, which is what i need to be able to do, or something similar for the sum
Any help/advice will be muchly appreciated
Thanks in advance |
|
|
|
|
|
|
Supporting mulitple mobile OS devices with SQL 2000
11/07/2007 10:53:11 AM
(Total replies: 0)
|
| Hi,
I currently have a web application that uses sql server replication to sync between the server and mobile devices. Currently the only types of mobile devices we are using are Pocket PC 2003.
With the introduction of new OS's such as Windows Mobile 5.0, what is the best way to handle the changes required for replication?
To run our application the devices require different supporting CAB files, i.e.
Windows Mobile 5.0 requires, .NETCF 2.0, SQL Server 2005 Mobile Edition
Pocket ... |
|
|
|
Multiple snapshot folders
25/05/2007 2:02:09 PM
(Total replies: 1)
|
| Hi,
I'm having this problem with snapshot replication. Everytime the snapshot is run, it creates the snapshot in a new folder instead of creating it in the same folder.
Now i have over 100 folders in my repldata folder which is taking up value disk space. this is growing everyday since the snapshot is scheduled to run once a day.
This is happening on one of our servers but not the other. both have the same setup/configuration.
is there a setting i need to change?
has any one come ... |
|
|
|
Re: Multiple snapshot folders
11/07/2007 10:43:07 AM
(Total replies: 0)
|
| problem was solved...
the issue was that the MergeAgent account didn't have appropriate permissions to delete the old folders |
|