Viewing 15 posts - 1,681 through 1,695 (of 6,036 total)
SumonB (1/20/2016)
I just need the current date and a date before 15 days to find out whatever backups I took during the last 15 days.
I changed the code...
January 20, 2016 at 11:33 am
Here the query I used to test the outcome:
SELECT DO.RunTime,
DATEPART(dd, DateOnly),
CASE WHEN DATEPART(dd, DateOnly) > DO.Threshold
THEN DATEADD(dd, -15, DateOnly)
ELSE DATEADD(dd, -1, DATEADD(mm, DATEDIFF(mm, 0, DateOnly), 0) )...
January 19, 2016 at 8:28 pm
SumonB (1/15/2016)
January 19, 2016 at 8:05 pm
SumonB (1/19/2016)
I executed the code today..
Declare @StartDate Datetime,
@EndDate Datetime
if DAY(@StartDate) >= 7
set @StartDate = DATEADD(day, -15, DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0))
else
set @StartDate = DATEADD(DAY, -1, DATEADD(MONTH, DATEDIFF(MONTH, 0,...
January 19, 2016 at 7:25 pm
Stijn977 (1/15/2016)
serg-52 (1/15/2016)
Sergiy (1/14/2016)
How do you deal with concurrent updates?
If 2 or more users edit the same record in their independent instances of C++ application - which version...
January 17, 2016 at 2:12 pm
Stijn977 (1/15/2016)
took me a minute to realize what you meant, but I think you mean:use ISNULL everywhere
for those fields which allow NULL : use CASE ?
No, what...
January 17, 2016 at 1:55 pm
It seems like you need a "running total update".
See the article describing how to do it:
January 14, 2016 at 9:33 pm
Apart from that.
How do you deal with concurrent updates?
If 2 or more users edit the same record in their independent instances of C++ application - which version of the record...
January 14, 2016 at 9:07 pm
Stijn977 (1/14/2016)
Unfortunately your idea isn't fitting for me because:
- if the update runs, it would update all fields of the table (in case...
January 14, 2016 at 9:04 pm
nm.rajesh (1/14/2016)
If the measure value is repeated and the count of them is greater or equal to 8 then i want to flag and delete them
Do you want to delete...
January 14, 2016 at 8:43 pm
Jeff Moden (1/14/2016)
January 14, 2016 at 8:40 pm
Using the harness from Phil's post:
if OBJECT_ID('tempdb..#dupes') is not null
drop table #dupes;
create table #dupes (
Id int identity (1,1) primary key clustered,
Col1 int,
Col2 Varchar(10),
Col3 Varchar(10),
Col4 Date,
Col5 Varchar(10)
)
insert #dupes (...
January 13, 2016 at 5:01 pm
Stijn977 (1/12/2016)
I did continue altering my SP-generator (I don't want to create a SP by hand for each table in the database), this now generates the...
January 13, 2016 at 4:39 pm
Jeff Moden (1/12/2016)
Orlando Colamatteo (1/12/2016)
January 12, 2016 at 9:33 pm
Hugo Kornelis (1/12/2016)
If you insist on basing your ideas on relational theory on implementation choices made by Microsoft, then I guess we'll have to agree to disagree on this.
Agree to...
January 12, 2016 at 5:10 pm
Viewing 15 posts - 1,681 through 1,695 (of 6,036 total)