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 |
|
vuyiswamb
Starting Member
6 Posts |
Posted - 2007-04-25 : 04:03:56
|
| I NEED TO UPDATE THESES RECORDS BASED ON THIS QUERYselect * from property whereLis_key in(select lis_key from property where substring(func_key,1,5)='GEOSS' And substring(func_key,6,8) >=3)andFunc_key = 'PV000000'and substring(Attrib_code,5,2)!=16 AND ACTIVE = 1order by Lis_keyHELP ME |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-04-25 : 04:38:51
|
Update which table ? Which column to update ? Update with what value ? KH |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-25 : 04:49:25
|
| [code]Update pset <SomeCol> = <Somevalue>From Propertywhere substring(func_key,1,5)='GEOSS' And cast(substring(func_key,6,8) as integer) >= 3 and and substring(Attrib_code,5,2) <> '16' and Active = 1[/code]Your requirement looks conflicting to me... You want records where substring(func_key,1,5)='GEOSS' and also Func_key = 'PV000000'. What does that mean?Post some sample data to back your question.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-04-25 : 04:52:31
|
Harsh, you missed the table alias pUpdate pset <SomeCol> = <Somevalue>From Property p KH |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-25 : 04:56:07
|
quote: Originally posted by khtan Harsh, you missed the table alias pUpdate pset <SomeCol> = <Somevalue>From Property p KH
Oops! Thanks KH.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|
|
|