Viewing 15 posts - 11,011 through 11,025 (of 13,469 total)
VALUES SELECT
it's one or the other, never both...
you either insert into (columnlist) values(val1,val2,etc)
OR
insert into (columnlist) select val1,val2,etc from somesource.
an extra pair of eyes always helps in these situations..trees and...
June 9, 2009 at 7:18 pm
here's an example of Sergiy's suggestion:
begin tran
select top 1 * from mytable with (tablockx) --exclusive table lock this table to me and my transaction
--do more stuff
commit tran --commit the tran,...
June 9, 2009 at 7:13 pm
SET XACT_ABORT ON only works in combination with BEGIN TRAN and COMMIT TRAN.you set XACT_ABORT on just once...and that is how it works for the session, or until you explicitly...
June 9, 2009 at 2:53 pm
this is just a WAG, but every A.ItemCode would only have one status, right?
don't you need a rollup by Customer of all the status?
something like the query below, that you...
June 9, 2009 at 12:12 pm
glad it worked for you; you clearly grasped the concept once you got an example.
way to go.
June 9, 2009 at 11:59 am
wouldn't problems with distributed transactions be because the "Distributed Transaction Coordinator" service one one or both servers are not running / on manual start instead of automatic?
June 9, 2009 at 11:47 am
ok i learned i can alias a linked server, excellent...
but even though i explicitly said to use a SQLOLEDB provider, when i look as sys.servers, SQLNCLI is being used, as...
June 9, 2009 at 11:26 am
as i understand it, when a linked server is created between two 2005/08 servers, the linked server will always use the native client SQLNCLI provider instead of SQLOLEDB; if you...
June 9, 2009 at 11:17 am
sorry bumble-read your post...my dyslexia kicked in and i thought i only saw CASE WHEN A.destroyed = 0 as the first case condition.
June 9, 2009 at 11:12 am
add these columns to your SQL:
SUM(CASE WHEN A.destroyed = 0 AND A.Retrieved = 0 THEN 1 ELSE 0 END) AS INCOUNT,
SUM(CASE WHEN A.destroyed = 0 AND A.Retrieved = 1 THEN...
June 9, 2009 at 11:08 am
you'll want to use the metadata to generate the scripts for you;
something like this:
SELECT
'UPDATE ' + SYSOBJECTS.NAME + ' SET ' + SYSCOLUMNS.NAME +...
June 9, 2009 at 11:02 am
brennendeliebe05 (6/9/2009)
I am here again, I want to copy a table Time.dbo from my DB WorksBI to a DB BusinessIntelligence, both are int he same machine and server.
can help...
June 9, 2009 at 10:50 am
i believe you might be looking for the behavior of a full text index.
With a full text index, you can do WHERE CONTAINS(columnname,'AB'), and it only does "whole word" matching,...
June 9, 2009 at 7:53 am
there's a lot of ways to do this;
the most basic is simply 3 words: CREATE DATABASE [WHATEVER], where whatever is the database name. when you do that, a copy of...
June 8, 2009 at 1:10 pm
thanks everyone; RBarryYoung made the light go on when he said "escape" the second minus sign.
Lynn's example works, as well as using a different rule, which in turn uses...
June 8, 2009 at 12:31 pm
Viewing 15 posts - 11,011 through 11,025 (of 13,469 total)