Show Bid Request
SQL Statement
Bid Request Id: 46546
|
|
|
Posted by: |
Rick Hook (1 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Bad - 66.67%
|
Posted: |
Feb 3, 2003 9:19:59 AM EDT
|
Bidding Closes: |
Feb 5, 2003 9:28:09 AM EDT
|
Viewed (by coders): |
361 times
|
Deadline: |
2/6/2003
TIME EXPIRED
|
|
|
|
Description:
Hi,
I need a statement to work with two tables Fig(1) to achieve the Fig(2) results
Fig(1)
Table A Data Table B Data
7 5 3 C 8 2 9 D A 1 5 2 C B 1 4 D 6
What I am wanting to do is have a SQL statement That will create a recordset having all of the records from Table A and showing the records from Table B at the top of the resultset
Fig(2) Desired Result
5 - These were the results from Table B C - These were the results from Table B 2 - These were the results from Table B D - These were the results from Table B 1 - These were the results from Table B 7 3 8 9 A B 4 6
Deliverables: 1) Just need the SQL Statement
Platform:
SQL Server 2000, WIN 2000
Must be 100% finished and received by buyer on:
Feb 6, 2003 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$10 (USD)
|
Feb 3, 2003 10:53:46 AM EDT
|
10
(Excellent)
|
|
|
Hi,
In order to get this work properly, it is best to create a stored procedure and make use of temp tables. This will prevent sorting issues when trying to do this with a UNION statement.
The attached ZIP file has a SQL script for creating this stored procedure. I also included a screenshot of SQL Query Analyzer where I tested the stored procedure and got the desired result you wanted.
Thanks and hope this helps. Andres |
|
Attached File
|
|
|
|
|