logo       

Re: Triggers problem: msg#00012

Subject: Re: Triggers problem
You're more likely to get a response to this on -general than here.

Why are you trying to do this with a trigger? ISTM that with what you're
trying to do you should be using a stored procedure.

On Wed, Oct 05, 2005 at 03:13:12PM +0530, Ninad Kalamkar wrote:
> i have a problem in triggers for that bellow is my table structure
> 
> survey table
>  <pgsql-php@xxxxxxxxxxxxxx>survey_id
> 
> questions table
> question_id
> survey_id
> 
> answer_options table
> answer_option_id
> question_id
> 
> 
> now the problem is
> i want to write a trigger after insert on survey table data should be
> inserted in questions and answer options table
> i get survey_id by new.survey_id but in same function i am not getting
> question_id to insert in answer option for newly inserted questions as the
> trigger is on insert of survey table
> i don't want to use cascaded triggers because it is creating some more
> problems
> please guide me in this regards

-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@xxxxxxxxxxxxx
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe