Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT problems with external values
Message
 
 
To
06/10/2003 09:31:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00835334
Message ID:
00835342
Views:
9
Fabio,

You'll get desired result if you include Dummy cursor in your select to create a cross join.
CLEAR
CREATE CURSOR MyTable ( A I )
APPEND BLANK
CREATE CURSOR Dummy ( MyInt I NULL, MyChar73 C(73) NULL,MyCurrency Y NULL, MyMemo M NULL)
APPEND BLANK
SELECT	Dummy.MyInt 		MyInt		;	&& <--- INTEGER 
,	Dummy.MyChar73  	MyChar73	;
,	Dummy.MyCurrency 	MyCurrency	;
,	Dummy.MyMemo		MyMemo 		;	
FROM MyTable, Dummy  INTO CURSOR MyCursor1 READWRITE
DISPLAY STRUCTURE
>Hi,
>
>i have found some problems when i can to build free fields at SELECT runtime.
>
>THIS IS SIMPLE CODE ONLY FOR REPRO THE PROBLEM.
>
>CREATE CURSOR MyTable ( A I )
>
>APPEND BLANK
>
>* POINT 1 : INTEGER not supported
>CREATE CURSOR Dummy ( MyInt I NULL, MyChar73 C(73) NULL,MyCurrency Y NULL, MyMemo M NULL)
>
>SELECT	Dummy.MyInt 		MyInt		;	&& <--- INTEGER GO TO N(11)
>,	Dummy.MyChar73  	MyChar73	;
>,	Dummy.MyCurrency 	MyCurrency	;
>,	Dummy.MyMemo		MyMemo 		;	
>FROM MyTable INTO CURSOR MyCursor1 READWRITE
>DISPLAY STRUCTURE
>
>* For build a INTEGER Field i need put Dummy Cursor on Query:
>* - slow performance
>* - reduce to 8 number of data tables
>
>* Point 2 : SELECT not read NULL support on external values
>SET NULL ON   && on help SET NULL not influence the SELECT behaviour, it would have to make it
>INSERT INTO Dummy ( MyInt) VALUES (NULL)
>
>* next report a error, Ignore and continue
>SELECT	Dummy.MyInt 		MyInt		;
>,	Dummy.MyChar73  	MyChar73	;
>,	Dummy.MyCurrency 	MyCurrency	;
>,	Dummy.MyMemo		MyMemo 		;	
>FROM MyTable INTO CURSOR MyCursor2 READWRITE
>
>*
>SELECT	Dummy.MyInt 		MyInt		;
>,	Dummy.MyChar73  	MyChar73	;
>,	Dummy.MyCurrency 	MyCurrency	;
>,	Dummy.MyMemo		MyMemo 		;	
>FROM MyTable,Dummy INTO CURSOR MyCursor3 READWRITE
>DISPLAY STRUCTURE
>
>* Then, also for NULL is need to put external values in SELECT
>
>
>Fabio
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform