Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECTing null constants
Message
 
 
To
07/03/2002 04:17:54
Alan Law
Apocalypse Enterprises Inc.
Victoria, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00629338
Message ID:
00629584
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform