Viewing 15 posts - 106 through 120 (of 127 total)
I had to do something similar, but it was comparing 2 tables with about a hundred different columns, 3 of which were considered keys
I selected the columns from each into...
June 18, 2008 at 6:53 am
I was given a similar task a few months ago and my solution was along the lines of the suggestion of glen.greaves -
identify the records with mismatches by using
select table...
June 6, 2008 at 7:04 am
my bad
I pulled this snippet out of a working stored procedure:
IF @KOUNT > 0
BEGIN
SET @strSQL = @strSQL + ' DateModified=' + CHAR(39)...
May 27, 2008 at 1:27 pm
right you are
it's in the original trigger - that is not the reason it isn't working
May 27, 2008 at 6:45 am
instead of trying to count single quotes when building a string for dynamic SQL consider CHAR(39), which is a single quote, as in
@strSQL = @strSQL + 'DateField=' + CHAR(39)
@strSQL =...
May 27, 2008 at 6:35 am
I know you have a satisfactory solution but SQL Server 2005 has a new word EXCEPT
as in
SELECT * FROM TableA EXCEPT
SELECT * FROM TableB
gives you everything in Table A...
May 15, 2008 at 2:59 pm
Where I work we have a similar situation - and the solution was to use dynamic sql - setting up stored procedures that used synonyms and have the dynamic sql...
May 12, 2008 at 6:58 am
There are times (not too often) where speed at any cost is unwise
I may be a newbie at SQL Server but in computer programming for over 3 decades
my current situation...
April 25, 2008 at 6:50 am
Wouldn't a better way be to use the trigger to write to a transaction table, then to have a web service go through the transactions on a regular basis and...
April 23, 2008 at 6:51 am
I've used both temp tables, table variables and CTE's in stored procedures, in an environment where the volumn of data is too small to reflect performance differences (most of the...
April 22, 2008 at 6:49 am
I know it's a bit more work but to execute dynamic SQL but...
"SQL gives you the option of using exec() or sp_executesql. Of the two, sp_executesql is the better choice,...
April 17, 2008 at 6:58 am
I am not sure of the feasibility of this but I would recommend writing your program to use a synonym for the table name - then use dynamic sql to...
April 17, 2008 at 6:51 am
thanks!
I knew I could come up with a method that would get the results I needed but I didn't know the right way to do it
🙂
April 16, 2008 at 6:44 am
what's wrong with:
DECLARE @xml_2 VARCHAR(50) -- or whatever
SELECT @xml_2 = '''' + @xml_0 + @xml_1 + ''''
@iDoc OUTPUT, xml_2,
am I missing something?
April 14, 2008 at 6:45 am
I'm still a newbie but...
my understanding is that stored procedures are the fastest way to maintain a database
that being said, it is possible to build a dataset (in .NET) and...
April 10, 2008 at 6:47 am
Viewing 15 posts - 106 through 120 (of 127 total)