Jump to content


jgeter

Member Since 29 Jun 2015
Offline Last Active Jul 17 2015 01:49 AM
-----

Topics I've Started

Version Of Sql Not Compatible

17 July 2015 - 01:53 AM

I'm using SQL server express 2014 as my RDBMS but the version of SQL in your book isn't entirely compatible with this system. I'm using that because what you recommend in book sql command line 5.0 leaves much to be desired.


Updating City Column In My_Contacts

12 July 2015 - 03:01 AM

In chapter 5 after adding the city state columns you show how to add the state from location column to the state column however you do not provide solution to adding the city from location column to the city column.


Errors In Headfirst Sql Source

06 July 2015 - 02:42 AM

It seems that the sourcecode for headfirst sql if chocked full of errors. Particularly in the create table statement where there are extra ' apostrophe marks where there should be none. For example

CREATE TABLE `clown_info` (
 `name` varchar(50) default NULL,
 `last_seen` varchar(50) default NULL,
 
I'm using sql server express 2012 and spend more time fixing these apparent errors so the app will properly run the queries. It also appears there are spaces where there should be no spaces in a lot of the statements.

Chapter 5 Surf Program

29 June 2015 - 02:03 PM

scores = {}       
result_f = open("results.txt")
for line in result_f:
    (name, score) = line.split()
    scores[score] = name
result_f.close()
print ("The top scores were:")
for each_score in scores.keys():
    print ('Surfer ' + scores[each_score] + ' scored ' + each_score)
 
the line scores[score]=name is actually getting the surfer name from the file or is it  associating the name with the score putting the line back together so to speak after it was split?