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)
 SQL Statement - Update replace value

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-01-22 : 09:15:15
Angie writes "I'm brand new to writing SQL statements. I've only updated data in MS Query. OS = Windows 98 ed.2, SQL Server 6.5, and PCAnywhere. I need to replace the value (Null) with a blank in MS Query. I found examples of an update statement - what application & where does this statement get typed?

Thanks."

rihardh
Constraint Violating Yak Guru

307 Posts

Posted - 2003-01-22 : 09:28:01
Well Angie, you can "type" it into Query Analyzer, but please be carefull, there no such thing as "UNDO" in MSSQL server.

Go to Top of Page

Crespo24
Village Idiot

144 Posts

Posted - 2003-01-22 : 09:53:46
quote:

Well Angie, you can "type" it into Query Analyzer, but please be carefull, there no such thing as "UNDO" in MSSQL server.





Do it in a transaction, at least then you can do a rollback.

BEGIN TRANS newTransaction

UPDATE
blah blah blah

UPDATE
blah blah blah

then you can ROLLBACK if you don't like the result of your updates.


Go to Top of Page

rihardh
Constraint Violating Yak Guru

307 Posts

Posted - 2003-01-23 : 09:01:27
Is it like she can do the update, then the select statement and then decide. And if she doesn't like the outcome, she can just rollback the whole thing??? - How???

I would like to see that work.(Don't forget that she's a newbee to MSSQL!!!)

Angie, it's true that transactions are a good thing but not in this context.

If you HAVE TO do the update, please don't do it without assistance from an expert.

Go to Top of Page
   

- Advertisement -