Viewing 15 posts - 1 through 15 (of 200 total)
The query is used for a rather complex computation needed in the result of a highly used stored procedure.
Occasionally, the execution plan would include a Hash Join operator in a...
December 7, 2015 at 3:50 am
Thanks for helping me identify a query where by using OPTION(RECOMPILE) I was able to reduce execution time of "completely unpredictable" to a few seconds. 🙂
December 2, 2015 at 7:58 am
Who knows. 🙂
The OP never came back with a sample as comprehensive as yours. 😉
December 14, 2011 at 12:52 am
Try this:
declare@resultxml
set@result
= (
selectTests.Test.query('Id')
,Tests.Test.query('Name')
,Tests.Test.query('Inputs')
,TestResults.Results.query('child::*')
from@xmlinput.nodes
('
/Tests/Test
') Tests (Test)
inner joinTestResults
onTestResults.RequestId = Tests.Test.query('Id').value('.', 'int')
for xml path('Test'), root('Tests'), type
)
select@result
December 13, 2011 at 3:25 pm
What permissions do you have on the SQL Server instance?
November 18, 2010 at 2:52 pm
Evil has no boundaries.
January 22, 2010 at 8:20 am
Yes, you can use variables with sqlcmd, see Books Online (http://msdn.microsoft.com/en-us/library/ms188714.aspx) for more details.
E.g.:
In your script change the definition to:
:r $(scriptfile)
Assign the variable at execution:
sqlcmd.exe -v scriptfile="\\user\c$\folder\xyz.sql"
January 22, 2010 at 8:06 am
Weird. What has also worked for me in the past, even though I have no clue as to how or why, was as follows:
1) create a copy of the config...
January 22, 2010 at 6:51 am
This sounds like a case for the Service Broker. I suggest you start by looking it up in Books Online (plenty of examples there), then perhaps come back here with...
January 22, 2010 at 6:07 am
Answered in "the other" thread.
January 22, 2010 at 3:25 am
Consider using SSIS for this. With the Foreach Loop Container you can process all files (specified) in a source folder, extract data from them, and then move them to an...
January 22, 2010 at 3:24 am
Have you verified which configuration file is being used at execution?
Have you verified that the file actually is use has the value set correctly?
SSIS config files can really be a...
January 22, 2010 at 3:16 am
What data type are you using and why?
Consider switching to varbinary - either max if you'r images can be larger that 8000 bytes, or a more appropriate length.
January 22, 2010 at 3:07 am
You can output the values into a table variable. What exactly are you trying to achieve?
July 20, 2009 at 6:20 am
On SQL Server 2005 (and later) you can use the OUTPUT clause of the INSERT statement to retrieve the identity values.
Books Online article:
http://msdn.microsoft.com/en-us/library/ms174335(SQL.90).aspx
Look at example K.
On SQL 2000...
July 20, 2009 at 5:27 am
Viewing 15 posts - 1 through 15 (of 200 total)