Hi!
select phone_number, 74 as location_id ;
from phone_numbers ;
where location_id = 26
into cursor tempcursor nofilter
select phone_numbers
append from (dbf("tempcursor"))
use in tempcursor
HTH.
>In my phone_number table I have phone numbers and location_id.
>I have about 500 phone numbers with a location_id for Baltimore.
>what i need to do is copy all of the phone numbers for baltimore into the table again except have the location_id match the one for Washington DC.
>So that both cities will have the same phone numbers in the table.
>I can not figure out how to do this.
>I have tried:
>
>insert into phone_numbers
>select phone_number, location_id *but i need to insert washington's id
>from phone_numbers
>where location_id = 26 *baltimore's id
>
>insert into phone_numbers(phone_number, location_id)
>values(phone_number, 74) *can't use a field as a value
>where location_id = 26
>
>i just can't figure out how to do it, any ideas?
>Thanks,
>Ryan
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.