Galiwood Blog
Family
Photos
r
 
College stuff
Web Development
Contact me


My Charity: Budo
My Home: Uganda
Fun zone

r
blog
Search GaliWOOD

Thursday, June 21, 2007

MS Access Bug and Hack to resolve it

I spent a couple of hours trying to figure out why my SQL query was not returning adequate results until I realised a bug in Access. As I was doing my research work, I needed to combine two MS access tables.

Table 1: SPCycles
Columns: Date, Sign

Table 2: SPPrices
Columns: Date, HiPrice, LoPrice, Price

Their primary key was date.

All I wanted to do was get a new combined table

Table 3: SPCyclesAndPrices
Columns: Date, Price, Sign

So naturally I wrote the sql queries,
//Note: Access only accepts one query at a time

Create Table [SPCyclesAndPrices]
(
Dates date, //use Dates because Date is reserved in Access, but u can change it later
Price money,
Sign varchar
)

INSERT INTO [SPCyclesAndPrices]
SELECT SPPrices.Date as Dates, SPPrices.Price as Price , SPCycles.Sign as Sign
FROM [SPPrices], [SPCycles]
where SPCycles.Date = SPPrices.Date

//Warning, this will skip certain values for some reason

Hack: Replace the last line with either one of these alternatives

where Format(SPCycles.Date,"dd MMM yyyy HH:mm:ss ") = Format(SPPrices.Date,"dd MMM yyyy HH:mm:ss ")

where DateAdd("yyyy", 0, SPCycles.Date )=DateAdd("yyyy", 0, SPPrices.Date )

This alternative is CPU intensive and slows down ACCESS considerably but atleast guarantees a correct result.

Northeastern Uni Crime Log 2007

How safe am I at a university in the middle of Boston???
This is a weekly crime log reported in the news for students to be careful.

Crime Log Entry of the Week
Friday, June 15
1:30 a.m.
The manager of Symphony Market on Huntington Avenue flagged down a NUPD car to report that a man had just urinated on several bags of onions. The man left his I.D. behind at the store, which was used to identify him as a 19-year-old student. Officers found him sitting on the steps outside his residence hall. He was brought back to the store for positive identification. The student was extremely apologetic and the manager accepted financial restitution, but didn't file charges. The student will be reported to OSCCR.

Wednesday, June 6
2 a.m.
An NUPD officer on patrol on Gainborough Street was flagged down by pedestrians reporting a fight in the alley behind St. Stephen Street. Two officers discovered a group shoving each other. A student in the crowd then punched another male student in front of the officers. The student who threw the punch, 21-year-old Scott Dahlen, was arrested. He will be reported to the Office of Student Conduct and Conflict Resolution (OSCCR).

1 p.m.
Snell Library staff reported a group of high school students in the library. Northeastern Police Department (NUPD) officers questioned seven students, six of whom were cutting class. Their schools were notified and they were all escorted off campus and issued trespass warnings.

3 p.m.
A 22-year-old male student reported locking his bicycle to a rack outside Shillman Hall earlier in the afternoon. When he returned, the bicycle and the chain lock were missing.

Thursday, June 7
8:30 a.m.
Snell Library staff reported high school-aged students in the building. Two females, a 16-year-old and 17-years-old who were cutting school were evicted from the building and issued trespass warnings.

1:30 p.m.
A 20-year-old female student was walking on The Fenway behind the Museum of Fine Arts (MFA) when two young females attempted to rob her on a footbridge. They demanded her backpack, but she refused. The suspects then hit the student in the back of the head and fled.

Monday, June 11
3 p.m.
An officer spotted two women on Huntington Avenue who appeared to be intoxicated. The officer questioned a 16-year-old female and a 21-year-old female, who both claimed to be visiting a student. The 21-year-old reportedly purchased vodka and shared it with the younger female. The parents of the 16-year-old were notified and came to pick up their daughter. The 21-year-old female will be summonsed to court for procuring alcohol for a minor.

Tuesday, June 12
10:30 p.m.
An officer spotted a man sitting on a bench in Centennial Common who appeared ill. The officer approached and attempted several times to revive the man. Eventually, he sat up and a bag of cocaine fell from his sweatshirt. He fled toward Ruggles Station and was apprehended on the second floor. NUPD arrested Jashawn Bell, 19, of Dorchester on cocaine possession charges.

5:30 p.m.
An officer was on plain-clothes patrol when he saw a suspicious man walking into Ryder Hall. The officer followed the man to a stall in the first floor men's bathroom. Officers interrupted him and arrested Frank Smith, 37, of Randolph for possession of heroin. He was also wanted on larceny charges in Boston and Braintree and will be turned over to those authorities.

Wednesday, June 13
1 p.m.
An officer on patrol near Matthews Arena recognized a woman walking down the street as someone who had been arrested on campus previously. The officer discovered she was wanted on outstanding warrants for trespassing, assault and battery, disorderly conduct and burglary. NUPD arrested Kelly Sheppard, 45, on those charges.

3 p.m.
A 22-year-old female student reported receiving harassing phone calls from her ex-boyfriend. She broke up with him a couple weeks ago and he had been calling ever since, despite her insisting otherwise. Officers contacting him and instructed him to stop calling her. The next day, the student reported receiving calls from him. An officer again contacted him and warned him that he will be criminally charged if he keeps calling.

Thursday, June 14
3:30 a.m.
A 22-year-old male student reported being robbed by three men on Hemenway Street near the MFA. The student said they punched him before taking his cell phone and wallet. The two suspects fled by car.

Friday, June 15
4:30 a.m.
An officer observed an 18-year-old male laying down in the bushes outside Hayden Hall wearing only boxer shorts. His pants were found nearby soaked with urine. He claimed to have been visiting a student and that he had been drinking all night, but couldn't remember where the student lived or how he ended up in the bushes. He was taken to Beth Israel Deaconess Medical Center by ambulance.

Sunday, June 17
12:30 a.m.
Boston Police asked for assistance responding to a loud party at 400 Massachusetts Ave. Inside, officers found a beer ball and a large group of students. The residents were arrested, 25-year-old Northeastern student. He will be reported to OSCCR.

Tuesday, June 19, 2007

MFC trading stopped

I'm disappointed this morning. Yesterday, my boss, Dr. Giessen asked us to stop trading. My current job is financial programming/research. As a grad student, I have an assistantship under a Chemistry professor that does financial research and hires computer science students...are u with me. These are three departments coming together into one. It has been an exciting past couple of months as we tested our work/algorithms in the real markets. The excitement was great as we made the first couple of thousand dollars proving our methods work..and likewise the disappointment was even greater when it all came tumbling down and we lost all our earnings. But just like our simulated programs, we need to hang in there for a while and not yield to emotion. Dr. Giessen thinks otherwise..and it's his money in the market anyway. So anyway, I'm bummed that we had to stop trading because that was exciting. But now it's back to the drawing board.

© Copyright galiWOOD 2009 All Rights Reserved