General information
Title:
SQL statement too long - revisited
Can anyone tell me why the following SQL statement is too long. The statement is being generated by the View Designer:
SELECT DISTINCT Buildings.name, Buildings.address,;
Buildings.postalcode, Buildings.built, Buildings.floors,;
Buildings.location, Buildings.class, Buildings.type, Buildings.totsqfeet,;
Buildings.totavail, Buildings.larconspac, Buildings.rental1,;
Buildings.rental2, Buildings.consttype, Buildings.comments,;
Buildings.city, Buildings.state, Buildings.lpmcoid, Buildings.buildcoid,;
Buildings.loaddoors, Buildings.railserv, Buildings.sprinkler,;
Buildings.clearhgt, Buildings.janitorial, Buildings.utilities,;
Buildings.webaddress;
FROM cpi!agents INNER JOIN cpi!buildings ;
ON Agents.contactid = Buildings.lpmcoid;
WHERE UPPER(Buildings.name) LIKE UPPER(?bname);
AND UPPER(Buildings.address) LIKE UPPER(?baddress);
AND UPPER(Buildings.city) LIKE UPPER(?bcity);
AND UPPER(Buildings.state) LIKE UPPER(?bstate);
AND UPPER(Buildings.postalcode) LIKE UPPER(?bpostalcode);
AND UPPER(Buildings.built) LIKE UPPER(?bbuilt);
AND UPPER(Buildings.lpmcoid) LIKE UPPER(?blpmcoid);
AND Buildings.floors = ?bfloors;
AND UPPER(Buildings.location) LIKE UPPER(?blocation);
AND UPPER(Buildings.class) LIKE UPPER(?bclass);
AND UPPER(Buildings.type) LIKE UPPER(?btype);
AND Buildings.totsqfeet = ?btotsqfeet;
AND Buildings.totavail = ?btotavail;
AND Buildings.larconspac = ?blarconspac;
AND UPPER(Buildings.rental1) LIKE UPPER(?brental1);
AND UPPER(Buildings.rental2) LIKE UPPER(?brental2);
AND UPPER(Buildings.consttype) LIKE UPPER(?bconsttype);
AND UPPER(Buildings.comments) LIKE UPPER(?bcomments);
AND UPPER(Buildings.buildcoid) LIKE UPPER(?bbuildcoid);
AND UPPER(Buildings.loaddoors) LIKE UPPER(?bloaddoors);
AND Buildings.railserv = ?brailserv;
AND Buildings.sprinkler = ?bsprinkler;
AND UPPER(Buildings.clearhgt) LIKE UPPER(?bclearhgt);
AND Buildings.janitorial = ?bjanitorial;
AND Buildings.utilities = ?butilities;
ORDER BY Buildings.name
Thanks.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only