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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 update query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-01-23 : 07:13:37
Aiysha writes "I want to perform a simple query,
Updating a column

set the values in column 1 to 'Something' where the values in column one are not like 'nothing%'

Can someone plesae help me with this query

Thanx"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-01-23 : 07:14:50
Well, an UPDATE is not a query, and if you modify your question's wording a little bit you'll get your answer

UPDATE myTable
SET column1='Something'
WHERE column1 NOT LIKE 'Nothing%'
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-01-23 : 14:12:46
I have a queston, too:

i have a table called Things and I need to get stuff from it.

How do I SELECT the ID, Name, and Amount columns FROM the Things table, but I only want rows WHERE the NAME is = to 'Jones'. Oh yeah, and I want it to be ORDERed BY the Amount column, in a DESCending manner.

So, how do I do this?



- Jeff
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2004-01-24 : 03:17:49
The first time I wrote an ad-hoc query while my boss was sitting next to me, he just stared at the query and the results that magically appeared on the screen. And then suddenly "Damn, this is just like plain English! I pay you guys way too much for this work!"

OS
Go to Top of Page
   

- Advertisement -