Assistance needed on query

Ruslan Zasukhin sunshine at public.kherson.ua
Mon May 14 12:24:20 CDT 2007


On 14/5/07 4:02 PM, "Sims, John (CDC/CCHP/NCBDDD) (CTR)" <ayu8 at CDC.GOV>
wrote:

Hi John,

>> Can be
>> 
>>     SELECT f1
>>     SELECT f1 as 'alias'
>>     SELECT expr as 'alias'
>> 
>> But you have
>> 
>>     select '' as 'alias'
>> 
>> What means EMPTY single quotes?
>> 
>> 
>> --
>> Best regards,
>> 
>> Ruslan Zasukhin
>> VP Engineering and New Technology
>> Paradigma Software, Inc
>> 
> 
> Hi Ruslan,
> 
> I've seen this trick before.  For many databases, this gives you a
> column of "blanks", or other "default" values.  We used to use this
> trick for binding the datatable (cursor) to a datagrid when we wanted to
> include columns that had nothing to do with the database.
> 
> For example:
> 
> Select FirstName, LastName, Address, City, State, Zip, TRUE as
> 'PrintNow' FROM Addresses
> 
> Now, when you get the datatable, you bind it to the grid and have a
> "PrintNow" column with each line set to TRUE by default.  We would never
> store the "PrintNow" data in the database and this way you didn't have
> to modify the datatable after the results were returned from the
> database just to add the "PrintNow" column.  Having the "PrintNow"
> column in the datatable made it easier to pass this information to
> related processes.
> 
> I hope I made sense.

But you describe in fact this case:
>>     SELECT expr as 'alias'

NOT 
>>     select '' as 'alias'

First case works in Valentina also I believe.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list