Viewing 15 posts - 316 through 330 (of 4,080 total)
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'
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 26, 2016 at 6:48 pm
with JustInD as (select name
from sys.server_principals db
...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 26, 2016 at 12:43 pm
How about this?
WHERE not exists (SELECT 1 from sys.server_principals where
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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 =...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 26, 2016 at 7:43 am
Something like this?
BEGIN TRY
POST
END TRY
BEGIN CATCH
POST IN ERROR
END CATCH
😉
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2016 at 8:22 pm
I'm wondering why you store staffed time in seconds. How much do you pay per second? 😛
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2016 at 6:03 pm
I miss being coddled :crying:
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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! 😀
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2016 at 2:34 pm
They must be proud of their site. It helps unqualified people get jobs they can't handle.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2016 at 2:25 pm
Viewing 15 posts - 316 through 330 (of 4,080 total)