Hi, Pete,

Have you seen The Create Cross Tab SQL (CRTCTSQL) utility presented here : http://www.itjungle.com/mpo/mpo032703-story01.html

-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Pete Helgren
Envoyé : vendredi 30 janvier 2009 00:12
À : Midrange Systems Technical Discussion
Objet : SQL Column ranges into rows

Wresting with some database conversion issues. Actually, I don't want to the database to change, I want my application that accesses these different databases to change as little as possible so building views to present the data in a similar fashion is what I am after.

I have a table that could either be in this format:

code, date
with data that looks like this:

'test', 20080115
'test', 20080116
'test', 20080117
'test', 20080118

OR I could have a table that looked like this:

code, begin date, end date
'test', 20080115, 20080118

What I would like do is have a view that structures the second table like the first. If the two dates are the same, you get one row with code and date. If you have a range of dates that span 6 days (for example), then there would be 6 rows generated by the view.

Is this possible?

Thanks

Pete

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.