Features, features...

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Jun 19 20:11:43 CDT 2003


on 6/19/03 18:06, Chris Aernoudt at chris at pixellink.be wrote:

> Guess I'm not....
> Damn, I need more complex SQL....
> 
> Does this querying as described on page 41 of the VSQL ref only work on
> fields of type objectPtr?
> Is a query with this functionality possible in VSQL?
> 
> SELECT * FROM sometable INNER JOIN othertable ON othertable.ID =
> CAST(substr(sometable.somefield, 2, 2) AS NUMERIC)
> 
> Or do I have to nest SELECT's?

Hi Chris,

Valentina cn do JOIN on RDB link also, not ObjectPtr only,
But you need use syntax

SELECT *
FROM sometable, othertable
WHERE othertable.ID = CAST(substr(sometable.somefield, 2, 2) AS NUMERIC)


Next, since CAST is not implemented in 1.x you need to use BaseObject
method.

Create virtual field of type ULONG (this is the same as CAST) with formula:
    substr(sometable.somefield, 2, 2
    

Now you can do query as

SELECT *
FROM sometable, othertable
WHERE othertable.ID = ThatField


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list