Viewing 15 posts - 256 through 270 (of 670 total)
You can use the Lead function to get it
Drop table if exists #t
go
Create table #T (
RowNum int
,Id int
,IndividualId...
July 9, 2018 at 7:28 am
Here's a recursive CTE that returns the values you want. Seems you wants the contiguous keys and ignore all the noise in between
Drop...
July 6, 2018 at 10:01 am
Does this work for you?
drop table if exists #Temp
Create table #Temp(
LoanNumber varchar(10),
Inspectiondate varchar(10)
,Marketvalue float
);
Insert into #Temp values (12345,'2017-05-19',975000.00)
Insert...
July 5, 2018 at 2:09 pm
Can you provide some data and DDL for the tables?
July 5, 2018 at 12:01 pm
July 5, 2018 at 11:57 am
Looks like a corrupt index, similar to this https://www.sqlservercentral.com/Forums/Topic1401804-2893-1.aspx
July 5, 2018 at 8:10 am
I hope this isn't a homework project, otherwise, I'd have to ask What are they teaching them, deprecated syntax?
July 5, 2018 at 7:27 am
SQL introduced Try_Cast in 2012. Leaves out any hard coding
select input,
Case when try_cast(input as Date) is null
then case when try_cast(input as int)...
July 5, 2018 at 7:04 am
Why would you constantly be polling? Why not setup a job to run once an hour or 2 to look for these conditions? Then modify the payment process to update...
July 5, 2018 at 6:46 am
Try a dynamic pivot
Drop table if Exists #T
Create table #T(itemID varchar(20),
Description varchar(100),
Title varchar(20),
IndexID smallint,
...
July 3, 2018 at 12:17 pm
Sounds like a left join and Case when will do the trick. Without any real data and expected results, it's hard to give you an answer.
July 3, 2018 at 6:50 am
I think you might be getting confused with more than 1 parameter. If you Declare @TicketNo bigint...
June 20, 2018 at 1:24 pm
UPDATE PostsFebruary 8, 2018 at 3:28 pm
Try changing varchar(8000) to varchar(max). Worked for me
USE msdb;
GO
DECLARE @SourceSchema SYSNAME = 'dbo',
@SourceTable SYSNAME = 'backupset',
@TargetDatabase SYSNAME =...
January 30, 2018 at 12:58 pm
Viewing 15 posts - 256 through 270 (of 670 total)