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:

Electronic Delivery (1997) [Announce]: Web server security and password protection (1997) addlineitems (2003) New Server? (2006) [thisURL] (was pre-parse hell) (2008) [WebDNA] PayPal Instant Payment Notification Guide (2009) quantity minimum problem (1997) Updating Prices in DB (working) (1999) Is this possible, WebCat2.0 and checkboxes (1997) Strange intermittent WebDNA problems (2008) Searching multiple fields from one form field (1997) Nested tags count question (1997) problems with WebCat-Plugin (1997) Bug Report, maybe (1997) [OT] Imagemagick (2004) Multi-processor Mac info ... (1997) pulldown menu differences (2005) Calculate UnitShipCost in Formulas.db (1999) ShowIf variables (1997) primer/tutorial question (2004)