Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
joblenis
Starting Member
29 Posts |
Posted - 2007-07-06 : 11:24:53
|
| I have a question about the best method of going about doing this.I have a records table which stores visitor information from IISlogs (dbo.records)I have added IP tables to try and resolve where the visitors are from. They are labeled 'ip4_##' where ## is the first section of the ip.. so if my IP was 24.150.66.80 I would need to look in table ip4_24 and inside there look for 150 in column B and then 66 in column C. From that it will say which country is attached, that way I can update the countrycode in the dbo.records.I am not sure how to do this search, so any ideas would be great.Thanks in advance* Table structre for the ip_## tables are COLUMN 'b' int (represents the 2nd section of an IP)COLUMN 'c' int (represents the third section of an IP)COLUMN 'country' int |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-07-06 : 22:11:15
|
Post some sample data and the expected result KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2007-07-08 : 21:08:31
|
| This sucks. You need a table with the bits of the IP in it and a separate country table not a table with the country code in the name. |
 |
|
|
|
|
|