Viewing 15 posts - 6,316 through 6,330 (of 13,469 total)
you'll need to use the object_id instead of db_id at the table level.
why are you not saving the tablename? if you drop and recreate a table, it will ahve the...
November 30, 2011 at 11:39 am
see the post i follwoe dup with...if your destination table expects an int instead of the database name, you had to wrap it with db_id(''?'') instead of ''?''
November 30, 2011 at 11:23 am
asm1212 (11/30/2011)
Im sorry I think I confused you...The script there is for INSERTING INTO my Tables table...I have already accomplished that...
Now Im trying to INSERT INTO my Columns table...
you've never...
November 30, 2011 at 11:04 am
can we see the bcp command?
lets try to eliminate the simple things, like calling the proc without specifying the database.schema.procname, is it?
could a copy of the proc exist in the...
November 30, 2011 at 10:32 am
you just have to modify the script a bit: db_id() function , and 'll let you add your own WHERE statement to skip master/tempdb/model/msdb:
sp_MSForEachDB 'INSERT INTO SpecificDatabase.dbo.DBTables
( DatabaseID ,
TableName ,
ColumnCount...
November 30, 2011 at 10:20 am
it's not obvious.
the post, instead of having spaces, has CHAR(160)(which looks like a space, but isn't) in it, which prevents you from copy/paste/compile
i did a find/replace for you, and...
November 30, 2011 at 10:10 am
your snippet has the string hardcoded, isntead of substituting the variable.
something like this is what you are after, i think.
DECLARE @MyFileNametxt varchar(50)
DECLARE @cmd as varchar(1000)
set @MyFileNametxt = 'PASS_ASR_ALL_' + CAST(DATEPART(YYYY,...
November 30, 2011 at 8:21 am
with Org(Business_Line)
AS
( SELECT 'Blue' UNION ALL SELECT 'Orange' UNION ALL SELECT 'Others' UNION ALL
SELECT NULL UNION ALL SELECT 'Yellow' UNION ALL SELECT 'Green' UNION ALL
SELECT 'Red' UNION ALL SELECT ''...
November 30, 2011 at 7:41 am
Naomi N (11/30/2011)
01/01/2010 - 01/15/2010
01/16/2010 - 02/10/2010
The above two...
November 30, 2011 at 7:36 am
What kind of development are they doing?
If it's anything like my shop, all our developers really need to use a common database for the common application we develop;
for example, If...
November 30, 2011 at 6:17 am
all 1900 plus in one shot:
i hope the 18 is actually the database name and not the ID?
sp_MSForEachDB 'INSERT INTO SpecificDatabase.dbo.DBTables
( DatabaseID ,
TableName ,
ColumnCount ,
UserAdded ,
DateAdded ,
UserEdited ,
DateEdited ,
Active
)
SELECT ''?'',
TABLE_NAME,
NULL,
'''',
GETDATE(),
NULL,
NULL,
1
FROM...
November 29, 2011 at 2:55 pm
operating system service pack does not enter into the equation.
SQL Server Service pack is the piece to look at.
Windows NT 5.2 (Build 3790: Service Pack 2)
that's the OS of both...
November 29, 2011 at 1:23 pm
you pointed it out yourself, i think...the backup was created with SP3, but then SP4 was applied. the server is now SP4, but the backup's Sp3, and no longer compatible.
i'm...
November 29, 2011 at 1:04 pm
see this post bu Gianluca, and his crosspost to his blog;
it does exactlyt what you are after:
http://www.sqlservercentral.com/Forums/FindPost1212804.aspx
by coincidence, he jsut updated that older thread.
November 29, 2011 at 12:50 pm
i think he wants to pivot three columns into twelve total columns.(four sets of three), but i'm just guessing at this point.
November 29, 2011 at 12:44 pm
Viewing 15 posts - 6,316 through 6,330 (of 13,469 total)