Viewing 15 posts - 601 through 615 (of 1,170 total)
milos.radivojevic (2/27/2014)
An index seek in your second example has been chosen by the optimizer because the query is not parametrized. You simply concatenated the query text and the resolution about...
February 27, 2014 at 2:34 pm
Yes, you can extend the your query with sys.objects, sys.tables, sys.procedures and etc...
Just explore a bit.
February 27, 2014 at 2:18 pm
dbcc freeproccache
exec sp_executesql N'select * from test where (name like @name or @name = ''All'' ) ',N'@name nvarchar(400)',@name = N'wmi%'
--index scan
vs.
dbcc freeproccache
declare @name nvarchar(400)
set @name = N'wmi%'
declare @dyn_sql nvarchar(1000)
set @dyn_sql...
February 27, 2014 at 2:13 pm
I got interested in your question and make some tests:
dbcc freeproccache
exec sp_executesql N'select * from test where coalesce(name,N'''') like @name',N'@name nvarchar(400)',@name = N'wmi%'
/* You have compiled the statement with the...
February 27, 2014 at 1:24 pm
SQLRNNR (2/27/2014)
Here is an article detailing a method to derive a starting point for CTOP.
This is a nice article. I've used it several times and got improving results by changing...
February 27, 2014 at 12:43 pm
If your files are empty then you can perform
DBCC SHRINKFILE(LogicalNameOfFileToRemove, EMPTYFILE)
But you say "..no data loss"?
Can you empty/remove a non-empty file? You cannot.
Why do you need to merge the ndf...
February 27, 2014 at 12:38 pm
JohnFTamburo (2/27/2014)
AK1516 (2/25/2014)
In my 4 year...
February 27, 2014 at 11:12 am
Thanks.
This is valid for all versions starting from sql server 2005+
February 27, 2014 at 11:03 am
Will this help you?
declare @country nvarchar(20)
set @country = N'en_US'
select X.value('contentId[1]','varchar(100)') as ContentId,
X.value('content[1]', 'varchar(100)') as Content
FROM XMLwithOpenXML A
CROSS APPLY A.xmldata.nodes('/Internationalization/contentRecords/contentRecord') as N(X)
WHERE A.xmldata.exist('/Internationalization/contentRecords[@locale = sql:variable("@country")]') = 1
Regards,
Igor
February 26, 2014 at 3:03 am
This is a good resource link:
February 25, 2014 at 5:19 pm
In SSMS:
Tools -> Options -> SQL Server object explorer -> Scripting: in Object scripting options check the Script permissions.
February 25, 2014 at 5:04 pm
EricEyster (2/25/2014)
February 25, 2014 at 4:57 pm
Easy way is to import the flat file into excel file and than sort by that column (if the file is not huge, of course).
February 25, 2014 at 4:40 pm
It should be a value that is not an integer.
Can you check in a way if you don't have non-integer values in your flat file?
February 25, 2014 at 4:34 pm
Viewing 15 posts - 601 through 615 (of 1,170 total)