List Info

Thread: Bulk keyword insert




Bulk keyword insert
user name
2007-03-12 17:08:11
I need to add a keyword to every story within a category (id
= 1031). I
think I have a nested select statement that identifies all
the story
ids, but I'm not sure how to incorporate it into an insert
statement.

SELECT DISTINCT ON (story__id) story__id FROM story_instance
WHERE id IN
(SELECT story_instance__id FROM story__category WHERE
category__id =
1031);

Any ideas or alternative methods for achieving the end goal?
For
example, should I be considering using the category keyword
feature?

Chris

Re: Bulk keyword insert
user name
2007-03-13 00:14:05
On Mar 12, 2007, at 15:08, Chris Schults wrote:

> Any ideas or alternative methods for achieving the end
goal? For
> example, should I be considering using the category
keyword feature?

Yes.

You can also use bric_soap to export all of the stories in
that  
category, insert the keyword, and then use bric_soap to
update them.

Best,

David

Re: Bulk keyword insert
user name
2007-03-13 05:36:15
On Mon, 12 Mar 2007, Chris Schults wrote:
> I need to add a keyword to every story within a
category (id = 1031). I
> think I have a nested select statement that identifies
all the story
> ids, but I'm not sure how to incorporate it into an
insert statement.
>
> SELECT DISTINCT ON (story__id) story__id FROM
story_instance WHERE id IN
> (SELECT story_instance__id FROM story__category WHERE
category__id =
> 1031);
>
> Any ideas or alternative methods for achieving the end
goal? For
> example, should I be considering using the category
keyword feature?

If the keyword is the same for all stories in that
category,
then definitely.


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )