Viewing 15 posts - 1,636 through 1,650 (of 1,957 total)
WayneS (1/12/2011)
SELECT ID,[64] = MAX(CASE WHEN UnknownColumnName = 64 THEN AnotherUnknownColumnName ELSE NULL END),
[65] = MAX(CASE...
January 12, 2011 at 4:57 pm
While we are offering alternatives to the missing function, in this case why not use the xml facilities available?
DECLARE @exampleString xml
SET @exampleString = ' <result>failure</result> <reason>invalid Phone1</reason> <leadId>xxxxxxxxxxxx</leadId> <url><![CDATA[https://blahblahblah]]></url> '
SELECT...
January 12, 2011 at 4:53 pm
Change your table definition:
From
DECLARE @T table (iT int identity, fileCode char(4))
To
DECLARE @T table (iT int identity, fileCode char(6))
January 12, 2011 at 4:28 pm
DeveloperDotNetSQL (1/12/2011)
SET DATEFORMAT mdy
DECLARE @Date varchar(50)
DECLARE @time varchar(50)
SET @Date = '13/01/2011'
SET @Time = '09:00:00'
select convert(datetime,@Date)+convert(datetime,@Time)
The conversion of a varchar data type to...
January 12, 2011 at 4:20 pm
GSquared (1/12/2011)
CREATE TRIGGER LastLoginDate ON dbo.users AFTER updateAS -- first error fixed here
--//ColumnName
DECLARE @Last_Login_Date datetime, @msg varchar(500);
IF EXISTS
(SELECT 1
FROM inserted
...
January 12, 2011 at 4:17 pm
DECLARE @sql varchar(1000);
set @sql = '';
select @sql = @sql + 'exec ReportServer.dbo.AddEvent @EventType=''TimedSubscription'', @EventData=''' + cast(Subscriptions.SubscriptionID as varchar(500)) + ''';' + CHAR(13)
FROM ReportSchedule
INNER JOIN...
January 12, 2011 at 4:07 pm
Do you need to do this repeatedly or as a one off?
If it is one-off and the tables have the same design, just open both tables in SSMS, right-click on...
January 10, 2011 at 4:10 pm
mounish (1/10/2011)
January 10, 2011 at 4:06 pm
Sichy (1/9/2011)
Hey MM, I've just finished my script and it works a treat!!! Thanks so much for your help 😀
No problem - it was the article that helped I hope...
January 9, 2011 at 6:37 pm
Read this article : http://www.sqlservercentral.com/articles/T-SQL/62867/
Especially looking out for the section One Final "Split" Trick with the Tally Table
But really, read the article and understand it before you use the code!
January 9, 2011 at 3:11 pm
I doubt that the problem is instantiating the Excel Application object - you are getting an error from Microsoft Excel!
You are running the script in BIDS on the server? Logged...
January 8, 2011 at 4:21 pm
My advice would be to extract the person's data from the xml and store that in columns in the database.
Then do exactly the same for a query - extract...
January 8, 2011 at 1:54 am
Nice question - although the title does give the answer!
I also wonder about points allocation on these questions - although I don't really care about it - but it seems...
January 7, 2011 at 6:44 pm
So you are planning to use the hash of an xml fragment as a part of a Primary Key.
What happens when the xml differs only in whitespace or layout ?...
January 7, 2011 at 6:32 pm
Viewing 15 posts - 1,636 through 1,650 (of 1,957 total)