Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


rows unbounded preceding in sql server 11

rows unbounded preceding in sql server 11

rows unbounded preceding in sql server 11

Hi Guys,

I'm using this sproc in sql server 12 locally.

CODE -->
ALTER PROCEDURE [dbo].[Admin_Metrics_GetApplicationsByJobID]

@JobID int





cast(a.appdate as datetime) as xdate ,
sum(appcounter) over (order by appdate rows unbounded preceding) as cumulativeapps,
(u.uFirstName + ' ' + u.uFamilyName) as x2name

from tbl_Applications a
INNER JOIN tbl_MD_userDetails u

where jobid=@JobID AND astatus > 0
group by a.appdate, a.appcounter,a.uniqueappid, (u.uFirstName + ' ' + u.uFamilyName)
order by xdate;


However my remote server is version 11 and this code appears not to work - I guess the highlighted line.
Does anyone know what I could use in place for sql 11 please?
It's used for a chart that shows a running order of job applications in a line chart.



RE: rows unbounded preceding in sql server 11

1. Use TGML - look around where you post threads, and there are instructions. In this case, use the [CODE][/CODE] tags.
2. Highlighted? Where? Again - TGML tags will help you here. And now you can use the highlight menu item instead of typing the TGML codes.

If you've got something running fine on one version of SQL (just like any other application), in this case version 12, but it will not run without error on a prior version, the first thing to check is whether you're using a new function/method/procedure. We cannot see what line is highlighted, so I just have to guess at it. I'm not reading your unformatted code and guessing.

Next thing I'd check if no difference between versions is whether you've got this setup to run correctly against a remote SQL Server. When you say remote, I assume you mean you have a local instance of SQL Server 12 and a remote instance of SQL Server 11, both using the same Windows credentials, network, etc, but that SQL is having to make the remote connection.

And now thinking about the remote piece... it could very well be that you need to fully qualify your objects. Fully qualifying objects, such as tables, is always a good idea, and a good thing to practice. I see tbl_MD_userDetails has no qualifications.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close