Skip to content

Instantly share code, notes, and snippets.

@sjorz
sjorz / CompanyOwnerExport.sql
Created May 3, 2012 02:06
Company owner export from legacy
#
# Select all company owner users from legacy database
#
select
Member.Username as username,Member.Password as password,
Person.Salutation as salutation, Person.Firstname as first_name,Person.Surname as last_name,Person.email,Person.Mobile as mobile_number,
Company.CompanyID as legacy_company_id, Company.CompanyName as name,
Address.vcStreetNo as street_no, Address.vcStreetName as street_name, Address.vcStreettype as street_type, Address.vcSuburb as suburb, Address.intPostCode as postcode, Address.vcAddress1 as address1
from person
join Member on Person.MemberID=Member.MemberID