Viewing 15 posts - 1,081 through 1,095 (of 2,007 total)
BEGIN TRAN
CREATE TABLE yourTable (yourTableID INT IDENTITY, column1 VARCHAR(500), column2 VARCHAR(500))
INSERT INTO yourTable (column1)
SELECT '2 * 2+1 * 7'
UNION ALL SELECT '1 * 1+2 * 4'
UNION ALL SELECT '1 *...
January 10, 2012 at 8:17 am
Theoretically, you could have 32,767 databases per instance.
Good luck with that. . . Personally, I find it difficult to keep track of more than 10.
January 10, 2012 at 3:55 am
nawaz1774 (1/9/2012)
Thats exactly I am looking for I need a lot different questions to practice. I just donno where to find them.
I'm just reiterating the opinions already posted; answer other...
January 9, 2012 at 10:03 am
Untested, but something like this should work
BEGIN TRAN
DECLARE @sql AS VARCHAR(MAX)
SELECT @sql = COALESCE(@SQL,'') + 'SELECT ' + c.name + ', '''+c.name+''' AS columnName FROM ' + o.name + '...
January 9, 2012 at 8:46 am
mick burden (1/9/2012)
January 9, 2012 at 8:21 am
mick burden (1/9/2012)
January 9, 2012 at 7:57 am
fahey.jonathan (1/9/2012)
SELECT e.emp_id, e.emp_name, e.join_date,
...
January 9, 2012 at 7:30 am
mick burden (1/9/2012)
Thank you so much for getting back to me so fast.I've googled your suggestion but can't see how that can help.
BEGIN TRAN
--Sample data
CREATE TABLE yourTable ([date] DATE, Jim...
January 9, 2012 at 7:20 am
BEGIN TRAN
--1,000,000 Random(-ish) rows of data
SELECT TOP 1000000 IDENTITY(INT,1,1) AS ID,
CONVERT(DATE,RAND(CHECKSUM(NEWID())) * 30000 + CAST('1945' AS DATETIME)) AS randomDate
INTO #testEnvironment
FROM master.dbo.syscolumns sc1, master.dbo.syscolumns sc2, master.dbo.syscolumns sc3
--Query the table
SELECT TOP...
January 9, 2012 at 7:07 am
The tables as you've laid them out are badly designed and incorrect.
I've corrected the issue, but not the bad design : -
CREATE TABLE role(
[roleID] INT IDENTITY,
[applicationname] [nvarchar](256) ,
[rolename] [nvarchar](256))
INSERT INTO...
January 9, 2012 at 6:01 am
This should get you on the right sort of track. Bear in mind that I've knocked it together very quickly and am fairly certain that there's a bug in...
January 9, 2012 at 2:45 am
bodsda (1/6/2012)
Thanks for that, it worked. But why didn't my cursor work?Thanks,
Bodsda
Because your EXEC only exists in relation to itself, it doesn't affect anything outside of it.
Try this, hopefully it'll...
January 6, 2012 at 3:19 am
I prefer to avoid CURSORs and loops when they aren't necessary, including the hidden one in sp_MsForeachdb.
So how about this?
DECLARE @TABLE VARCHAR(200), @sql VARCHAR(MAX)
--Add your table name here
SET @TABLE =...
January 6, 2012 at 3:14 am
Ninja's_RGR'us (1/5/2012)
The drag trick doesn't work for me.IE 8 all updates.
Sorry, should have said that it doesn't work with IE (well, can't get it to work with 8 or 9)....
January 5, 2012 at 9:29 am
Brandie Tarvin (1/5/2012)
January 5, 2012 at 9:07 am
Viewing 15 posts - 1,081 through 1,095 (of 2,007 total)