Viewing 15 posts - 196 through 210 (of 2,893 total)
SET @bcpCommand = 'bcp "SELECT * FROM #Results" queryout "' + @FileName + '" -T -c -t,'
...
February 10, 2014 at 9:04 am
If you would follow the instructions found under the link at the bottom of my signature, the answer could be more detailed...
Otherwise:
drive your select query from a set of the...
February 10, 2014 at 8:32 am
Luis Cazares (2/6/2014)
Use bcp to export query with a SELECT DISTINCT (or GROUP BY all columns),...
February 6, 2014 at 9:44 am
Actually, it is not very clear of what OP want's and what he is talking about.
I cannot see how SQL script/proc can ask user to confirm for proceeding with...
February 6, 2014 at 9:09 am
BWFC (2/6/2014)
jayoub (2/6/2014)
February 6, 2014 at 8:54 am
Whatever way you do, it's not going to be super fast.
You may want to try
SELECT DISTINCT * INTO NewTable FROM ExistingTable
DROP TABLE ExistingTable
EXEC sp_rename 'NewTable' , 'ExistingTable'
February 6, 2014 at 8:50 am
BEGIN TRAN
DELETE [tablename]
WHERE [some contitions]
IF @@ROWCOUNT < 10
COMMIT TRAN
ELSE
ROLLBACK TRAN
February 6, 2014 at 8:45 am
ben.brugman (2/6/2014)
Eugene Elutin (2/6/2014)
But it has nothing to do...
February 6, 2014 at 8:15 am
If you want to see how many times any sql executed with calling this functions, Gail's suggestion with profile might help.
But it has nothing to do with "how many...
February 6, 2014 at 7:54 am
Is it function or stored procedure? If you are talking about function, have you tried to "build in counter ". I just wonder how are you going to do so,...
February 6, 2014 at 7:07 am
Lowell (2/6/2014)
if you are searching on last name (WHERE LName = 'McArther')
then yes, an index would help a query like...
February 6, 2014 at 6:45 am
Any additonal line of code (excluding comments) degrades the performance less or more...
There is nothing wrong with using temp tables.
Using static...
February 6, 2014 at 6:41 am
I am not sure that you can query Active Directory to list SQL Server permissions :unsure:
You cannot...
I am looking to query each Database in our environment and list AD,...
February 6, 2014 at 6:15 am
Lowell (2/6/2014)
i actually make things system functions , system procedures, and stuff quite a bit i have a ton of developer tools i've created and adapted that go in master.
Could...
February 6, 2014 at 6:04 am
Viewing 15 posts - 196 through 210 (of 2,893 total)