Re: Null in string concatenation
Posted in 1998
Jacques P Renaut wrote: > Jamie Hatfield wrote: > > > A question pertaining to this: > > > > Why can I use NVL(...) and the FIRST # syntax in ISQL, but in my 4gl > > code, the only way I can use them is to prepare them? I think the FIRST > > # would be a great way to just get the first row that my query returns > > without having to OPEN, FETCH, and CLOSE a cursor, but it kinda defeats > > my purpose when I have to prepare the statement instead of just using it > > inline. > > > > Are you sure you are using them in ISQL and not DBACCESS? Dbaccessships > with the engine and is built with the current verions of esql that is used > to also build the engine. So it is aware of new syntax, where as ISQL and > 4GL tend to not be built with the newest version of esql and so they are > not aware of the new syntax. So basically, yes, the front end toos > occassionally > have different parsers then the engine, that is why it works when you > prepare > it, so the front end parser doesn't look at it. Yes, some of the "newer" syntax is "supported" by I-SQL. For example, I found that "DROP PROCEDURE" works in I-SQL, even though "CREATE PROCEDURE" doesn't. As near as I can make out, this is because I-SQL simply sends a single statement (terminated by ';') to the engine without parsing it. If it sends "DROP PROCEDURE foobar;" to the engine, the engine handles that without a problem. If it sends "CREATE PROCEDURE foobar (i int) RETURNING int;" the engine returns an error. I haven't tested it, but I wouldn't be surprised to find that NVL and FIRST x are "supported" in this same way. Officially, neither of them is supported (unless this has been added to 7.20 I-SQL, but I don't think so), but they may both work. June -- june_t@hotmail.com Grounded in Palo Alto, living on M&M's (plain)