I am using the Query of Query method and I am getting a error message when I
get to my query that uses SUBSTRING ( expression , start , length ) in the
Select Statement. I know that Query of Query makes you write your Statements
out a little differntly then when you are just querying your live database and
not caching it like I am doing. This query runs perfect when I am not trying
the Query of Query Method. My code is below. Can someone please give me some
suggestions. Am I missing a bracket or something? Thanks...
...

Query Of Query Substring Issue

I am using the Query of Query method and I am getting a error message when I
get to my query that uses SUBSTRING ( expression , start , length ) in the
Select Statement. I know that Query of Query makes you write your Statements
out a little differntly then when you are just querying your live database and
not caching it like I am doing. This query runs perfect when I am not trying
the Query of Query Method. My code is below. Can someone please give me some
suggestions. Am I missing a bracket or something? Thanks...

Re: Query Of Query Substring Issue

You could always select the entire field, and use the mid function on it
afterwards.

Or you could include the substring in your original query, give it an alias
(appears to be x in your example) and select the alias in your Q of Q.

Originally posted by: Gdev
I am using the Query of Query method and I am getting a error message when I
get to my query that uses SUBSTRING ( expression , start , length ) in the
Select Statement. I know that Query of Query makes you write your Statements
out a little differently then when you are just querying your live database and
not querying the cached results like I am doing. This query runs perfect when I
am not trying the Query of Query Method. My code is below. Can someone please
give me some suggestions. Am I missing a bracket or something? Thanks...

Re: Query Of Query Substring Issue

Thanks for the quick reply. What I was really trying to find out is why this
query runs perfectly when I am not using this Query of Query Method. I have
searched all of the internet and I have found some information that when you
use certain SQL Statements in Query of Query you have to do a little extra to
get it to work meaning add some special code , brackets, etc... It would be
great if I knew what this Query of Query wanted in my SQL Statement so I will
not get this error.

Here is a PDF that has some information on Query of Query. I have read through
it and tried some of there examples but have had no luck.

Re: Query Of Query Substring Issue

They all have a lot of things in common but oracle is slightly different than
ms sql which is slightly different than sybase, which is slight different than
db2, which is slightly different than redbrick which is slightly different than
mysql,..., which is slightly different than Q of Q. If ya wanna use it, ya
gotta learn it.

Originally posted by: Gdev
Thanks for the quick reply. What I was really trying to find out is why this
query runs perfectly when I am not using this Query of Query Method. I have
searched all of the internet and I have found some information that when you
use certain SQL Statements in Query of Query you have to do a little extra to
get it to work meaning add some special code , brackets, etc... It would be
great if I knew what this Query of Query wanted in my SQL Statement so I will
not get this error.

Here is a PDF that has some information on Query of Query. I have read through
it and tried some of there examples but have had no luck.

Re: Query Of Query Substring Issue

Gdev,

As you said, Query of Query is a CF construct that allows you to re-query
results in memory. It has only a limited set of functions, much more limited
than if you were querying a regular database. I don't know about MX 7, but I
don't think that QoQ's in MX6 have a substring type function. I'm not 100%
positive though.