Viewing 9 posts - 1 through 9 (of 9 total)
Dave Ballantyne (1/17/2011)
I think this page will help you ....
Thanks for all the replys on the subject, I'd covered the above & got there in the end so many thanks...
January 18, 2011 at 1:58 am
Chris Morris-439714 (7/7/2010)
Ok...let's get started then. When scripting an UPDATE, always start with a SELECT. Something like this:SELECT TOP 100 [disabled], [date created]
FROM MyTable
WHERE [date created] < '2005-06-01 00:00:00.000'
Thanks...
July 7, 2010 at 9:49 am
Chris Morris-439714 (7/7/2010)
No it won't, not without modification.
Have you got backups of your data?
How important to you / your company is your data?
If you don't mind losing it forever...
July 7, 2010 at 8:37 am
Chris Morris-439714 (7/7/2010)
UPDATE MyTable SET [disabled] = MyNewValue
WHERE [date created] < 'June 2005'
Edit: This is a basic UPDATE statement, it doesn't get any easier - except you will have...
July 7, 2010 at 8:15 am
Chris Morris-439714 (6/21/2010)
Looks like an UPDATE to me.
UPDATE docsadm.shellorganisation
SET [disabled] = 'y'
WHERE docsadm.shellorganisation.org_name LIKE 'do not use%'
Sorry to drag an old thread back up to the top, however I...
July 7, 2010 at 7:55 am
That worked a treat! Thanks Chris & everyone else for there input 🙂
Cheers
OMD
June 21, 2010 at 3:17 am
That looks & appears to make more sense Chris 🙂
I'll give it a whirl.
Thanks
OMD
June 21, 2010 at 3:09 am
Chris Morris-439714 (6/21/2010)
What are you trying to do here? Insert new rows into shellorganisation, or update existing rows?
Hi,
I'm trying to add a value (that value being Y) to the same...
June 21, 2010 at 3:08 am
blue_inelush (6/21/2010)
You need to change your script from:
INSERT INTO docsadm.shellorganisation (disabled) VALUES ('y');
WHERE (((docsadm.shellorganisation.org_name) like 'do not use%'));
to something like this:
Insert into docsadm.shellorganisation (disabled)
select 'y' -- what columns do...
June 21, 2010 at 2:53 am
Viewing 9 posts - 1 through 9 (of 9 total)