[SQL] NEW and OLD as ROWS

2005-08-03 Thread Craig Servin
I am writing an update trigger that I want to fire when any field changes. It looks like two ROWS can be compared very easily, but not the two RECORDS OLD and NEW. Is there a way to do: NEW IS DISTINCT FROM OLD in a trigger? This would help me not have to write a specific trigger for each ta

Re: [SQL] Breakdown results by month

2005-08-03 Thread codeWarrior
You are looking for what is commonly referred to as a "pivot-table" or a "cross-tab". Pivot-tables are a fairly sophisticated, non-normalized view of a dataset, nd most commonly appear in spreadsheets and are used for financial or statistical analysis. These queries typically use an aggregate f

Re: [SQL] [NOVICE] SQL error code -601

2005-08-03 Thread daq
jcafg> All, jcafg> I recevied the SQL error code -601 from an jcafg> embedded C SQL EXEC statement jcafg> ie, EXEC SQL DELETE FROM foo WHERE number = 99; jcafg> I've googled the error code, but the only thing I can come up with is jcafg> "current transaction is aborted, queries ignored unt

Re: [SQL] Trigger on select?

2005-08-03 Thread Karsten Hilbert
On Tue, Aug 02, 2005 at 05:54:59PM -0700, Chris Travers wrote: > >Hey, anyone know if it is possible to fire a trigger before a select? > >I'm considering creating some tables which contain data summarized > >from other tables as kind of a cache mechanism. The hope is I can > >speed up some q