Viewing 15 posts - 91 through 105 (of 229 total)
EDIT: Removing these solutions. I think they just add confusion.
January 13, 2015 at 3:40 pm
There's more than one way to skin this cat. Here's one:
if object_id('tempdb.dbo.#fileSize') is not null drop table #fileSize
create table #fileSize
(
database_id int,
space_used_in_mb...
January 13, 2015 at 3:23 pm
For varchar and nvarchar, it's sufficient to take the datalength of the string and add two bytes for the offset block. For most every day purposes, you don't really need...
January 12, 2015 at 3:20 pm
NumptySpence (1/12/2015)
I can get the solution using cursors
If you find yourself saying this in SQL, it's usually the wrong way.
January 12, 2015 at 1:11 pm
Are the users executing these statements directly against the database? I would think if you're controlling access to these operations via a stored procedure, you could bake in the logic...
January 12, 2015 at 12:59 pm
I'm not sure I follow. The first example allows you to do just that. You can define any sql you want and still insert it into the temp table defined...
January 8, 2015 at 3:05 pm
if this is to perform cross database maintenance, powershell might be a better option (one which I'm altogether not familiar with). But what I was saying about the temp tables...
January 8, 2015 at 2:58 pm
You could use a regular temp table as well, unless you need the temp table to be accessible from other SPIDs, in which case I'd recommend using a persisted table.
Or...
January 8, 2015 at 10:01 am
thanks for the replies. I'm heading out for the evening so I haven't had a chance to read the articles yet but I will.
Jeff, to your question perhaps...
December 31, 2014 at 5:49 pm
I dont know if this behaves any different from parseonly but...
set noexec on
select 1
set noexec off
Edit I don't think this would gain you anything over parseonly. The only difference I...
December 31, 2014 at 2:44 pm
Alexander Suprun (12/22/2014)
sqlvogel (12/22/2014)
December 22, 2014 at 2:24 pm
Viewing 15 posts - 91 through 105 (of 229 total)