Subject | Re: [firebird-support] Re: ASAP : Select,Join,Group by and Order by |
---|---|
Author | Allies Xposs |
Post date | 2009-03-12T18:20:06Z |
@luis Semedo Duarte
Thanks for your Idea...
I try with Left Outer Join or Left Join can load my record...
this Sql Command already Run since 2008 until Feb 2008. but this week trouble..
But my case is Sometime I can not load that Record...
if i am Execute 'Alter table Myss1 active'
the data can load record.
The Problem at Sql Command or My Database ??
thanks
Thanks for your Idea...
I try with Left Outer Join or Left Join can load my record...
this Sql Command already Run since 2008 until Feb 2008. but this week trouble..
But my case is Sometime I can not load that Record...
if i am Execute 'Alter table Myss1 active'
the data can load record.
The Problem at Sql Command or My Database ??
thanks
--- On Thu, 3/12/09, Luis Semedo Duarte <CrazyMenConnected@...> wrote:
From: Luis Semedo Duarte <CrazyMenConnected@...>
Subject: [firebird-support] Re: ASAP : Select,Join,Group by and Order by
To: firebird-support@yahoogroups.com
Date: Thursday, March 12, 2009, 1:43 PM
--- In firebird-support@ yahoogroups. com, Allies Xposs <allies_xposs@ ...> wrote:
>
> For All Master Of DBA...
> �
> I have Command SQL "
> �a.�� Select a.p_sku,b.M_ namas,a.p_ sell,Sum( a.P_qty) as qty,sum(a.p_ qty*a.p_sell) as total from Myss a left Join Pos01 on a.p_sku=b.m_ sku where p_room='R301' and p_lok='01' Group By a.p_sku,b.M_ namas,a.p_ sell
Your missing some table alias on your query!
(below may be a correct version)
SELECT
a.p_sku,
b.M_namas,
a.p_sell,
Sum(a.P_qty) as qty,
sum(a.p_qty* a.p_sell) as total
FROM
Myss a
LEFT OUTER JOIN Pos01 b ON
a.p_sku = b.m_sku
WHERE
a.p_room = 'R301' AND
a.p_lok = '01'
GROUP BY
a.p_sku,
b.M_namas,
a.p_sell;
But apparently (without live data from your tables) the query seems fine! Do you have any records on your table that can satisfy the conditions on the query?
Cheers
Luis Semedo Duarte
[Non-text portions of this message have been removed]