>>>>Basically what I am saying here is:
>>>>1) Certain data types (integer, any type field with null) are impossible to create directly in a select statement.
>>>>2)But you can create a cursor on the fly that contains a field of the right type. Do a join onto this cursor and you get get fields of the type you could otherwise select.
>>>
>>>Very cool tip I will definetly remeber this one. Thanks.
>>
>>So, what would work faster:
>>1) select space(1) as ModiType, ctot('') as PostDate, ctot('') as ModiDate, 0 as Error, .f. as posted, * from PropMstr inner join SiteMstr on ...
>>
>>or
>>2) Create cursor curPostedStru with all necessary additional fields
>> select * from PropMstr inner Join SiteMstr on.. inner join curPostedStru on 1=1
>>
>>?????
>If you can live with not absolutely controlling output type 1 would be faster. But if you had to have an integer datatype, the inner join would be faster than creating it as numeric and then using alter table to turn it into integer.
Ok, this is exactly the answer, I hoped for :) Yes, I can live with numeric just fine, so I choosed the first approach.
If it's not broken, fix it until it is.
My Blog