Viewing 15 posts - 5,026 through 5,040 (of 26,490 total)
Jeff Moden (6/11/2015)
srgaddam2 (6/10/2015)
I am new to SQL server, so I would appreciate if you could help me understand the SQL hacking concept. What is the purpose of quotename?...
June 11, 2015 at 8:43 am
ScottPletcher (6/10/2015)
...
Can't even post your code in a reply, that sucks.
Any way, I would still prefer to use EXEC sys.sp_executesql and pass the variable data using the proper data types...
June 10, 2015 at 3:48 pm
Jacob Wilkins (6/10/2015)
June 10, 2015 at 3:39 pm
Attached is another way to accomplish the task. It also includes the code for the dbo.DelimitedSplit8K function.
Sorry, work isn't allowing me to post the code directly.
June 10, 2015 at 3:35 pm
ScottPletcher (6/10/2015)
...
Try testing your code passing in a value like '[DBName].[SchemaName].[TableName]'. When I use your co0de with something like that the database name is dropped.
June 10, 2015 at 3:18 pm
ScottPletcher (6/10/2015)
ALTER PROCEDURE sampleprocedure
@tablename AS varchar(4000),
@date AS date
AS
SET NOCOUNT...
June 10, 2015 at 2:42 pm
srgaddam2 (6/10/2015)
I implemented the logic, but some how when I passed the table name it says invalid object name. The way I created is I...
June 10, 2015 at 2:37 pm
A different way. Modify the SET and EXEC lines of Scott's code above as follows:
SET @query = 'SELECT * FROM ' + QUOTENAME(@tablename) +
'...
June 10, 2015 at 2:27 pm
phillyflats (6/10/2015)
The table also has a NONCLUSTERED index on SalesID.
The table has a CLUSTERED index on SalesPersonID.
Before attempting the insert, the clustered index...
June 10, 2015 at 2:16 pm
Well, that explains why I got the question correct, I read it after it was fixed.
June 10, 2015 at 1:16 pm
jodevil99 (6/10/2015)
So I'm creating a query to extract data, and...
June 10, 2015 at 11:02 am
luis_carlosh (6/9/2015)
OLD SQL 2008> task > backup DB
NEW SQL 2014 task > Restore DB
1) SET COMPATIBILITY_LEVEL = 120
...
June 10, 2015 at 8:32 am
Alvin Ramard (6/9/2015)
ricardo_chicas (6/9/2015)
I have a 50gb database, with 3 files at the primary filegroup, each one of those has around 16gb
I truncated 2 tables releasing 33gb, so the...
June 9, 2015 at 4:00 pm
Would be nice if Microsoft brought partitioning to all editions of SQL Server, well, maybe not Express but it wouldn't hurt for people experimenting.
June 9, 2015 at 11:59 am
It would also help if you posted the actual execution plans for the query from both systems.
June 9, 2015 at 11:39 am
Viewing 15 posts - 5,026 through 5,040 (of 26,490 total)