Viewing 15 posts - 11,731 through 11,745 (of 13,464 total)
i'd simply insert from a UNION of the two alternate sources;
insert into Table1(alotofcolumns)
select alotofcolumns from Server1.Database.dbo.Source1Table WHERE criteria=1
union
select alotofcolumns from Server2.Database.dbo.Source2Table WHERE criteria=1
January 21, 2009 at 9:05 pm
you don't even need to check, really
you simply do two steps in the trigger
you update first, and if it exists, it gets updated. if it didn't exist, nothing gets touched.
then...
January 21, 2009 at 5:33 pm
a builtin function called PARSENAME can do this for you...irt was designed to parse dbname.owner.table.columnname, but works greate for IPs:
declare @val varchar(20)
set @val='192.168.1.100'
select parsename(@val,4),parsename(@val,3),parsename(@val,2),parsename(@val,1)
1921681100
January 21, 2009 at 5:27 pm
i really like the answers that point to a link with letmegooglethatforyou.com...i really think it makes people think twice.
so yeah, our answers might be a little arrogant when we do...
January 21, 2009 at 5:10 pm
i think you'll have to move the logic to an ON INSERT trigger, ;
this might be a little tricky, considering that a trigger needs to assume multiple rows might exist....
say...
January 21, 2009 at 5:03 pm
I agree with Barry; still waiting to hear why an Identity() column, or varchar based off of an identity, or a GUID won't do the job.
January 21, 2009 at 4:45 pm
for views,procedures,functions (and triggers) you could use a cursor to exec sp_helptext [objectname]
that would give you the script for those objects, assuming they were not marked WITH ENCRYPTION when they...
January 21, 2009 at 6:23 am
harish_ravi (1/20/2009)
if so please...
January 20, 2009 at 10:06 pm
the ISNULL function substitutes a value in place of the variable or column if it is null:
SELECT ISNULL(@Variable1,0.00) - ISNULL(@Variable2,0.00)
January 20, 2009 at 9:21 pm
two things to consider....
if you are going to delete the records after archiving them off to another table, consider doing it in batches....if you do too many rows at a...
January 20, 2009 at 9:18 pm
hopefully, this is not homework, because if you submit this as your answer, and can't explain what it does, you'll get burned.
FOR XML has a neat way of getting values...
January 20, 2009 at 8:45 pm
i suspect it has something to do with being loos-goosy on your varbinary and varchar sizes:
DECLARE @prize_encrypt VARBINARY(256)
Set @prize_encrypt = EncryptByPassphrase(@pass,Cast(@prize_id as varbinary))
you try to use a varbinary(256 in one...
January 20, 2009 at 8:30 pm
don't crosspost. you only need to ask once, the Newest Posts feature lets us see everything. asking the same question multiple places wastes posters time and fractures the continuity of...
January 20, 2009 at 8:25 pm
don't crosspost. you only need to ask once, the Newest Posts feature lets us see everything. asking the same question multiple places wastes posters time and fractures the continuity of...
January 20, 2009 at 8:25 pm
if this only happened once, i'd lean towards a minor intermittent network error:[DBNETLIB][ConnectionWrite (send()).]General network error.
if it's happening everytime or a lot, then
I found a lot of really good information...
January 20, 2009 at 8:16 pm
Viewing 15 posts - 11,731 through 11,745 (of 13,464 total)