Viewing 15 posts - 706 through 720 (of 3,480 total)
Oh cool, super helpful!! Like I said, I have a lot to learn still! But I'll work my way through it.
Thanks for the feedback!
May 13, 2020 at 11:10 pm
They're grading side effects. It was cancer drug testing. It was one of those jobs was okay until things slowed down enough that I could stop and think about the...
May 13, 2020 at 4:48 pm
That's how I received them (and by the dozen) - that's why I was wondering how to normalize them in T-SQL . It was a totally screwed up situation where...
May 13, 2020 at 3:10 pm
Oh wait... I'm so bright somedays, it hurts my eyes. Use a cursor to loop over the column list. After the first 2 columns, count off (1 => column name...
May 12, 2020 at 3:31 am
I would break the SupportingDocs stuff out into a separate table with the foreign key (do this in Access) and then import that. I'd have to play with it a...
May 7, 2020 at 1:23 pm
Like this?
Setup:
--Setup:
CREATE TABLE WorkData (
EmpNo INT,
JobNo VARCHAR(10),
Hrs DECIMAL(4,2));
-- add some data
INSERT INTO WorkData VALUES
(8000 , 'Office'...
May 5, 2020 at 9:04 pm
[col1] = @Value OR [col2]=@Value
?
April 28, 2020 at 3:39 pm
Maybe this one is better?
SELECT x.County
, x.Gender
, x.Members
, y.TotalMembership
, RelPct = CASE WHEN Gender IS NULL THEN NULL ELSE x.Members/(1.0 * y.TotalMembership) END
FROM
(
SELECT
County
,Gender
,members = SUM(ActiveMembers)
FROM...
April 24, 2020 at 8:20 pm
Makes it a lot easier to help if you post consumable data in the form of CREATE TABLE scripts...
use tempdb;
go
CREATE TABLE #SampleData (
County VARCHAR(12) NOT NULL,
Gender CHAR...
April 24, 2020 at 7:15 pm
use the standard ROW_NUMBER() with a windowing function, and then remove any where the ROW_NUMBER() value is not 1?
April 24, 2020 at 6:17 pm
What was it? Use STUFF() or STRING_AGG() with the PARTITION clause?
April 19, 2020 at 2:07 pm
Well, perhaps not, but how else to you capture update events on a table?
April 16, 2020 at 8:21 am
Do you have a trigger on the relevant columns that writes the change info somewhere, or how are you collecting the change information? Awful thin on details.
April 16, 2020 at 4:44 am
unless you have some way to order them in insertion order, you can't. You'd need a column that's either an incrementing identity column or a datetime field with a default...
April 14, 2020 at 9:04 pm
Viewing 15 posts - 706 through 720 (of 3,480 total)