Double LEFT JOIN on Microsoft Access

For future reference, and to serve as recipe in the library, if you want to do more than one LEFT JOIN in Microsoft Access, you have to use parenthesis in the FROM clause.

Tipical Query:
SELECT a.columna, b.columnb, c.columnc
FROM tablea AS a LEFT JOIN tableb AS b ON a.id = b.id LEFT JOIN tablec AS c ON a.id = c.id

To work in Microsoft Access you have to use as following:
SELECT a.columna, b.columnb, c.columnc
FROM ((tablea AS a) LEFT JOIN tableb AS b ON a.id = b.id) LEFT JOIN tablec AS c ON a.id = c.id

Otherwise, you get a “Missing Operator” error and you can loose you head in the middle.

Notes:: Raspberry Pi SDCard Resize

This is a note in my log, very handy if in future we need to resize the SDCard for use in any Raspberry Pi or other similar device.

In my case i have a Samsung SDHC 8GB class 6, so you need to use this adapted to yours:

samsung_8gb_sdhc_card

Source for the cheat is:  http://elinux.org/RPi_Easy_SD_Card_Setup

It’s not a very difficult task, and if you have any Ubuntu at your computer you can do this easily.

You only have to determine wher’s the card mounted in your pc, and to do that, after inserting the card in the reader, at a terminal just issue the command “df” which will give you the filesystem mount points. From there you can see where is the card. In my netbook it was mounted at /dev/sdb so i will you that below.

 

  • Use parted to examine the card
$ sudo parted /dev/sdb
(parted) unit chs
(parted) print
Disk /dev/sdb: 121535,3,31
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 121536,4,32.  Each cylinder is 65.5kB.
Partition Table: msdos

Number  Start      End         Type     File system     Flags
 1      16,0,0     1215,3,31   primary  fat32           lba
 2      1232,0,0   26671,3,31  primary  ext4
 3      26688,0,0  29743,3,31  primary  linux-swap(v1)
This shows how my SD card was formatted after writing the image. Notice that nothing uses the card from end of ‘cylinder’ 29743 to the card’s maximum at 121535.
Partition 1 is the boot partition: we’ll leave that alone. Partition 2 is the root partition, which we’ll grow to fill most of the card. Partition 3 is the swap space, which needs to be moved to the end of the card. Note that on some other versions of linux (and some other versions of hardware) use /sde not /sdb.
  • Move the swap partition (you’ll have to adjust the numbers so that the end of partition 3 is at the end cylinder/head/sector of the card)
  • to calculate the number to use in the following command do:- (Maximum - (Partition 3 End - Partition 3 Start) ) - 1 = Partition 3 New Start so in this example (121535 - ( 29743 - 26688)) -1 = 118479
(parted) move 3 118479,0,0
  • Now grow the root partition. This involves removing the partition, re-creating it, then using resize2fs to grow the filesystem to fill the partition. It won’t destroy any data.
(parted) rm 2
(parted) mkpart primary 1232,0,0 118478,3,31
(parted) quit
Note that the starting address of the new partition is identical to its original value, and the ending address is immediately before the start of the swap partition.
  • Now clean and resize the root partition. As before, some users may need to use /sde2 instead.
$ sudo e2fsck -f /dev/sdb2
(allow it to add lost-and-found)
$ sudo resize2fs /dev/sdb2
  • Then put the card in the RPi and boot. You end up with a 7Gb partition to use.
pi@raspberrypi:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                  94M  4.0K   94M   1% /lib/init/rw
udev                   10M  168K  9.9M   2% /dev
tmpfs                  94M     0   94M   0% /dev/shm
rootfs                7.1G  1.3G  5.4G  20% /
/dev/mmcblk0p1         75M   28M   48M  37% /boot

A cor das lâmpadas

Certamente já repararam que as lâmpadas têm várias cores. Seja porque compraram uma lâmpada com uma cor específica, ou porque não gostaram da luz em determinado sítio, ou até mesmo porque aquele xénon do carro é horrível.

Bem estava aqui a limpar o Desktop, e dei com isto que guardei em tempos. Aqui fica, ao jeito de post-it, para mim e para mais alguém que sirva para algo.

Frio & Quente e K’s sem segredos:

BulbColorTempChart

My Oracle 10G XE is on port 8080. Can I change the port?

If you have port conflict and you want to change Oracle 10G XE’s HTTP port (default is 8080) you can change it.

This is what you do in the Windows XP machine.

Make sure OracleServiceXE and OracleXETNSListener have started in the Control Panel.

From Start | Run open a command window.
Assuming your environmental variables are set correctly start with the following: (Reds are what you type-in and blues are what the computer writes to screen)

C:\>sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 26 10:40:44 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> connect
Enter user-name: system
Enter password:
Connected.
SQL> Exec DBMS_XDB.SETHTTPPORT(8087); [Assuming you want to have HTTP going to this port]

PL/SQL procedure successfully completed.

SQL>quit
Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 – Production

In Hodentekhelp