I am an OpenNMS admin and new to Postgres. I have just updated around 1100 devices manually with multiple categories and left out a category from each... What I would like to do is run a sql statement that will select any node with a category ID of X and add to that node a category ID of Y....
table looks like this:
public.category_node (trimmed to one nodeid)
I want to search all rows for categoryid of 27, then insert a row with categoryid of 30 to that same nodeid. so it would look like this.
I think I have this much:
SELECT "categoryid" FROM "public"."category_node" WHERE "categoryid" = '27'
Is this the right track? and then, how do I insert a row?
This email and any files transmitted with it may contain
confidential and /or proprietary information in the possession
of WellStar Health System, Inc. ("WellStar") and is intended
only for the individual or entity to whom addressed. This email
may contain information that is held to be privileged, confidential
and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby
notified that any unauthorized access, dissemination, distribution
or copying of any information from this email is strictly prohibited,
and may subject you to criminal and/or civil liability. If you have
received this email in error, please notify the sender by reply email
and then delete this email and its attachments from your computer.
- Thank you.
pgsql-novice by date
|Next:||From: Alan Hodgson||Date: 2007-11-02 18:39:28|
|Subject: Re: need some help with an opennms query/insert|
|Previous:||From: Jon Sime||Date: 2007-11-01 00:16:01|
|Subject: Re: What data type best used for money|