• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: From OpenBase To MSSQLServer2000 (EOModeller)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: From OpenBase To MSSQLServer2000 (EOModeller)


  • Subject: Re: From OpenBase To MSSQLServer2000 (EOModeller)
  • From: Art Isbell <email@hidden>
  • Date: Tue, 3 Jun 2003 23:00:24 -1000

On Tuesday, June 3, 2003, at 07:49  PM, Jonathan Fleming wrote:

Anyhow, i have now followed your suggestion and, of course, it worked as you though it would, thus your frustration with me... sorry about that. But now the result is giving me the same answer for every row and the count is more than what each row should contain as a count and also the count is a larger number than the true amount of records in the DB.
This is what I have now used:
(SELECT COUNT(*) FROM TB_JOB, TB_JOB_PICTURE WHERE TB_JOB_PICTURE.TB_JOB_ID = TB_JOB.TB_JOB_ID)

It makes sense that the count is the same for every row because the derived SQL is identical for every row. In making my prior suggestion, I was concentrating on your error message rather than on what you were trying to do.


	What you actually need is something like:

SELECT COUNT(*) FROM TB_JOB_PICTURE WHERE TB_JOB_PICTURE.TB_JOB_ID = <TB_JOB_ID value for the current TB_JOB row>

I don't recall ever using such a derived attribute, so I'm not sure what EOF-specific (i.e., non-SQL) syntax might be substituted for the value of the current row's primary key. Now I wonder whether such a derived attribute is supported by EOF.

I suppose you could define a stored procedure instead if you didn't want to fetch the related objects in order to count them on the client.

Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: From OpenBase To MSSQLServer2000 (EOModeller)
      • From: Ricardo Strausz <email@hidden>
References: 
 >Re: From OpenBase To MSSQLServer2000 (EOModeller) (From: "Jonathan Fleming" <email@hidden>)

  • Prev by Date: Slash/backslash error during build (on win32)
  • Next by Date: Permitting D2JC to write a local/client disk
  • Previous by thread: Re: From OpenBase To MSSQLServer2000 (EOModeller)
  • Next by thread: Re: From OpenBase To MSSQLServer2000 (EOModeller)
  • Index(es):
    • Date
    • Thread