Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not UNION compatible
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Not UNION compatible
Miscellaneous
Thread ID:
00625709
Message ID:
00625709
Views:
41
Can anyone see why the following to cursors would NOT be union compatible?
Select invoice.pk_id, ;
	invoice.dinvDate As invDate, ;
	invoice.cCompanyName, ;
	invoice.cInvNum, ;
	invoice.cprojectnum, ;
	invoice.cprojectName, ;
	invoice.cJobNum, ;
	invoice.cJobName, ;
	{} As pmtDate, ;
	00000000.0000 As pmtAmount, ;
	Space(50) As cRef, ;
	"I" As rowType ;
	from invoice ;
	where invoice.pk_id In ;
	(Select pk_id From rsOutInv) ;
	order By invoice.cInvNum ;
	into Cursor rsJustInvs

Select Payment.fk_invoice_id, ;
	{} As invDate, ;
	Space(0) As cCompanyName, ;
	Space(0) As cInvNum, ;
	Space(0) As cprojectnum, ;
	Space(0) As cprojectName, ;
	Space(0) As cJobNum, ;
	Space(0) As cJobName, ;
	payment.dDate As pmtDate, ;
	payment.yAmount + yTax As pmtAmount, ;
	payment.cRef, ;
	"P" As rowType ;
	from Payment ;
	where Payment.fk_invoice_id In ;
	(Select pk_id From rsOutInv) ;
	order By Payment.fk_invoice_id ;
	into Cursor rsJustPayments
And the union:
Select * From rsJustInvs ;
	union ;
	select * From rsJustPayments ;
	into Cursor rsPrint
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Next
Reply
Map
View

Click here to load this message in the networking platform