Re: Serious errors with 'Create view' command



Hi,

I would create the view in the viewdesigner and cut/paste the code generated
by the viewdesigner (right click - view sql)

HTH
Tom


"Barley Man" <BarleyMan@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:A4DB29BB-1787-4E90-83A6-2209790A74EA@xxxxxxxxxxxxxxxx
I have used the following 'create view' statment:-

Create Sql View combinedview;
AS Select inventory.inumbr, inventory.divno, inventory.deptno,
inventory.subdeptno, inventory.classno, ;
inventory.istyl;
FROM inventory ;
WHERE (?mydivno <= 0 Or divno = ?mydivno);
AND (?mydeptno <= 0 Or deptno = ?mydeptno);
AND (?mysubdeptno <= 0 Or subdeptno = ?mysubdeptno);
AND (?myclassno <= 0 Or classno = ?myclassno)

However, when I 'inspect' (modify) the created View by looking at the sql,
the 'view' created is NOT the same as the one I requtested and appears as
follows:-

SELECT Inventory.inumbr, Inventory.divno, Inventory.deptno,;
Inventory.subdeptno, Inventory.classno, Inventory.istyl;
FROM drilldown2!inventory;
WHERE ?mydivno <= 0;
OR (Inventory.divno = ?mydivno;
AND ?mydeptno <= 0);
OR (Inventory.deptno = ?mydeptno;
AND ?mysubdeptno <= 0);
OR (Inventory.subdeptno = ?mysubdeptno;
AND ?myclassno <= 0);
OR (Inventory.classno = ?myclassno)

The change is not immediately obvious to see but it IS there. The
positioning (and thus the effects) of the brackets have changed
SUBSTANTIALLY
and the routine simply fails to perform properly. I need the EXACT
functionality of the statement contained within the 'create
view'instructions
but I simply can't get it to 'transfer' into the database as a 'view'!

It does not appear to be a simple error in the 'view sql' routine as the
view BEHAVES EXACTLY in line with the version being displayed by 'view
sql'
and that's NOT what I want, nor what I requested!

What on EARTH am I supposed to do about THAT?

Ian


.



Relevant Pages

  • Re: Serious errors with Create view command
    ... subdepts, groups of subdepts make depts anmd groups of depts make Divisions ... Using VFP9 your CREATE VIEW displays like this in the View Designer View SQL ... and the routine simply fails to perform properly. ...
    (microsoft.public.fox.helpwanted)
  • Re: Programming for all fields in a table
    ... then that "main" routine would branch out to other ... Most code now runs in RESPONSE to a event. ... While a array was likely the most important data type in FORTRAN, ... tables as we got a "sql" engine to do the work for us. ...
    (comp.databases.ms-access)
  • Re: Child process does not inherit parents working library
    ... the standard SQL way is to issue an set current_schema sql statement. ... if your socket listener using spawn is written in rpg or uses rpg ... As a contribution to the group, here is a C++ routine to get the ... static int attribKeys; ...
    (comp.sys.ibm.as400.misc)
  • Re: TIP#308: Last serial column value generated
    ... Where did I say that SQL doesn't return ordered fields? ... I eliminated changing a routine used in a number of places, and simply made use of extra data, which wouldn't have worked had I not used *. ... in queries where the column is a function. ... I didn't dispute that. ...
    (comp.lang.tcl)
  • Re: Informix beats Oracle
    ... SQL and PL/SQL" ... There should a means to use "invoker"s rights which basically turns a routine into a macro. ... Anyway there are countless differences between Oracle SQL and PL/SQL in packages. ...
    (comp.databases.informix)