Well, I can not say, it was my method :) I picked this idea earlier from this forum and used in couple of situations like this.
Thanks.
>Nadya,
>
>Thanks a lot for the fast answer. I knew there had to be cute trick to solve this, and your method is slick. It also solves a bunch of other related issues that I was clumsily working around.
>
>>>Hi folks,
>>>
>>>I often use the construct:
>>>
>>> SELECT *, 000 as extrafield from . . .
>>>
>>>to build a table with extra columns which get filled in later by program logic.
>>>
>>>Problem is, the 'extrafield' cannot hold .NULL.
>>>
>>>Is there a SQL trick to allowing extrafield to hold NULL (while keeping its N3,0 property), or do I have to suffer an ALTER TABLE after the SELECT ?
>>>
>>>Thanks for any ideas on this,
>>
>>select 0
>>Create cursor dummy (MyField1 C (10) Null, myField2 ...)
>>append blank
>>
>>select tabe1.*, dummy.* from table1, dummy ...
If it's not broken, fix it until it is.
My Blog