You are here: Re: want to create table from old table « PHP SQL « IT news, forums, messages
Re: want to create table from old table

Posted by strawberry on 02/24/06 00:31

"Bob Stearns" <rstearns1241@charter.net> wrote in message
news:Tz8Lf.123$3%4.95@fe02.lga...
> strawberry wrote:
>> "Bob Stearns" <rstearns1241@charter.net> wrote in message
>> news:%H3Lf.978$BS6.341@fe04.lga...
>>
>>>strawberry wrote:
>>>
>>>>old table has place names, say a to z.
>>>>
>>>>new table has to list all posssible connections, ie, a-b ,a-c , b -a .
>>>>
>>>>can anyone point me in the right direction for how to do this?
>>>>
>>>>tia.
>>>
>>>insert into links
>>> (select from.name, from.lat, from.lon, to.name, to.lat, to.lon
>>> from orig_table from
>>> join orig_table to on from.name<>to.name)
>>>
>>>should be close to what you want.
>>
>>
>> so that links all names that aren't the same?
> Yes. That was what I red the specs as meaning.
not much joy with that i'm afriad. original table is called postcode_names ,
and field is called town, icreated a table called links , with id, fromtown
and to town as fields, so i used

insert into links
(select from.Town, to.Town
from postcode_data from
join postcode_data to on from.Town<>to.Town)

i think i'm mssing quite a big trick here!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация