Had a go at this, but sofar I haven't been able yet to get it to work.
I get no error, but A3Test115_J remains just at it is.
I couldn't find much information about INSERT OR REPLACE in the SQLite
documentation. What exactly should it do?

RBS

-----Original Message-----
From: Joe Wilson [mailto:[EMAIL PROTECTED] 
Sent: 28 January 2007 20:37
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] Limit statement size?

I forgot to specify the unique key for the table to be updated 
in the first attempt at INSERT OR REPLACE.

Please try this...

insert or replace into A3Test115_J(
  PATIENT_ID,     ---<---
  ENTRY_ID_E2, 
  READ_CODE_E2, 
  TERM_TEXT_E2,
  ...
  NUMERIC_VALUE_E15
 )
 select
  t1.PATIENT_ID,  ---<---
  g2.ENTRY_ID,
  g2.READ_CODE,
  g2.TERM_TEXT,
  ...
  g15.NUMERIC_VALUE
 from 
  A3Test115_J t1, 
  GROUP_2 g2, 
  GROUP_3 g3,
  ... 
  GROUP_15 g15
 where
  t1.PATIENT_ID = g2.PID
  and t1.PATIENT_ID = g3.PID
  and t1.PATIENT_ID = g4.PID
  and t1.PATIENT_ID = g5.PID
  ...
  and t1.PATIENT_ID = g15.PID

--- RB Smissaert <[EMAIL PROTECTED]> wrote:

> Thanks, will have a look at that.
> It definitely looks better.
> 
> RBS


 
____________________________________________________________________________
________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

----------------------------------------------------------------------------
-
To unsubscribe, send email to [EMAIL PROTECTED]
----------------------------------------------------------------------------
-




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to