Viewing 15 posts - 391 through 405 (of 1,034 total)
EL Jerry (4/13/2012)
mtassin (4/13/2012)
I just pasted it into Excel and used text to columns, but the same principal applies. Looking at 10 rows not ordered by the amount that...
April 13, 2012 at 7:36 am
Henrico Bekker (4/12/2012)
When I used to interview someone, I would ask one unanswerable question
I've done it as well... "how do you detach a Log Shipped tempdb that is in Read...
April 13, 2012 at 7:27 am
Hugo Kornelis (4/13/2012)
April 13, 2012 at 7:19 am
I was aware of what contained databases are...
At first I thought this was a trick question, because if you can't use AD credentials against a contained database then what good...
April 12, 2012 at 7:23 am
If you have the linked servers setup correctly it's as simple as referencing a table via
[linked server name].[database name].[schema name].
Where the linked server name is the name you called...
April 11, 2012 at 7:22 am
And before you say it, I do realize that at least in the text of the query I have the name of the procedure (after all I did copy it...
April 10, 2012 at 1:15 pm
They can get divorced from the procedure for other reasons.
For instance this stored procedure that's in my plan cache doesn't have a value for Object_Name(dest.objectid)
/****************************************** PROCEDURE: ...
April 10, 2012 at 1:05 pm
marksquall (4/10/2012)
You two have mentioned something about cache. I have certain things to know abut this cache and I hope it is...
April 10, 2012 at 11:01 am
And for that matter, if it was this... we'd call it a catch-all query no?
ALTER PROCEDURE [dbo].[SearchRecords]
@PersonID NVARCHAR(20),
@FirstName NVARCHAR(20),
@MiddleName NVARCHAR(20),
@LastName NVARCHAR(20)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @sql NVARCHAR(MAX)
SET @sql = N'SELECT * FROM...
April 10, 2012 at 9:33 am
Grant Fritchey (4/10/2012)
April 10, 2012 at 9:25 am
GilaMonster (4/10/2012)
mtassin (4/10/2012)
April 10, 2012 at 8:17 am
Ok Grant, so now I can learn...
If he wrote it as
ALTER PROCEDURE [dbo].[SearchRecords]
@searchQuery AS NVARCHAR(100),
@col AS VARCHAR(100)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @sql NVARCHAR(1000)
DECLARE @value NVARCHAR(20)
SET @value = @searchQuery
IF (@col = 'PERSON_ID')
BEGIN
SET...
April 10, 2012 at 8:11 am
The correct answer, as always is... it depends.
If you choose to use Dynamic SQL, then you need to be warey of injection.
Creating a dynamic SQL string by appending text type...
April 10, 2012 at 7:29 am
Right... but if it hadn't been dynamic it would likely have been
SELECT * FROM [Student] WHERE [PERSON_ID] = @value
Which wouldn't have gone implicit. Because he chose to use dynamic...
April 10, 2012 at 7:20 am
GilaMonster (4/10/2012)
mtassin (4/10/2012)
(granted this is a really simple one) that the...
April 10, 2012 at 6:52 am
Viewing 15 posts - 391 through 405 (of 1,034 total)