Viewing 13 posts - 1 through 14 (of 14 total)
I need NewTitle can be unique.
If I remove PARTITION BY it returns all NewTitle which isn't uinique.
June 12, 2014 at 9:10 am
I fixed it.
Thanks every one that helped me:-)
June 5, 2014 at 7:25 am
Where are you adding your conditions? Can you post the code that gives you an error?
Thanks, I solved it.
This is my final stored procedure:
Create PROCEDURE [dbo].[NewsPageWise]
...
June 5, 2014 at 5:13 am
My magical crystal ball can't find the error. Could you share it with us?
I need to add
Where CatId=1 (or etc.)
It causes an error
June 4, 2014 at 3:36 pm
WITH CTE AS(
SELECT ROW_NUMBER() OVER(PARTITION BY n.NewTitle ORDER BY n.NewId) rn,
n.NewId,
...
June 4, 2014 at 3:26 pm
rn=1
What is it?
Which values of NewId, CatId and NewDate do you want when there are multiples?
Related NewTitle with that fields
June 4, 2014 at 3:13 pm
What I need is like:
Select Distinct (NewTitle) From News
But I need NewId, CatId and NewDate fields value, too.
June 4, 2014 at 3:00 pm
He means what are the business rules to get that? For example, you don't have NewId 1 in your output. Why not? We can help with the query portion but...
June 4, 2014 at 2:53 pm
Can you explain how do you get to that result?
This is my question! How can I get to that result?
June 4, 2014 at 2:26 pm
Insert Into News (NewTitle, NewDate) Values ('A','2014-06-04 12:11:17.087')
Insert Into News (NewTitle, NewDate) Values ('B','2014-06-04 12:11:17.087')
Insert Into News (NewTitle, NewDate) Values ('C','2014-06-04 12:11:17.087')
Insert Into News (NewTitle, NewDate) Values ('D','2014-06-04 12:11:17.087')
Insert Into...
June 4, 2014 at 2:06 pm
Why are you joining all three tables if you only use tables from News?
Because I need values of other tableas, too.
Could you post sample data and expected results?
NewIdNewTitleNewDate
1A2014-06-04 12:11:17.087
2B2014-06-04 12:11:17.087
3C2014-06-04...
June 4, 2014 at 1:43 pm
Viewing 13 posts - 1 through 14 (of 14 total)