On Thu, 20 Dec 2001 15:11:14 EST, [EMAIL PROTECTED] wrote: >The following is the code used to create the view. > >create view lettsource as select t1.*, t2.send_letter >from scellclient t1, sendlett t2 >where ((#Date - t1.firstletter >1) >and (#Date - t1.firstletter <=5) OR (t1.followupletter1 = .#DATE)) AND t1.dateofc is null
For starters, this is not a view through which you should be able to update columns, because multiple table views are by SQL definition not updateable. Secondly, you do not define any link between the two tables, which means that, again, by SQL definition, you are creating a set that muliplies every single row from scellclient that means your other criteria by every single row in sendlett. If there were 30 rows that met your criteria in t1, and 200 rows in sendlett, you would have 6000 rows in your result, 200 for each rows in scellclient that you selected. That's called a cartesian product. There are rare cases where you might really mean to do that, e.g. if sendlett is a list of letters, and you want all letters to go to all selected clients, but it's pretty unusual. My guess is that there is some linking column that you should add to your WHERE clause: AND (t1.clientid = t2.clientid) Bill ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l
