Viewing 15 posts - 1 through 15 (of 26 total)
to find out where are duplicates try run a
select * and check any distinct columns in two "duplicates"
then you have a candidate to throw a rank on that table like...
November 20, 2019 at 4:51 pm
does this work for you?
DECLARE @Eidvarchar(30) = 'MISC'
, @portfolio_idvarchar(50) = 'CHECKMATE'
, @purchased_fromvarchar(50) = NULL
INSERT[Purchases_Worksheet]
Select*
FROMPurchases
Where(@purchased_from IS NULL OR ([purchased_from] LIKE @purchased_from + '%'))
AND(@portfolio_id IS NULL...
November 20, 2019 at 3:41 pm
why dont you just do
DECLARE @IDENT INT, @sql VARCHAR(1000), @DBNAME VARCHAR(200) = 'My SQLDB'
SELECT @SQL = 'BACKUP DATABASE '+@DBNAME+' TO DISK = ''D:\SQL_Backup_RegTrac_Dbs'+@DBNAME+'db'
+ CONVERT(VARCHAR(12), GETDATE(), 112)...
October 1, 2019 at 1:45 pm
Just for curiosity i find out that in non-monospace font the "space" has something about half the width of other characters
so we can have:
declare @tabela table (id int...
June 25, 2018 at 8:39 am
i just realize this post has 4 years ...
May 17, 2018 at 5:34 am
i think your problem is presentation not data
in a non-monospace font the "space" uses less pixels in width than a letter
try this:create table #something
May 17, 2018 at 5:30 am
create...August 17, 2017 at 8:03 am
and yet again, you can dinamically create a view with only the columns that have no nulls
(you must run it by steps, if in the same batch the table...
April 7, 2017 at 9:22 am
here is an aproach, try it out 🙂
use tempdb;
go
create table test_20170407(id int identity(1,1) , col1 int null, col2 int null, col3 int null,...
April 7, 2017 at 9:08 am
i was trying other aproach
DECLARE @SD datetime, @ord_cycle numeric
SELECT @SD = '2017-03-01', @ord_cycle = 21
SELECT ISNULL(
NULLIF(
(CEILING(DATEDIFF(day, @SD, GETDATE()) / @ord_cycle))
,...
February 7, 2017 at 9:20 am
playing with dates, see if it helps
;WITH DIFF AS (
SELECT DATEADD(DAY, DATEDIFF(DAY, '20170130', '20170425'), 0) d
)
, PARTS AS (
SELECT DATEDIFF(YEAR,...
January 24, 2017 at 7:53 am
sorry, (copy+paste typo)
correct sugestion is simply
declare @fromDate date, @toDate date ;
select @fromDate=
DATEADD(YEAR, DATEDIFF(YEAR, 0, GETDATE()) - 2, 0)
select @toDate = cast(getdate() as date) ;
Select @fromDate , @todate
December 12, 2016 at 9:33 am
Or ... replace
MMartin1 (11/30/2016)
declare @fromDate date, @toDate date ;
select @fromDate=
dateadd(m,0,cast(Cast(year(getdate())-2 as char(4)) as date))
select @toDate = cast(getdate() as date) ;
Select @fromDate , @todate
by
declare @fromDate date, @toDate...
December 12, 2016 at 5:59 am
here i have another aproach to that function, i think its more clear and readable aproach
CREATE FUNCTION [fn_BLD_StrBetween_2] (
@ObjectNameVARCHAR(MAX)
,@FindStartVARCHAR(200)
...
November 29, 2016 at 9:47 am
Viewing 15 posts - 1 through 15 (of 26 total)