Viewing 15 posts - 5,926 through 5,940 (of 8,731 total)
It's easy with some date math.
You can find common date routines in here to try to understand them:
http://www.sqlservercentral.com/blogs/lynnpettis/2009/03/25/some-common-date-routines/
First we get the first day of current quarter:
SELECT DATEADD(QQ, DATEDIFF(QQ, 0, GETDATE()),0)
The...
August 22, 2014 at 2:35 pm
That's like saying you shouldn't write "colour" and should write "color" just because someone said so.
August 22, 2014 at 2:12 pm
Note that you might replace strings you don't want them to be replaced.
INSERT INTO @test-2(TEST_STRING)
VALUES
('I am a bad Gal')
,('I am a good Gal')
,('Oh my goodness! There''s no more goodwill')
,('He''s...
August 22, 2014 at 1:07 pm
If you want one column for each benefit, check the following articles about Cross Tabs and Pivots:
August 22, 2014 at 1:02 pm
CELKO (8/22/2014)
What do you use for the PK on lookup tables?
I use the encoding that is being used. The IDENTITY property (not a column!) is the count of insertion...
August 22, 2014 at 12:07 pm
ChrisM@Work (8/22/2014)
Cathy DePaolo (8/22/2014)
August 22, 2014 at 10:41 am
Something as simple as this:
create table test
(flsa_status varchar(30),
bu_dept varchar(30),
reg_temp varchar(5),
ftpt char(2),
value int)
insert into test values ('Exempt Salaried','Corp','Reg','FT',43);
insert into test values ('Exempt Salaried','Corp','Reg','PT',10);
insert into test values ('Exempt Salaried','Corp','Temp','FT',12);
insert into test values...
August 22, 2014 at 10:39 am
I know you were just having fun, so was I.
I can't relate to the Phineas and Ferb moment. Should I watch more episodes? 😀
August 22, 2014 at 10:04 am
Are you mocking my signature? :ermm:
I hope that it can create awareness. :hehe:
August 22, 2014 at 9:20 am
How did you test the preformance?
August 22, 2014 at 8:45 am
Koen Verbeeck (8/22/2014)
Ed Wagner (8/22/2014)
Thanks, Simon. The only one I can't see is Koen's. Everything else seems to functioning normally.
I changed my avatar recently.
I re-uploaded it and now...
August 22, 2014 at 8:43 am
Hey Eirikur,
You don't even need that function to get the exact same results.
SELECT
*
FROM @TEST T
WHERE T.TEST_STRING LIKE '%good%';
To test if a string is not empty or...
August 22, 2014 at 8:31 am
That's when a dynamic query comes handy. I don't have time right now, but this article should help you to get there based on the static sample I posted: http://www.sqlservercentral.com/articles/Crosstab/65048/
August 21, 2014 at 5:19 pm
Something like this?
create table test
(flsa_status varchar(30),
bu_dept varchar(30),
reg_temp varchar(5),
ftpt char(2),
value int)
insert into test values ('Exempt Salaried','Corp','Reg','FT',43);
insert into test values ('Exempt Salaried','Corp','Reg','PT',10);
insert into test values ('Exempt Salaried','Corp','Temp','FT',12);
insert into test values ('Exempt Salaried','Corp','Temp','PT',2);
SELECT...
August 21, 2014 at 4:17 pm
Viewing 15 posts - 5,926 through 5,940 (of 8,731 total)