Viewing 15 posts - 2,806 through 2,820 (of 8,731 total)
Probably this could help. The problem is that you have a char(10) and you're looking for 8-character strings.
SELECT *
FROM dbo.Postcode
WHERE p_code LIKE N'___ ___ ';
May 26, 2016 at 6:39 am
Brandie Tarvin (5/26/2016)
BWFC (5/26/2016)
Brandie Tarvin (5/25/2016)
Brandie Tarvin (5/25/2016)
<singing>
All the lonely servers. Where do they all come from? All the lonely servers... Where doooo they allllllllllllllllll come from?
Sigh. Wish wish wish...
May 26, 2016 at 5:52 am
Gazareth (5/25/2016)
jasona.work (5/25/2016)
Eirikur Eiriksson (5/25/2016)
Brandie Tarvin (5/25/2016)
Brandie Tarvin (5/25/2016)
<singing>
All the lonely servers. Where do they all come from? All the lonely servers... Where doooo they allllllllllllllllll come from?
Sigh. Wish wish...
May 25, 2016 at 11:03 am
Use a "self" join. In other words, join the table to itself.
May 25, 2016 at 10:23 am
ThomasRushton (5/25/2016)
Ed Wagner (5/25/2016)
Manic Star (5/25/2016)
Hugo Kornelis (5/25/2016)
Grumpy DBA (5/25/2016)
ThomasRushton (5/25/2016)
painJoy and
Heaven and
Chocolate Sprinkles
Ice Cream
Cake!
Birthday
May 25, 2016 at 10:13 am
Manic Star (5/24/2016)
crookj (5/24/2016)
HappyGeek (5/24/2016)
Manic Star (5/24/2016)
Grumpy DBA (5/24/2016)
Manic Star (5/24/2016)
Ray K (5/24/2016)
Ed Wagner (5/24/2016)
crookj (5/24/2016)
RiftContinuum
Vacuum
Cleaner
Winston Wolfe
Mystery
Writer
Ghost
Buster
Bunny
May 24, 2016 at 2:37 pm
I understand that you want that format. But the image you posted, has more data that the sample data you posted. I have no idea of what the numbers should...
May 24, 2016 at 9:41 am
ziggy2016 (5/24/2016)
May 24, 2016 at 9:14 am
This is what I use for "previous row" calculations on 2008. For 2012+, I would use LAG.
WITH CTE AS(
select *, ROW_NUMBER() OVER(PARTITION BY ID ORDER BY...
May 24, 2016 at 9:00 am
Here's an example.
The query is modified because I'm not sure that you're using the correct aggregates.
WITH CTE_Specialty AS(
SELECT Category ...
May 24, 2016 at 8:52 am
Brandie Tarvin (5/24/2016)
Grumpy DBA (5/24/2016)
The "Thanks for the script" guy strikes again, necro'ing several old, dead threads.
And now we shall call him the necroscripter.
EDIT: I wonder if he's grabbing all...
May 24, 2016 at 7:29 am
Gave an answer in this other thread: http://www.sqlservercentral.com/Forums/Topic1789162-3077-1.aspx
May 24, 2016 at 7:22 am
ziggy2016 (5/24/2016)
I hope someone can help me resolve the problem below:
FYTreatment FunctionAVG_ActivityAPRMayJUNJULAUGSEPTOCTNOVDECJANFEBMARYTD
2015/16Other150191949494949393929393919192
2015/16Ophthalmology63994969494959798989797959796
2015/16Trauma & Orthopaedics100390918989929492919391929191
2015/16Neurosurgery329295951001009494919596979094
2015/16Rheumatology11895949798969792919392979895
Over All Total329386%?86%?86%?86%?86%?86%?86%?86%?86%?86%?86%?86%?86%?
Basically, all I want is how get the bottom over all avg and percentages...
May 24, 2016 at 7:21 am
Remember that CONVERT won't reformat a string. The column needs to be a date/time data type to allow CONVERT apply the format code.
May 23, 2016 at 11:48 am
Viewing 15 posts - 2,806 through 2,820 (of 8,731 total)