[thelist] SQL Chaos!!

Martyn Haigh martyn.haigh at virgincosmetics.com
Wed Jan 29 02:55:01 CST 2003


I think DateValue is an ASP function - I'm looking for the data to be sorted
in the database, and return the data to display.

OK - I've used a collaboration of the answers I have received so far and
come up with this :

SELECT
  Sum(FieldA),
  Sum(FieldB),
  Sub(FieldC),
 (RIGHT('0' + cast(DatePart(dd,DateCreated) as varchar), 2) +'-'+ RIGHT('0'
+ cast(DatePart(mm,DateCreated) as varchar), 2) +'-'+
cast(DatePart(yyyy,DateCreated) as varchar)) as GroupDate
FROM InterestedForm, GeneralForm
INNER JOIN GeneralForm ON InterestedForm.ID = GeneralForm.ID
GROUP BY GroupDate

But I'm experiencing the error of "tables / functions generalForm and
generalForm have the same exposed name"

Can anyone shed any light on this one?

Thank you!

Martyn Haigh

Site Developer





DISCLAIMER: The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this email by
anyone else is unauthorised. If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to be taken
in reliance on it, is prohibited and may be unlawful.





More information about the thelist mailing list