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 WHERE LastName = '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 PM Subject: [SQL] - COUNT, SUM retrieval > WebCat 4.0 > Windows 2000 > > I am unable to find any information on how to retrieve non-field information > (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:

    
  1. Re: [SQL] - COUNT, SUM retrieval (Matt 2000)
  2. Re: [SQL] - COUNT, SUM retrieval (Anup Setty 2000)
  3. [SQL] - COUNT, SUM retrieval (Matt 2000)
try this,[sql dsn=internal&statement=SELECT COUNT(*) as cnt FROM employees WHERE LastName = '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 PM Subject: [SQL] - COUNT, SUM retrieval > WebCat 4.0 > Windows 2000 > > I am unable to find any information on how to retrieve non-field information > (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:

[WebDNA] First-timer feedback (2014) [WebDNA] Reformatting database headers (2009) Re:Help name our technology! (1997) URL too Long? (1997) [WebDNA] Aussie freelancers (2012) WCS Newbie question (1997) Re:Problem (1997) Associative lookup style? + bit more (1997) RE: File Uploads (1998) [WebDNA] Graphite Forum (2009) RE: [WebDNA] Talklist Archive & Twitter (2009) (2002) Help name our technology! I found it (1997) Calculating multiple shipping... (1997) Emailer prefs in two places ... (1997) Nesting format tags (1997) strange [date] behavior (2001) Webcat not processed for CACHEd image error pages (1998) Web Logs (1998) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)