Re: Still Having a Problem Counting a String Field

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



That is actually a good idea. Only problem is I do not have SQL locally..I
am connecting to an off-site data store and the code I wrote is the Crystal
Syntax. Can you offer any methods where I can deleiver to syntax to my DBA
and have him run it for me?

"Rob Diamant" <rob@xxxxxxx> wrote in message
news:OeHTZhXVFHA.3636@xxxxxxxxxxxxxxxxxxxxxxx
> John,
>
> Whenever I have problems with expected record counts, I copy the SQL from
> the report and execute it in Enterprise Manager or Query Analyzer and
> review the results. This usually helps identify any bad joins. From what
> you are describing, your recordset is 418 records instead of an expected
> 8, so I would look into that first.
>
> Rob
>
>
> "John Harris" <harris@xxxxxxxx> wrote in message
> news:%23ydkiPXVFHA.2420@xxxxxxxxxxxxxxxxxxxxxxx
>>I have asked for help on this item in the past but I am still having
>>trouble getting it to work.
>>
>> To review it, I have a database (SQL) connecting through ODBC on CR 11.
>> Currently there are 8 records in it (because I wanted a number I could
>> work with while building the report). 4 are label as 'Prenatal' and 4 are
>> 'Infant' in the table Screenings under the field Screen_Type.
>>
>> I need to Count the numer of each type I have.
>>
>> I have done it this way:
>>
>> Created a Formula field called PrenatalCount and inserted this formula:
>>
>> IF {Screenings.Screen_Type}= 'Prenatal'
>> then 1
>> else 0
>>
>> Then did a SUM on that field. I did the same for the Infant side.
>>
>> I am getting a sum of 208 for Prenatal and 218 for Infant.
>>
>> Can anyone help me in this? What am I doing wrong??
>>
>
>


.



Relevant Pages

  • RE: Calculated fields in main form based on criteria in sub form
    ... I've changed the SQL by droping the WHERE statement and setting GroupBy to ... NE Sum Query (uses information from the subform, ... other queries differ in what Quadrant equals) ...
    (microsoft.public.access.forms)
  • Re: Bad Performance on Semiadditive Measures
    ... Is there some fix regarding this problem in SQL 2005 SP1? ... usually LastNonEmpty and AverageOfChildren would be somewhat ... slower than Sum, but faster than equivalent hand-crafted MDX. ...
    (microsoft.public.sqlserver.olap)
  • freeradius & mysql
    ... I have problem with connecting to MysSQL server from radius. ... service radiusd restart gets this: ... socket to MySQL server netams@localhost:netams ... Module: Loaded SQL ...
    (comp.os.linux.misc)
  • RE: Website Administration has errors
    ... The application is configured to use SQL Server ... permission issue when the webadmin site page try connecting to the target ... since the web admin site will use the ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: DCOM Error - Event 10009
    ... using SQL Server Management Studio 2005. ... Whenever we first launch SQL ... when connecting to a different registered server, it will hang again for 5 - ... I have checked DCOM Config using dcomcnfg, ...
    (microsoft.public.sqlserver.clients)