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 |
|
sinjin67
Yak Posting Veteran
53 Posts |
Posted - 2008-02-08 : 15:54:36
|
| Greeting All, Again I stuck from foxpro into sql.could use some help.I have 2 tables, Contact and Service.In the contact table I have an ID numberthat I would to insert into the Service tablebased on the Service table user name.I cant use a Foxpro replace all command with somefunction attached to the script. I cant seem to finda SQL version of what I would like to do.So here is my layout. If someone might be able to pointme in a direction, I would be greatfulContact Table "grid is the auto id field"grid, Anumber, Name, AddressService Tablegrid, Anumber, Name, Addressservice.name = contact.name add 'anumber' from contact table to service table where service.name lives.I will keep looking on my own. any help would be greatThanx.. |
|
|
recontrasalo
Starting Member
12 Posts |
Posted - 2008-02-08 : 16:03:00
|
| insert service (idnumber)select a.idnumber from service ajoin contact bon a.username = b.username |
 |
|
|
sinjin67
Yak Posting Veteran
53 Posts |
Posted - 2008-02-08 : 16:09:10
|
| Than you,I was getting close..This is what I had in mindSELECT anumberFROM contact aLEFT OUTER JOIN service bON b.name=a.nameInsert ?????? |
 |
|
|
|
|
|