Viewing 15 posts - 3,406 through 3,420 (of 3,957 total)
vinu512 (6/15/2012)
Hi Chris and Dwain.....this is really sweeet. 😀
You should see it vs. the double UNPIVOT. IMHO much cleaner. Runs faster too.
June 15, 2012 at 1:08 am
anthony.green (6/15/2012)
I like the idea of the values list,...
June 15, 2012 at 1:04 am
Jeez Kingston, you've let the cat out of the bag!!
Actually you don't need to do a JOIN of any sort.
create table #studentSchoolHistory (studentID varchar(12),scode int, iSchoolYearcode int)
insert into #studentSchoolHistory values...
June 15, 2012 at 12:31 am
Lynn Pettis (6/15/2012) Now I am wondering if this was also a homework problem.
SELECT SolutionFor
FROM MyHomework
WHERE Solutionby = 'Lynn' OR Solutionby = 'Sony'
🙂
June 15, 2012 at 12:21 am
Lynn Pettis (6/15/2012)
dwain.c (6/14/2012)
INNER JOIN student with studentSchoolHistory tables to get the first 3 columns. Use a correlated subquery to get the fourth (Mobility Indicator) column.
Oh, actually a left...
June 15, 2012 at 12:15 am
Lynn Pettis (6/14/2012)
Not sure why you need the SUM or GROUP BY.
I was going to say the same thing but I think Sony was assuming there might be duplicated rows...
June 15, 2012 at 12:04 am
Sony Francis @EY (6/14/2012)
Try thisSELECT PARSENAME(REPLACE('/Folder/File/Name', '/', '.'), 2)
Looks familiar! 😉
June 15, 2012 at 12:00 am
I think your friend's suggestion is appropriate.
If you're worried about having 500000 rows in the role/screens table, try only storing the relation if the role is authorized to use the...
June 14, 2012 at 11:51 pm
This will also work.
SELECT PARSENAME(REPLACE('/Folder/File/Name', '/', '.'), 1)
June 14, 2012 at 11:30 pm
I would start by putting a WITH(ROWLOCK) hint on the UPDATE statement.
June 14, 2012 at 11:27 pm
INNER JOIN student with studentSchoolHistory tables to get the first 3 columns. Use a correlated subquery to get the fourth (Mobility Indicator) column.
June 14, 2012 at 10:50 pm
It appears that there is more than one person stumped on the same homework problem:
http://www.sqlservercentral.com/Forums/Topic1316272-391-1.aspx?Update=1
June 14, 2012 at 9:10 pm
It appears that there is more than one person stumped on the same homework problem.
http://www.sqlservercentral.com/Forums/Topic1316131-391-1.aspx
June 14, 2012 at 9:09 pm
ChrisM@home (6/14/2012)
Have you tried a VALUES list? With CROSS APPLY?
Gosh Chris! Did you mean like this?
SELECT APUserID, TypeID, Something
FROM @SampleData
CROSS APPLY (
VALUES ('FirstName', FirstName)
...
June 14, 2012 at 8:49 pm
Lynn Pettis (6/14/2012)
dwain.c (6/14/2012)
Sean Lange (6/14/2012)
June 14, 2012 at 7:41 pm
Viewing 15 posts - 3,406 through 3,420 (of 3,957 total)