Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HAVING phrase
Message
From
11/06/2008 09:32:26
 
 
To
11/06/2008 09:03:58
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01323049
Message ID:
01323059
Views:
10
>A simple question about use of the HAVING phrase. Here's a sample SELECT statement
>
Select  Partno		;
>	, Sum (RealCost)	As RealCost		;
>	, Sum (PostedCost) 	As PostedCost	;
>	, Sum (RealCost - PostedCost)	As Variance		;
>	, Sum (1)		As Count		;
>	, Sum (NItems)	As NItems		;
>	;
>	from c_Source	                                          ;								;
>	group By 1	;	;
>	into Cursor c_Browse Readwrite
>I'd like to be able to reference the RealCost field in the result in the HAVING phrase ... HAVING RealCost # 0 ... but I get an error message because of the name conflict with the field RealCost in the source cursor.
>
>How can I refer to the RealCost field in the result cursor (in the HAVING phrase)?
>

Refer to it by position in the list, that is, field #, not name.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform