Viewing 15 posts - 10,066 through 10,080 (of 26,489 total)
Edit: Double posted. Deleted the content.
August 15, 2012 at 3:33 pm
Jeff Moden (8/15/2012)
WayneS (8/15/2012)
SQLRNNR (8/15/2012)
For the Rhode Island SQLSat, how about we all wear kilts?Is that for speakers, attendees, or all?
If it were a prerequisite for speaking, I'd still wear...
August 15, 2012 at 3:32 pm
SQL_ME_RICH (8/15/2012)
Sorry - I was desparate for some help:w00t:
Bumping the curent thread would have been an acceptable alternative to double posting. I'd seen this thread yesterday as I was...
August 15, 2012 at 3:31 pm
As for the tweaks:
USE AutoDispatch;
go
declare @BatchSize int;
set @BatchSize = 10000;
WHILE @BatchSize > 0
BEGIN
DELETE TOP (@BatchSize)
FROM t1
FROM dbo.yConnections t1
...
August 15, 2012 at 3:27 pm
SQL_ME_RICH (8/15/2012)
August 15, 2012 at 3:24 pm
You can also do some reading on EXCEPT and INTERSECT in Books Online. These could be used to identify rows that exist in one table and not another or...
August 15, 2012 at 3:22 pm
Apparently no one responded here so OP started a new thread here. Please post any responses in the new thread.
August 15, 2012 at 3:17 pm
Something like this should work, but it may need some tweaking depending on how many rows will be deleted, especially the first time.
DELETE FROM t1
FROM dbo.MyTable t1
WHERE EXISTS(SELECT 1 FROM...
August 15, 2012 at 3:14 pm
Are the table structures the same?
To be sure, you want to delete rows from PROD where they already exist in ARCH, correct?
Also, do both tables have a PK defined?
August 15, 2012 at 3:07 pm
Let's create a user, say abc, in database xyx and map it to the login IDTENT. Grant it some rights in xyz. Now let's create a login named,...
August 15, 2012 at 2:58 pm
cljolly (8/15/2012)
My fault, I misunstood you. It is a date,null format
The rest of my comments above still stand.
You need to cast @lastdate back to a character string if you...
August 15, 2012 at 2:49 pm
Pablo Campanini-336244 (8/15/2012)
Let me know if it works.....
CREATE DATABASE someDatabase
GO
USE someDatabase
GO
CREATE USER abc FROM LOGIN imstestuser<< this is also a SQL...
August 15, 2012 at 2:45 pm
It isn't the questions that are getting worse, nor is it the answers.
August 15, 2012 at 2:28 pm
cljolly (8/15/2012)
The table #tbl_deltab contains a single record and I use below to pull it:select @lastdate1=lastdate
from #tbl_deltab
set @lastdate =CONVERT(VARCHAR(10), @lastdate1, 111)
Does not tell me how you have...
August 15, 2012 at 2:25 pm
Pablo Campanini-336244 (8/15/2012)
The command:
CREATE USER abc FROM LOGIN testLOGIN
creates a "database" login, not a SQL Instance login.
Please create also the sql ID at an Instance level.
Then connect to the SQL...
August 15, 2012 at 2:22 pm
Viewing 15 posts - 10,066 through 10,080 (of 26,489 total)