Hello,
could somebody help to involve IF THEN loop into above code. Namely, I am trying to fine tune it by watching RowId number on such way that IF, RowId is less then 1000, the code remains the same. But, if RowId is equal to 1000 or > 1000 AND first letter of last name does not change...
Thanks a lot to both of you. The code provided by Mr. GMMASTROS works with remark that Partition By and Order By needs to be reversed i.e., Partition by Column1, Order by LastName etc....as MR.DRLEX proposed.
Thanks!
Hello,
the code "works", only comma by the last FathersName has to be deleted before but, outcome of query is just e.g., if column1 value was 001A001 and total number of occurencies (count) of it was approx. 4500 (count of column1 = count column3, it is negligible which column it counts, result...
Hello, as of now I get this error prompt:(sql server 2008 R2)
Msg 156, Level 15, State 1, Line 15
Incorrect syntax near the keyword 'From'.
Could it be possible that code which I can see is the complete code? This is what I can see from your reply:
; With Data As
(
Select Column1...
Hello,
could somebody help me to create query which should count number of values in column3 filtered by the values in column1 and if:
1) count exceeds e.g., 4000, create new column and split the values from column1 into 5 new values i.e., first 1000 into the same value like in column1 +...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.