Article ID: 142242
Article Last Modified on 9/30/2003
Create SQL View myview as Select * from mydbc!mytableIncorrect:
Create SQL View myview as Select * from mytableThe incorrect code will work but the view created with the incorrect syntax may cause an error or unexpected results if you have multiple databases containing the same table name. It can also cause a problem with the Upsizing Wizard, which expects the correct syntax of dbc!table.
CLOSE DATABASE
CREATE DATABASE testdbc
CREATE TABLE tbl2 (source C(20) PRIMARY KEY, num n(3))
CREATE TABLE tbl1 (Link C(20) REFERENCES tbl2, num n(3))
INSERT INTO tbl2 (source,num) VALUES ("Smith",1)
INSERT INTO tbl2 (source,num) VALUES ("Jones",1)
INSERT INTO tbl1 (link,num) VALUES ("Smith",1)
INSERT INTO tbl1 (link,num) VALUES ("Smith",2)
INSERT INTO tbl1 (link,num) VALUES ("Jones",1)
INSERT INTO tbl1 (link,num) VALUES ("Jones",2)
MODIFY DATA NOWAIT
CREATE SQL VIEW 'prog view' as SELECT * FROM tbl2
?DBGetProp('designer view', 'view', 'table')
?DBGetProp('prog view', 'view', 'table')
The second command returns testdbc!<tblname>, but the third just returns
the table name.Additional query words: docerr VFoxWin 5.00
Keywords: kbdocfix KB142242