Viewing 15 posts - 1,291 through 1,305 (of 2,894 total)
paul.knibbs (9/5/2012)
Adam Machanic (9/4/2012)
The code that follows is my crack at a more memory efficient solution. It works only for a single delimiter (I never did see the point of...
September 5, 2012 at 3:47 am
That will return all tables with suffix YYYYMM where YYYYMM represent every month of the current calendar quarter.
SELECT t.name
FROM sys.tables t
JOIN (SELECT '%' + CAST(QFM + m AS VARCHAR)...
September 5, 2012 at 2:20 am
Will your table suffix represent just year and month only YYYYMM or day as well YYYYMMDD?
What criteria do you want to apply? Month number and year? Date range? Anything else?
September 5, 2012 at 1:52 am
Your requirements are very unclear. Do you need to get records in relation to single requested id? Then you could use the following:
declare @table table (dt datetime, id int)
insert @table...
September 5, 2012 at 1:48 am
simonwestb (9/2/2012)
I wasn't sure how to phrase my query so wasn't sure what to search for.
I'm attempting the simplest of updates - e.g. "UPDATE CRnumbers SET StudyLocationID = " +...
September 3, 2012 at 7:24 am
dwain.c (8/31/2012)
Eugene Elutin (8/31/2012)
draw Mona Lisa using T-SQL (I remember I had seen assembler application which would print out this one...
August 31, 2012 at 6:42 am
...
And as to T-SQL not being the right tool, I smell a challenge, and you know I love a good challenge! Whatever tool you use, if it's going to...
August 31, 2012 at 5:24 am
dwain.c (8/31/2012)
Thanks for the suggestions on the comments. I'll run them through and try to improve it (I have some other ideas for it anyway).
One question though. If...
August 31, 2012 at 4:12 am
Jeff Moden (8/30/2012)
Eugene Elutin (8/30/2012)
...
...
,@tempno = helpergroupno = CASE
...
Please note, the "three-parts" SET is not reliable. You better to split it to two of "two-part"...
August 31, 2012 at 3:42 am
Here the version which doesn't create stored proc.
-- setup
create table dbo._tt_t1 (c1 int)
go
create table dbo._tt_t2 (c1 int)
go
create table dbo._tt_t22 (c1 int)
go
create schema other
go
create table other._tt_t3 (c1 int)
go
create table other._tt_t33 (c1...
August 31, 2012 at 3:30 am
dwain.c (8/30/2012)
But I've taken Eugene's comments about comments 🙂 into account and also eliminated VIEWs,...
August 31, 2012 at 2:08 am
It did took me a while.
It may not be a bulletproof way, but much better than others I could think of so far...
Enjoy:
-- setup
create table dbo._tt_t1 (c1 int)
go
create table...
August 30, 2012 at 10:56 am
While trying to come up with solution I've found some issue of getting the query plan for simple query.
It all to do with automatic query parametrisation. Check this out:
create table...
August 30, 2012 at 9:19 am
There is only one way to get it done with 100% accuracy.
In order to do so, you should be able to execute each query in a relevant database where it...
August 30, 2012 at 7:33 am
...
not to mention finding tables inside comments...you need to strip comments out too.
Dwain solution will also suffer from having comments and also heavily depends on statement formatting
Try:
create table #temp1 (query...
August 30, 2012 at 7:16 am
Viewing 15 posts - 1,291 through 1,305 (of 2,894 total)