Viewing 15 posts - 16 through 30 (of 46 total)
Sorry Bitbucket, I'm updating the Date as part of the While Loop (for 0 to @Months int) - e.g.
set @StartDate = dateadd(d,-1,dateadd(m,1,(dateadd(d,1,@StartDate))))
It increases the Month that is...
February 22, 2010 at 5:53 pm
Wow, I had been taking completely the wrong approach with this one.
Start (i.e. the bottom left hand corner of desktop Start) - Search - For People - set "Look in"...
November 4, 2009 at 8:37 pm
You're right, I can Read into the AD. I've stumbled across some useful VB.Net code for viewing some ActiveDirectory info, so I'll probably look to do this in Visual Studio...
November 1, 2009 at 8:56 pm
I can't believe I've never noticed that 'Import External Data' before. Would probably end up being quicker than writing an Ad Hoc SQL query in some cases (where the repeatable...
October 8, 2009 at 10:16 pm
You can do it by turning the Properties to a @Dec, e.g.
SELECT @columns = COALESCE(@columns + ',[' + cast(Invested as varchar) + ']',
'[' + cast(Invested as varchar)+ ']')
FROM #AA
GROUP BY...
September 29, 2009 at 1:19 am
D'oh! Still early in the morning for me, I didn't scroll up from where I was reading the first link (opened it to read later). Obviously ISNULL isn't covered in...
September 14, 2009 at 5:22 pm
No worries. Between that article and Was the same link, feel free to ignore this! http://www.sommarskog.se/dyn-search-2005.html, which I'm only about a quarter or the way through, I'm covered for reading...
September 14, 2009 at 4:39 pm
ravi4work (9/14/2009)
Guys, what do you think about the solution presented below:SELECT * FROM @UnitsTransacted A
left outer join@lookups B
on A.investorcode=B.[value] and B.description=@InvestorCode
where A.investorcode= isnull(@InvestorCode,A.investorcode) or B.description=@InvestorCode
As "Select Distinct investorcode from @UnitsTransacted"...
September 14, 2009 at 3:58 pm
Bob Hovious (9/11/2009)
September 11, 2009 at 10:36 pm
Problem's still solved, but in case this helps anyone else, I discovered later on this code couldn't be used as part of a wider "select * from X where investorcode...
September 11, 2009 at 12:14 am
Thanks Bob! Certainly not determined to go any particular way, just hadn't had any earlier luck using an IF statement (plus I had attempted "rowcount" instead of "@@rowcount"!).
Have ended...
September 10, 2009 at 6:41 pm
Sorry, just realised I put this in SQL 200 instead of 2005. My apologies!
September 10, 2009 at 4:57 pm
Ah, xp_CmdShell, I wasn't even SysAdmin on our Dev environment when I last heard about this and first tried to get OpenRowset working for Excel, but they're things I can...
June 1, 2009 at 6:31 pm
Correct, I could write it and pass it on to Data Warehousing but I honestly believe I may cause a heart-attack by suggesting that tables in this particulat Database should...
May 31, 2009 at 11:52 pm
Julio, as these guys have said, do you know who might have made that table? And do you know how your number may relate to, say the date instead of...
May 31, 2009 at 9:32 pm
Viewing 15 posts - 16 through 30 (of 46 total)