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:
[ot] ShowIf & HideIf Question (1998)
RE: Error: template (1997)
Re[2]: Decrypting a user password (2000)
Realtime shipping suggestions (2007)
Reversed words (1997)
Locking up with WebCatalog... (1997)
Clickable maps and WebCatalog? (1996)
No luck with taxes (1997)
Search multiple fields (1997)
Grep search not working (2002)
[table] strange behaviour REAL solution (2003)
5.0 Pricing (2003)
off-topic - printinglib 68K (1997)
Templates on Unix & CGI on Mac? (1997)
WebTen and WebCat (1997)
[NT] ie 4.0 required (1997)
Webten + Webcat running smooth (1998)
Bug Report, maybe (1997)
Highlighting words found in a keyword search (2003)
Sale on wholesale programming services ... (2006)