freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Using GROUP BY and COUNT
- Date: Wed, 19 Dec 2012 13:21:31 -0500
On Wed, 19 Dec 2012 09:49:46 -0500
Jeremy Livingston <jeremyjlivingston AT gmail.com> wrote:
> I am using FreeTDS v0.91 with unixODBC, PHP 5.3.10, and SQL Server
> 2008. I have my connection to use the 7.2 protocol. I am attempting
> to run the following query:
>
> SELECT COUNT(o0_.orderItemId) AS sclr0
> FROM Membership m1_
> LEFT JOIN OrderItem o0_ ON m1_.membershipId = o0_.membershipId
> GROUP BY m1_.membershipId
>
> This query only throws an error when there is a Membership that has no
> records in the OrderItem table.
Does your query work with bsqslodbc? I tried something similar with no
problem:
$ bsqlodbc -S$S -U$U -P$P <<< 'select count
(c.type) from systypes t left join syscolumns c on t.type = c.type
group by t.type'
----------
0
6
16
122
640
12
54
57
5
28
2
196
3
8
2
26
2
72
2
--jkl
-
[freetds] Using GROUP BY and COUNT,
Jeremy Livingston, 12/19/2012
-
Re: [freetds] Using GROUP BY and COUNT,
James K. Lowden, 12/19/2012
-
Re: [freetds] Using GROUP BY and COUNT,
Jeremy Livingston, 12/19/2012
-
Re: [freetds] Using GROUP BY and COUNT,
Jeremy Livingston, 12/19/2012
- Re: [freetds] Using GROUP BY and COUNT, Cade Roux, 12/19/2012
-
Re: [freetds] Using GROUP BY and COUNT,
James K. Lowden, 12/19/2012
- Re: [freetds] Using GROUP BY and COUNT, Jeremy Livingston, 12/19/2012
-
Re: [freetds] Using GROUP BY and COUNT,
Jeremy Livingston, 12/19/2012
-
Re: [freetds] Using GROUP BY and COUNT,
Jeremy Livingston, 12/19/2012
-
Re: [freetds] Using GROUP BY and COUNT,
James K. Lowden, 12/19/2012
Archive powered by MHonArc 2.6.24.