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:

What does this error mean? (2000) Non-Cart Files in Shopping Cart Folder (1997) Running a store on BOTH http and https (1998) WCS Newbie question (1997) Sorting error (1997) Sequential Code Logic (2003) Generating unique SKU from [cart] - Still Stumped... (1997) How can I record purchases to a database? (1998) RE: WebCatalog NT beta 18 now available (1997) WebCat2: Master Counter snippet (1997) WebCat2 several catalogs? (1997) Partner Edition question ... (2003) variables in template (2000) Plugin or CGI or both (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Banners and sort of random display (1997) problems with 2 tags (1997) OT: Please set your computer's clock (1997) [WebDNA] encrypt files/directories (2011) 2.0Beta Command Ref (can't find this instruction) (1997)