🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #278

Re: Obtaining Age

#278
From: Gerald Lightsey
Date: Mon, 21 Dec 1998 00:00
25 lines
1666 bytes
In article <368292e6.6580270@forums.inprise.com>, 
skoterski@NOSPAMinprise.com says...
> In SQL, the function SUBSTRING is provided to retrieve part of a string
> (CHAR) value. However, SUBSTRING works only on string type values and your
> calculation results in a numeric type value. So you would need to take the
> extra step of converting the numeric value to string using the CAST
> function.
> 
Steve,

I am using Visual dBASE 5.6 and it doesn't seem to accept the CAST 
function like version 7.0 does.  On the other hand, 5.6 seems to be 
comfortable in returning the first character from a _NUMERIC_ value with 
the SUBSTRING function which version 7.0 will not...go figure!

Furthermore, I have run into the situation where an involved 
age calculation will return correct values when run by itself, but when 
combined with the rest of the SQL SELECT statement that I need that also 
runs OK by itself or OK with _CERTAIN_ calculations to produce an age 
value; the combination returns zero records.  I have not been able to get 
around this obstacle to get exactly what I want.

Thanks for your input.  I was hoping to hear from you.

Gerald
Technical Details
Message-ID: <MPG.10e87d7d79f4d79c9897db@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <MPG.10e4a81d2baa73d39897d4@forums.borland.com> <368292e6.6580270@forums.inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,13e5acd5c576586a
X-Google-Attributes: gidff5a1,public
From: glightsey@cari.net (Gerald Lightsey)
Subject: Re: Obtaining Age
Date: 1998/12/21
Message-ID: <MPG.10e87d7d79f4d79c9897db@forums.borland.com>
X-Deja-AN: 424662772
References: <MPG.10e4a81d2baa73d39897d4@forums.borland.com> <368292e6.6580270@forums.inprise.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.vdbase.data.sql