RE: Is there something like an UPSERT or a MERGE command in T-SQL?
No, there is no "UPDATE or INSERT if not exists" command in T-SQL.
2005-05-18
No, there is no "UPDATE or INSERT if not exists" command in T-SQL.
2005-05-18
Slackr,You may create a word matching function as below and use the count of words matching to join the tables.alter function Matching_Words_Count(@s1 varchar(1000), @s2 varchar(1000)) Returns int Begin Declare @word varchar(50) Declare @ctr int, @match int Select @s1 = Ltrim(Rtrim(@s1)), @s2 = Ltrim(Rtrim(@s2)), @word = '', @match=0, @ctr=1 While @ctr<=len(@s1) Begin --Check for space […]
2005-04-26
Thanks Jim! So it's ok to do the integrity check, but not as part of the Maintenance Plan - am I reading that right? So would the process be to schedule the sp_killuser, then the integrity check sp before the maintenance plan executes?Frank
2005-04-12
The easiest thing to do here is go to the sp_who2 proc (in master database) and alter it by uncommenting the order by in the dynamic SQL.
2005-04-06
These both appear to be OS errors, as the corresponding errors in SQL Server have messages that don't seem to apply. I will assume that when you get the error 193 from the mssqlserver service, it fails to execute. If this is true, that is probably why SQL agent won't run. It is dependent on […]
2005-03-23
Hi, I've just taken a new job and inherited a complete hornets nest of sql database. The previous, ahem, DBA's did not schedule any kind of routine maintenance. Therefore, please could somebody direct me/advise me as to what the best practices are regarding performance tuning, truncating logs, shrinking databases, checking integrity, and other basic stuff. […]
2005-03-09
6 reads
It means you don't have enough rights to change this. Also I guess you are not one of the server local administrator group member and you don't have sa rights. If it's not true let us to know
2005-02-10
No one has responded to this topic yet. Even if you don't have a complete answer, the original poster will appreciate any thoughts you have!
2005-01-24
Barring me having botched order here since I don't have anything to test against this should be pretty colse to what you are after.SELECT ST.student_id, ST.last_name + ', ' + ST.first_name + '(' + ST.grade + ')' AS [Name], R.program_provider_activity_id, PPA.program_activity_name + ' Currently Reg : ' + (CASE WHEN (R.registration_is_active = 1) THEN 'Yes' […]
2005-01-21
If you are trying to generate a standard trigger for each table, we wrote a VB program that does that. It creates a script file to create a DELETE and UPDATE/INSERT trigger for each table in the database. The standard triggers updates the UserID & time of the update/insert, and inserts a record into an audit table […]
2004-10-26
By Steve Jones
Thanks to everyone that came to my talks. Slides are below. Best Practices for...
By Steve Jones
I can’t remember how I heard about Small Data SF 2024, but it caught...
By Steve Jones
moledro – n. a feeling of resonant connection with an author or artist you’ll...
Comments posted to this topic are about the item 7 sept, scheduled book
Comments posted to this topic are about the item 7 sept, schedlued article
Comments posted to this topic are about the item 6 sept, published book
Azure Data Lake Storage Gen 2 is built on ...?
See possible answers