Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keep getting Time Expired when updating PWGCity column.

Status
Not open for further replies.

derbyp

Technical User
Dec 11, 2006
7
0
0
US
DECLARE @PWGCitya int
UPDATE tblLeads_Info
SET tblLeads_Info.PWGCity = @PWGCitya
SELECT @PWGCitya = UPDATE_AddToPWGCity1.PWGCity
FROM tblLeads_Info INNER JOIN
UPDATE_AddToPWGCity1 ON tblLeads_Info.NameID = 645526 AND UPDATE_AddToPWGCity1.NameID = 645526
 
I think this code is not doing what you want it to. Can you explain in words what you hope to achieve here?

Code:
DECLARE @PWGCitya int 
[green] -- At this point @PWGCitya is NULL[/green]
UPDATE    tblLeads_Info
SET tblLeads_Info.PWGCity = @PWGCitya
[green] -- No where clause, so all records will be updated with null.[/green]

SELECT  @PWGCitya = UPDATE_AddToPWGCity1.PWGCity
FROM tblLeads_Info INNER JOIN
UPDATE_AddToPWGCity1 ON tblLeads_Info.NameID = 645526 AND UPDATE_AddToPWGCity1.NameID = 645526

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
I am trying to pass the value 212 from the 2 column table
UPDATE_AddToPWGCity1 to the tblLeads table with column PWGCity.
 
Thank you gmmastros,
Here is the correct code for what I am doing.


UPDATE tblLeads_Info
SET PWGCity = UPDATE_AddToPWGCity1.PWGCity
FROM tblLeads_Info, UPDATE_AddToPWGCity1
WHERE (tblLeads_Info.NameID = UPDATE_AddToPWGCity1.NameID)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top