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:

emailer and bad addresses (1997) WebCat2 - Getting to the browser's username/password data (1997) urls (2005) Problem with shownext (2003) FW: WebCat Contest (1998) Country & Ship-to address & other fields ? (1997) Great product and great job ! (1997) SSL and Webstar 3 with Webcatalog (1998) Max Record length restated as maybe bug (1997) TCPconnect issue (2000) [WebDNA] WebDNA version 7 feature list? (2011) NT b19 sends extra MIME headers (1997) WebDNA 6 and OS X Tiger (2005) New NT betas available (1997) Word Breaks (1998) creating a ShipCosts database (1997) Paths (2000) Showif, Hideif reverse logic ? (1997) Silly Question (2003) Multi Actions (1999)