» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2006, 01:34 PM
richardson richardson is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
richardson is on a distinguished road
Default Question about combining two DB records into one ASP Table

Guys,

Not sure if this is a SQL specific question or an ASP question so please move this if it is in the wrong place.

Here is the problem I am presented with. The client has two tables, one for payments and one for receipts that are identical. They need me to pull the data from both tables and build a ledger so that the data is sorted by date descending.

It will be displayed in the following format:

Date - Detail Payment Receipt Balance

Depending on whether the value is positive or negative, it goes in the appropriate column. Can I combine the call from the two tables into one SQL call or do I need to read the two tables into two arrays and sort the arrays?

To make matters worse, the "dates" are stored as 8 digit 20030506 in the database and are stored in STRING form. Can I write a SQL Query that uses substrings to put the date in the correct order and do a sort on these dates?
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
retrieving deleted records! sureshot MySQL Forums 1 02-20-2007 06:45 AM
unable to add posts to a phpbb table after moving servers. tanny MySQL Forums 3 02-13-2007 02:44 PM
Question about combining two DB records into one ASP Table richardson ASP forums and Tips 1 08-29-2006 01:35 PM
records in table sniffer ASP forums and Tips 1 08-22-2006 02:20 PM
specify the limit of records that can be entered in the table rement MySQL Forums 1 08-11-2006 02:03 PM


All times are GMT. The time now is 09:10 PM.