Viewing 15 posts - 241 through 255 (of 388 total)
Is there a table which has both keys between productID and customerID?
Me as an example will not have data against every product in your product table.
I would maybe buy 1...
October 9, 2015 at 6:24 am
Why not do a select a.*,b.col1 from tableA a Cross join tableB b?
How would a group of data in tableA relate to a group of data in table B?
Give a...
October 9, 2015 at 2:08 am
will take a stab.
You might need to have a limited user,X, created and then give access to each system table needed to each user X for each DB
So this is...
October 8, 2015 at 8:50 am
You said 'loop'.
What are you looping?
July 2, 2015 at 9:09 am
try not to hard code your values in the string, else if the code runs with different parameter values, there will be zero plan reuse, unless forced parameterization is enabled.
Use...
July 2, 2015 at 7:50 am
declare @i int,@T smallint
select @i = 20100101
Select @T=1900
select dateadd(minute,@T%100,(dateadd(hour,@T/100,
CONVERT (datetime,convert(char(8),@i))
)))
try this
Edited to say that I am now confused so I am leaving initial attempt in here, but might not work...
July 1, 2015 at 5:43 am
Can you double check your expected datetime against the left column, some data does not look correct.
Also, what does your initial attempt at coding this look like?
July 1, 2015 at 5:26 am
ScottPletcher (6/30/2015)
I've seen them actually more than double the table. I've seen NC indexes that total more than 5x the main table size! If someone was following DTA...
July 1, 2015 at 3:05 am
Tac11 (6/30/2015)
HI Gurus,
select * from Sales.SalesOrderDetail where SalesOrderDetailID = 6
When I looked execution plan it gave me missing non clustered index suggestion on 'SalesOrderDetailID' even though it has PK!!!!
The first...
June 30, 2015 at 9:36 am
this causes an overflow.
So find out what the max ranking value is.
declare @date date = cast(getdate() as date)
select dateadd(mm,200000,@date) --OVERFLOW
SELECT max(rownum) --WHAT IS THIS VALUE?
FROM (
SELECT viasatsubscriptionid, firstproductregistrationdate, salesdate, baseenddate,
ROW_NUMBER()...
June 30, 2015 at 9:10 am
(a*w/100) *(prj(10517)+prj(10742)+prj(10804)+prj(10808)+prj(10809)+prj(10810))
I think this reduces the amount of multiplication operations to one by doing factorization, and also will probably reduce the error from having to round early.
Other than that, without...
June 30, 2015 at 9:04 am
sp_configure 'show advanced options',1
go
sp_configure 'xp_cmdshell',1
go
reconfigure
go
declare @DeleteBackupFileStatement Nvarchar(400)= NULL,@BackupFile nvarchar(300)= '\\mypath\myfile.docx'
BEGIN
SET @DeleteBackupFileStatement = 'DEL ' + LTRIM(RTRIM(@BackupFile)) +' /Q'
END
PRINT '@DeleteBackupFileStatement: ' + cast(@DeleteBackupFileStatement as Nvarchar(400))
BEGIN
print @DeleteBackupFileStatement
exec xp_cmdshell @DeleteBackupFileStatement
END
June 30, 2015 at 8:39 am
I see varchar(MAX) for all the columns.
You cant put index on it.
The size limit is 900 bytes, so that is varchar900 or nvarchar450
May 30, 2015 at 4:40 am
do something like
select left(Name,charindex(' ',name)) from mytable
May 30, 2015 at 4:25 am
Can you compare the content column from assembly, between the 2 DB's?
When you do, are they exactly the same?
IIf they are the same, what happens when instead of doing use...
May 29, 2015 at 12:47 pm
Viewing 15 posts - 241 through 255 (of 388 total)