to put it shortly

to put it shortly, i ‘escrewed’ up and renamed every course in Blackboard the same name.  It must be a popular course.

I was able to rename the current courses (year 2012) from the original course creation files, but we determined that older courses names should be updated from a DPM restore of the Database

select pk1, course_id,course_name from course_main

$array = $line.split on spaces
pk1 = $array[0], $course_id = $array[1] and … the first WORD of the course name is $array[2]

Bummer

OK, so we use a pipe to separate the columns, like

select pk1 + ‘|’+course_id+’|’+course_name from course_main

but we get an error message about trying to convert “|” to an integer to match pk1.

The simple solution is to change pk1 to a string, and it is as simple as

select CONVERT(varchar, pk1) + ‘|’+course_id+’|’+course_name from course_main where course_name not like ‘(read only)%’ and row_status = 0

The remainder of the query is to reduce the number of courses which have already been properly named.

Advertisements
Aside | This entry was posted in sql. Bookmark the permalink.