Jump to content
Sign in to follow this  
DataCobalt

Sql Over Function Syntax?

Recommended Posts

Good morning all,

 

I am currently trying to build a tabular report that will display a certain field from multiple entries next to one another.

 

Now I know how to select the top record and sorting by a certain field to be able to get one. But I am trying to select from a specific entry so that the table would display each appointment time, in order, in one row.

 

Here is what I have:

Select  EstimatedAppDateTime

OVER 
(Order By EstimatedAppDateTime desc ROWS between 1 and 1 )

Where Job_RID= target.[@field:MM_Job_Record_ID] AND Location_Not_Used_DateTime is null 

This returns the error that the syntax of the OVER function is incorrect.

 

Any ideas?

 

Alternatively, if you have another way to easily display the records in one row I would be very appreciative.

 

Thanks in advance!

 

 

 

Share this post


Link to post
Share on other sites

Hello DataCobalt,

 

As far as I know, the SELECT in a Calculated field can return only one value. If more than one value is returned, the "Error in formula" will be displayed.

 

Maybe you can use Grouping?

I apologize if the question is silly, I am not sure that clearly understand your goal.

Share this post


Link to post
Share on other sites

Hello DataCobalt,

 

As far as I know, the SELECT in a Calculated field can return only one value. If more than one value is returned, the "Error in formula" will be displayed.

 

Maybe you can use Grouping?

I apologize if the question is silly, I am not sure that clearly understand your goal.

 

 

No problem Jan,

 

It absolutely would return that error but I plan on restricting it to one row at a time.

 

I just want to be able to select exactly WHICH row it pulls information from based on my sorting.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...