SQL statements
Moderator: General Moderators
SQL statements
Does anyone have an insert statement that or know where to get one that i can run to populate a database of state names and state abbreviations?
Thank you!
Thank you!
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I could compile one with all the states and the towns/cities in them from a database I have... the abreviations I don't have though.
EDIT | Not even sure I've got all the states.... It was a while since I started compiling the list and I never finished it but it was worldwide and I'm almost certain I finsihed the US and most of europe/asia.
EDIT | Not even sure I've got all the states.... It was a while since I started compiling the list and I never finished it but it was worldwide and I'm almost certain I finsihed the US and most of europe/asia.
That would be excellent if you could do that.d11wtq wrote:I could compile one with all the states and the towns/cities in them from a database I have... the abreviations I don't have though.
EDIT | Not even sure I've got all the states.... It was a while since I started compiling the list and I never finished it but it was worldwide and I'm almost certain I finsihed the US and most of europe/asia.
Also, I have read articles about varchar, in SQL Server, holding up to 8,000 characters. If that is true, then what does varchar (100) mean, a length of 100 or some of length?
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I'll dig out what I have from this list I have.... what do you need exactly? because I have info on the longitudes, latitudes, timezone and magnetic declinations for each of these places too (be warned.... there's *thousands* of places in this list) if you want them....dallasx wrote:That would be excellent if you could do that.d11wtq wrote:I could compile one with all the states and the towns/cities in them from a database I have... the abreviations I don't have though.
EDIT | Not even sure I've got all the states.... It was a while since I started compiling the list and I never finished it but it was worldwide and I'm almost certain I finsihed the US and most of europe/asia.
Also, I have read articles about varchar, in SQL Server, holding up to 8,000 characters. If that is true, then what does varchar (100) mean, a length of 100 or some of length?
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Here ya go...
I've zipped up two versions together for you... one has lots of places and the geographical data, the other is USA only. Both of these archives are identical by the way... don't download both, I only posted both in case you can't extract bzip2 files
[ 1.4 MB ] world_places.zip
[ 998KB ] world_places.tar.bz2
The are over 34,000 records for the world one, and over 32,000 in the USA one
Hope it helps
I've zipped up two versions together for you... one has lots of places and the geographical data, the other is USA only. Both of these archives are identical by the way... don't download both, I only posted both in case you can't extract bzip2 files
[ 1.4 MB ] world_places.zip
[ 998KB ] world_places.tar.bz2
The are over 34,000 records for the world one, and over 32,000 in the USA one
Hope it helps
Good god, that is a lot of you know what. Hehehd11wtq wrote:Here ya go...
I've zipped up two versions together for you... one has lots of places and the geographical data, the other is USA only. Both of these archives are identical by the way... don't download both, I only posted both in case you can't extract bzip2 files
[ 1.4 MB ] world_places.zip
[ 998KB ] world_places.tar.bz2
The are over 34,000 records for the world one, and over 32,000 in the USA one![]()
Hope it helps
Thanks a lot, I really appreciate it.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I've never used SQL server of any sort so I wouldn't know how you'd import that SQL dump. That's come from MySQL but apart from the database engine it specifies I would ahve thought the SQL should be pretty standard to import as it is. If not, I bet there are tools out there to fix the minor differencesdallasx wrote:Quick question, why do you think that SQL Server 2000 will give me an error if I try to seperate the values with a comma?d11wtq wrote: Hope it helps
Can't help you more than that I'm afraid.
Well, you would think so.... heh. I tried the statement with 2 values, separated by commas and it gave me that error. I am like you, I thought that SQL statements were standard.d11wtq wrote:
I've never used SQL server of any sort so I wouldn't know how you'd import that SQL dump. That's come from MySQL but apart from the database engine it specifies I would ahve thought the SQL should be pretty standard to import as it is. If not, I bet there are tools out there to fix the minor differences
Can't help you more than that I'm afraid.