lulu50
asked on
Update Data
Hi,
I need to update almost 200 records
CountryID CountryName CountryURL CountryStatus
1 USA index.cfm?CntID=1 A
2 France index.cfm?CntID=2 A
3 Italy index.cfm?CntID=3 A
4 Spain index.cfm?CntID=4 A
I have almost 200 records I need to update the
CountryURL to this
home.cfm?CntID=1
I have remove index.cfm and replace it with home.cfm then each
home.cfm will a differenct CntlD.
like this:
CountryID CountryName CountryURL CountryStatus
1 USA home.cfm?CntID=1 A
2 France home.cfm?CntID=2 A
3 Italy home.cfm?CntID=3 A
4 Spain home.cfm?CntID=4 A
How can I do that?
I need to update almost 200 records
CountryID CountryName CountryURL CountryStatus
1 USA index.cfm?CntID=1 A
2 France index.cfm?CntID=2 A
3 Italy index.cfm?CntID=3 A
4 Spain index.cfm?CntID=4 A
I have almost 200 records I need to update the
CountryURL to this
home.cfm?CntID=1
I have remove index.cfm and replace it with home.cfm then each
home.cfm will a differenct CntlD.
like this:
CountryID CountryName CountryURL CountryStatus
1 USA home.cfm?CntID=1 A
2 France home.cfm?CntID=2 A
3 Italy home.cfm?CntID=3 A
4 Spain home.cfm?CntID=4 A
How can I do that?
ASKER
It has to be in MySQL database
ASKER
something like this but for 200 record
UPDATE CountryTbl
SET CountryURL='home.cfm?CntID =1'
WHERE CountryURL = 'index.cfm?CntID=1'
UPDATE CountryTbl
SET CountryURL='home.cfm?CntID
WHERE CountryURL = 'index.cfm?CntID=1'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sharath_123: you saved me time and you saved my life
THANK YOU Sharath_123: THANK YOU Sharath_123:
THANK YOU Sharath_123: THANK YOU Sharath_123:
ASKER
WELL DONE THANK YOU
Glad I could help you :)
<cfquery >
update countries (or whatever the table name is)
set CountryURL = 'home.cfm?CntID='+CountryI
</cfquery>