Re: [SQL] - COUNT, SUM retrieval
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 33342
interpreted = N
texte = try this,[sql dsn=internal&statement=SELECT COUNT(*) as cnt FROM employees WHERELastName = 'Jones'][/sql]your [cnt] variable should give the value returned by count(*)anup----- Original Message -----From: Matt
To: WebCatalog Talk Sent: Friday, June 16, 2000 5:52 PMSubject: [SQL] - COUNT, SUM retrieval> WebCat 4.0> Windows 2000>> I am unable to find any information on how to retrieve non-fieldinformation> (COUNT, SUM, etc) from a SQL query in WebCat using the [SQL] context.> According to the docs, any legal SQL statement can be used. Therefore, I> would assume that this would work:>> [sql dsn=internal&statement=SELECT COUNT(*) FROM employees WHERE LastName=> 'Jones'][/sql]>> As is, this WebDNA code returns nothing, but the same SQL statement in an> .asp page works correctly, so I know that this particular SQL command is> compatible with the database (Access 97). If I use>> [sql dsn=internal&statement=SELECT COUNT(*) FROM employees WHERE LastName=> 'Jones'][numfound] [/sql]>> WebCat returns 1, although there are 11 records matching this query.>> How can I use SQL commands like COUNT in the WebCat [sql] context?>> Thanks in advance,> Matt>>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> Web Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
try this,[sql dsn=internal&statement=SELECT COUNT(*) as cnt FROM employees WHERELastName = 'Jones'][/sql]your [cnt] variable should give the value returned by count(*)anup----- Original Message -----From: Matt To: WebCatalog Talk Sent: Friday, June 16, 2000 5:52 PMSubject: [SQL] - COUNT, SUM retrieval> WebCat 4.0> Windows 2000>> I am unable to find any information on how to retrieve non-fieldinformation> (COUNT, SUM, etc) from a SQL query in WebCat using the [SQL] context.> According to the docs, any legal SQL statement can be used. Therefore, I> would assume that this would work:>> [sql dsn=internal&statement=SELECT COUNT(*) FROM employees WHERE LastName=> 'Jones'][/sql]>> As is, this WebDNA code returns nothing, but the same SQL statement in an> .asp page works correctly, so I know that this particular SQL command is> compatible with the database (Access 97). If I use>> [sql dsn=internal&statement=SELECT COUNT(*) FROM employees WHERE LastName=> 'Jones'][numfound] [/sql]>> WebCat returns 1, although there are 11 records matching this query.>> How can I use SQL commands like COUNT in the WebCat [SQL] context?>> Thanks in advance,> Matt>>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> Web Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Anup Setty
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
frames & carts (1997)
Too many webcat comments. [WAS- Large founditems loops] (2000)
flushing databases (2003)
Public beta 5 of WebCatalog 4.0 is now available (2000)
Generating unique SKU from [cart] - FIXED! (1997)
default value from Lookup (was Grant, please help me) (1997)
RE: Languages (1997)
HELP WITH DATES (1997)
Cancel Subscription (1996)
.html to .tpl (1998)
New Plug-in and Type 11 errors (1997)
[subtotal] and others (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
no global [username] or [password] displayed ... (1997)
Field Problem (2000)
Encyption mail was Suggestions for Topics ... (1998)
[WebDNA] Why doesn't this returnraw redirect to the new page? (2009)
Adding headers to email (1997)
[WebDNA] WebDNA vs. php war ;-) (2010)
Only charge card when product shipped ? (1997)