Viewing 15 posts - 316 through 330 (of 4,081 total)
Looks like you've already asked elsewhere, but your query brings to mind some questions.
UPDATE T
SET SALE = SUM(Sale),
Exp = SUM(EXP)
FROM Sale T
INNER JOIN Exp S ON (T.Area = S.Area)
WHERE ordertype...
August 29, 2016 at 8:45 am
I'm curious, since you have a customer number already to group on, why don't you just ignore type 'B' rows?
WHERE t_col1 <> 'B'
August 29, 2016 at 6:19 am
Or if your number is actually character data. 😀
declare @number varchar(20) = '1000000017777'
select @number as before
select @number = RIGHT(@NUMBER,len(@number) - PATINDEX('%0[^0]%',@number))
select @number as After
August 28, 2016 at 6:57 pm
I would while away the hours conversing with the flowers, discoursing with the rain....
Toto, I don't think we're in Kansas anymore.
August 28, 2016 at 5:38 pm
Just out of curiousity, shouldn't the date also be greater than the latest date for that user? Or is that not a concern because you're always insterting the current...
August 28, 2016 at 5:33 pm
ON needs to be on a different line in order to test if the code handle carriage returns/new lines correctly.
August 26, 2016 at 6:48 pm
with JustInD as (select name
from sys.server_principals db
...
August 26, 2016 at 12:43 pm
How about this?
WHERE not exists (SELECT 1 from sys.server_principals where
August 26, 2016 at 11:19 am
Jeff Moden (8/25/2016)
The Dixie Flatline (8/25/2016)
Sorry, but functions can't call procedures. They can only call other functions. Period.Any bets on that? 😉
I'd probably lose the...
August 26, 2016 at 8:19 am
If you are talking about simply filtering a resultset, then the code below will work without resorting to dynamic SQL.
Declare @Region varchar(10), @SubRegion varchar(10)
Set @region = 'USA'
Set @SubRegion =...
August 26, 2016 at 8:08 am
Thank you for doing an excellent job of setting up the problem for us. Good job. Looking at the problem all you really wanted to...
August 26, 2016 at 7:43 am
Something like this?
BEGIN TRY
POST
END TRY
BEGIN CATCH
POST IN ERROR
END CATCH
😉
August 25, 2016 at 8:22 pm
I'm wondering why you store staffed time in seconds. How much do you pay per second? 😛
August 25, 2016 at 6:03 pm
I miss being coddled :crying:
August 25, 2016 at 4:09 pm
Hmmmm... maybe it's a trap site that employers sponsor to spoon-feed wrong answers to job applicants who don't know any better! 😀
August 25, 2016 at 2:34 pm
Viewing 15 posts - 316 through 330 (of 4,081 total)