[thelist] SQL Chaos!!

Martyn Haigh martyn.haigh at virgincosmetics.com
Wed Jan 29 03:15:01 CST 2003


How would I go about creating the view.  I've got it so it returns the ID
and then I'm a little stuck on how to return the formatted date, I can
return the date parts (dd, mm, yyyy) but can seem to tie them all together!

Also - how would I then reference the view instead of the table.

I'm really sorry if these questions are stupid - this is my first time using
views - I'm quite a novice at SQL.  So if I'm asking about the basics I
won't mind if you point me to a page so I can go and read up on it instead
of using your time up!

Thank you

Martyn Haigh

Site Developer
The Virgin Cosmetics Company
City Fields, Chichester, West Sussex PO20 2FP
tel: 01243 622282

-----Original Message-----
From: Joshua Olson [mailto:joshua at waetech.com]
Sent: 28 January 2003 17:07
To: thelist at lists.evolt.org
Subject: Re: [thelist] SQL Chaos!!

----- Original Message -----
From: "Martyn Haigh" <martyn.haigh at virgincosmetics.com>
Sent: Tuesday, January 28, 2003 11:35 AM

> Joshua,
> This is looking good - you are right in thinking that my DateCreated has a
> date and time portion.  I was thinking that I could somehow group by
> dateCreated using dateFormat and just separating the contents that way.
> Does this sound plausible?

Yes, that is indeed one approach to the issue.  Depending on your database,
there may be slightly different rules governing exactly how this can be done
in practice.

One thing that you may consider doing is creating a view on the table with
the DateCreated view that only returns the formatted date portion and the ID
field.  Then, use the view in the join instead of [table2].  That may help
simplify the query.


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !

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