Viewing 15 posts - 3,091 through 3,105 (of 5,394 total)
Syed Jahanzaib Bin hassan (6/21/2011)
June 21, 2011 at 2:03 am
You need a tally table (or tally cte) for this:
DECLARE @FromDate DATETIME, @ToDate DATETIME
SELECT @FromDate = '10-June-2010', @ToDate = '1-May-2011'
-- It's unclear in your requirements if you need to include...
June 21, 2011 at 2:00 am
RBarryYoung (6/20/2011)
Jeff Moden (6/19/2011)
Major vent... suppressed. 😀 ...Ahh, how you've grown, my son. 😀
Hi Barry! How are you doing?
Where have you disappeared all this time?
June 21, 2011 at 1:00 am
Unless you add the constraint unchecked, SQLServer tries to check the constraint against all the existing rows.
Scalar functions usually don't perform well.
I'll second GSquared suggestion: use FK constraints for this...
June 20, 2011 at 10:01 am
Looks like a network connectivity issue.
You could log on to the 2008R2 machine and run SQLCMD to connect to the SQL2000 server. Does it work?
June 20, 2011 at 9:57 am
DECLARE @Listing TABLE(
Id VARCHAR(20),
Location VARCHAR(255),
[Status] VARCHAR(6)
)
INSERT INTO @Listing
VALUES
(1, 'LocABCD', 'Active')
,(2, 'LocABCD', 'Closed')
,(3, 'LocDEFG', 'Closed')
,(4, 'LocDEFG', 'Active')
,(3401, 'FOOD & LIQUOR', 'Closed')
,(3422, 'FOOD & LIQUOR', 'Active')
,(3623, 'FOOD & LIQUOR',...
June 10, 2011 at 10:09 am
I suspect T-SQL is not the right tool for this task.
Try powershell instead! Here's a sample: http://sqlserverpedia.com/blog/sql-server-bloggers/xp_delete_file-vs-powershell/
June 10, 2011 at 1:17 am
You can use PIVOT to get that kind of results.
Can you provide a table script and some sample data? That would make helping you a lot easier.
June 10, 2011 at 1:05 am
Brandie Tarvin (6/9/2011)
SQLRNNR (6/9/2011)
GilaMonster (6/9/2011)
Jim Murphy (6/9/2011)
The best part is that your posts are not useless point-getting restatements. Grrrr, I hate those.
You mean the parrot effect? Someone posts a...
June 9, 2011 at 10:24 am
Thank you, Jason!
I just hope it's better than the crappy draft you just reviewed for me.
I haven't had the time to fix...
June 9, 2011 at 9:50 am
GilaMonster (6/9/2011)
I post too much.
Yes, you do. 😛
Congratulations Gail, and thank you for the countless times you helped me.
June 9, 2011 at 8:30 am
Chad Crawford (6/9/2011)
June 9, 2011 at 8:28 am
Eric M Russell (6/9/2011)
... I'm sure there is a long story with plenty or trial and error.
...longer than you could ever imagine!
Thank you.
June 9, 2011 at 7:26 am
Viewing 15 posts - 3,091 through 3,105 (of 5,394 total)