May 16, 2012 at 3:46 pm
I have another question about this.
Instead of making the gradeServed format like K-05, how can I make the format like a string with each grade in order and no space in between:
For K-05 , use 000102030405,
for 09-12, change it to 09101112.
For PS-5, make it like 00010203040529
Thanks in advance
May 25, 2012 at 10:01 pm
Gosh... I missed the additional question. My apologies for the delay.
You'll need to do some conditional concatenation. Wayne Sheffield wrote a nice article on how to do such a thing. All you need to do is not include the commas he does. Here's the link to his article.
http://www.sqlservercentral.com/articles/comma+separated+list/71700/
--Jeff Moden
Change is inevitable... Change for the better is not.
May 26, 2012 at 6:55 am
sqlfriends (5/3/2012)
Is cross apply no longer available in SQL server 2008?
It was not available in SQL Server 2000, so if your database is set to 2000 compatibility mode (80), you will get a syntax error when trying to use APPLY. It should not need saying that you should not be in 2000-compatible mode on SQL Server 2008 unless you have a particularly compelling reason. Note that this compatibility mode has been dropped from SQL Server 2012.
May 28, 2012 at 11:24 am
Thanks all, that is very helpful
Viewing 4 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply