Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread ineer joins cascading
Thu, Aug 7 2014 11:46 AMPermanent Link

Elamin

I'm porting my work from Ms SQL Server, all tables imported correctly and I managed to recreate triggers and stored procs, my problems is with the View.
I created the views is SQl Server query builder then exported them to SQL Script, but elevatedb mangager could not execute them.
for example I have the following script
(CREATE VIEW vAdjustDets
AS
SELECT     adjustDets.id, adjustDets.fk, adjustDets.qty, adjustDets.qb, adjustDets.qa, adjustDets.gs, adjusts.dat,
                     adjusts.posted, Items.Name AS ItemName, Units.Name AS unitName, adjustDets.qty,
                     adjustDets.balance, adjustDets.Batch, Batches.Expiry, Batches.Item
FROM         Units RIGHT OUTER JOIN
                     Items RIGHT OUTER JOIN
                     adjusts RIGHT OUTER JOIN
                     Batches RIGHT OUTER JOIN
                     adjustDets ON Batches.Serial = adjustDets.Batch ON adjusts.id = adjustDets.fk ON Items.ID = Batches.Item ON
                     Units.ID = Items.Unit

)
elevatedb manager generate an error message "ElevateDB Error #700 An error was found in the statement at line 7 and column 29 (Expected ON but instead found RIGHT)"
-any one can help please ?
- is there is a visual query builder?
Thu, Aug 7 2014 2:57 PMPermanent Link

Raul

Team Elevate Team Elevate


You need to provide a join clause (ON table1.col1=table2.col2) for each
join as EDB does not know what to join on (it would default to cross
join otherwise except in this case it's a right outer join so it can't
default - hence you need to define the join conditions).

Raul


On 8/7/2014 11:46 AM, Elamin wrote:
> I'm porting my work from Ms SQL Server, all tables imported correctly and I managed to recreate triggers and stored procs, my problems is with the View.
> I created the views is SQl Server query builder then exported them to SQL Script, but elevatedb mangager could not execute them.
> for example I have the following script
> (CREATE VIEW vAdjustDets
> AS
> SELECT     adjustDets.id, adjustDets.fk, adjustDets.qty, adjustDets.qb, adjustDets.qa, adjustDets.gs, adjusts.dat,
>                        adjusts.posted, Items.Name AS ItemName, Units.Name AS unitName, adjustDets.qty,
>                        adjustDets.balance, adjustDets.Batch, Batches.Expiry, Batches.Item
> FROM         Units RIGHT OUTER JOIN
>                        Items RIGHT OUTER JOIN
>                        adjusts RIGHT OUTER JOIN
>                        Batches RIGHT OUTER JOIN
>                        adjustDets ON Batches.Serial = adjustDets.Batch ON adjusts.id = adjustDets.fk ON Items.ID = Batches.Item ON
>                        Units.ID = Items.Unit
>
> )
> elevatedb manager generate an error message "ElevateDB Error #700 An error was found in the statement at line 7 and column 29 (Expected ON but instead found RIGHT)"
> -any one can help please ?
> - is there is a visual query builder?
>
Image