Book a Demo

Author Topic: Update author field for all elements  (Read 5270 times)

Maggie

  • EA User
  • **
  • Posts: 106
  • Karma: +0/-0
    • View Profile
Update author field for all elements
« on: April 08, 2013, 06:27:24 pm »
Hi
I want to update the author field of all elements in a model, so i thought I could do it in sql.
I have this code
Code: [Select]
UPDATE t_diagram
SET Author = "Bob Smith"
WHERE Author = "bob.smith"

But it has no effect.

I would be grateful if someone could show me the correct way of doing this

Thanks

Maggie

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Update author field for all elements
« Reply #1 on: April 08, 2013, 08:46:09 pm »
Maggie,

That would only update the diagrams, not the elements.
To change the author for element you have to update t_object.
Code: [Select]
UPDATE t_object
SET Author = 'Bob Smith'
WHERE Author = 'bob.smith'

And I think you need to replace the double quotes with single quotes for it to work (although I'm not 100% sure about he Access syntax)

Geert

Maggie

  • EA User
  • **
  • Posts: 106
  • Karma: +0/-0
    • View Profile
Re: Update author field for all elements
« Reply #2 on: April 08, 2013, 09:02:28 pm »
Thanks!! :)