|
-
Apr 22nd, 2002, 12:05 PM
#3
Thread Starter
Frenzied Member
I always forget aliasing in SQL statements. I actually like that solution, though. A slap in the face to VBScript.
Though, I'm having problems.
Code:
strSQL = "SELECT Node, COUNT(Node) as NodeCount FROM Node"
'or
strSQL = "SELECT COUNT(Node) as NodeCount, Node FROM Node"
Both give me an error.
[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that does not include the specified expression 'Node' as part of an aggregate function.
If I drop "Node" and just ask for "COUNT(Node) as NodeCount" it works, though I just get the count and not the data.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|