Viewing 15 posts - 226 through 240 (of 3,957 total)
Looks like relational division with remainder:
March 22, 2015 at 8:54 pm
I assume that it doesn't matter to you, if you use Erikur's example to split 300001 into twelve months of 25000.08, it doesn't add up back to 300001.
On the other...
March 22, 2015 at 8:30 pm
Jeff Moden (3/20/2015)
Assuming that you already have a hierarchy table (We'll call it "H" for this example and all names will be...
March 22, 2015 at 6:58 pm
CELKO (3/19/2015)
Please follow basic Netiquette and post the DDL we need to answer this.
Uh, I think he did. That's how I was able to give him a tested...
March 19, 2015 at 11:01 pm
Jeff Moden (3/19/2015)
The numeric method won't work on VARCHARs that have non-digit-only characters in...
March 19, 2015 at 9:12 pm
TheSQLGuru (3/18/2015)
March 19, 2015 at 6:34 pm
Solomon Rutzky (3/19/2015)
it is not true that trigger execution is separate from the DML statement that fired it (I...
March 19, 2015 at 6:21 pm
Jeff Moden (3/19/2015)
isaac.asher (3/19/2015)
March 19, 2015 at 6:13 pm
This is a quiz. Which is faster?
This:
RIGHT('0000000000' + YOUR_ACCOUNT_NUMBER, 10)
Or this:
RIGHT(10000000000 + YOUR_ACCOUNT_NUMBER, 10)
No need to wait for the answer: The One Million Row T-SQL Test Harness[/url]
March 19, 2015 at 6:12 pm
May I ask, why all the WHENs?
CASE
When YEAR([LastHireDate]) < Year(@EndYearlyDate) then '12'
ELSE 13- Month([LastHireDate])
End As LastHireDate,
Doesn't that get you the same thing?
March 19, 2015 at 6:05 pm
ChrisM@Work (3/19/2015)
Further to Gail's comments, Dwain Camps wrote this article [/url]just for you. Enjoy.
I did? I mean, I did!
March 19, 2015 at 6:00 pm
How about something simpler like this?
INSERT INTO #Table
SELECTnParent_id + SCOPE_IDENTITY(), cGroup, cValue
FROMtTable;
March 19, 2015 at 5:58 pm
Thinking out loud but bad thoughts, so post deleted.
March 19, 2015 at 5:39 pm
Use a calendar table or equivalent:
WITH Months AS
(
SELECT m=1, mn='January'
UNION ALL SELECT 2, 'February'
UNION ALL SELECT 3, 'March'
...
March 19, 2015 at 3:12 am
Using Alan's setup data:
Alan.B (3/18/2015)
IF OBJECT_ID('Tempdb..#TABLE1') IS NOT NULL DROP TABLE #TABLE1;
CREATE TABLE #TABLE1
(
xid int primary key,
isx char(5) not null
CHECK (isx IN ('TRUE','FALSE')),
Revenue int not null,
);
Given that this...
March 19, 2015 at 1:32 am
Viewing 15 posts - 226 through 240 (of 3,957 total)