Find Jobs
Hire Freelancers

ASP.NET / VB / MS SQL: Fix Complex SQL Queries

$30-70 USD

Completed
Posted almost 12 years ago

$30-70 USD

Paid on delivery
I have a website that is powered by ASP.NET / Visual Basic and Microsoft SQL. There are two problems that need solving. Both problems involve complicated SQL queries. This is URGENT and must be completed today. ### TASK 1 ### Results are not grouped correctly. For example, a building may have 20 "One Bedroom" units and 10 "Two Bedroom" units. There are 30 total units but only 2 types. Only the two types should be displayed on my webpage like this: --------------------------------------------- Unit Type: One Bedroom Rent: $100 - $200 Size: 500 Square Feet up to 900 Square Feet Availability: Yes --------------------------------------------- Unit Type: Two Bedroom Rent: $200 - $300 Size: 700 Square Feet up to 950 Square Feet Availability: No --------------------------------------------- However because the SQL query is not grouped correctly, I get 30 results instead of 2. ### TASK 2 ### There are two queries and neither of them are correct. The first one is for the "COMMERCIAL PROPERTY DEVELOPMENTS" section: Dim sql As String = "select distinct [login to view URL], Name, Description, Address from ipm_project p join ipm_project_field_value fp on [login to view URL] = [login to view URL] and fp.Item_value = '1' join ipm_project_discipline d on [login to view URL] = [login to view URL] and [login to view URL] = (Select KeyID from ipm_discipline where KeyName = 'Commercial Projects' ) Where [login to view URL] = 'y'" The second one is for the "RESIDENTIAL PROPERTY DEVELOPMENTS" section. Dim sql2 As String = "select [login to view URL], Name, Description from ipm_project p join ipm_project_field_value pl on [login to view URL] = [login to view URL] and pl.Item_ID = (select Item_ID from ipm_project_field_desc where Item_Tag = 'tag_PROPLOCATION') and pl.Item_Value like '%Property Development Page%' Where Available = 'Y' Order By newid() " --------------- The problem with the first query is that it shows all available 'Commercial Projects' however it should ONLY show available 'Commercial Projects' if the "Item_Tag" named "tag_PROPLOCATION" is like '%Property Development Page%' The problem with the second query is that it shows all available projects where the "Item_Tag" named "tag_PROPLOCATION" is like '%Property Development Page%' however it should only show them if they are 'Residential For Rent' --------------------------------------- I will provide screenshots and links upon requests. I will answer any quesitons about the requirments that you may have.
Project ID: 2373906

About the project

4 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I can do this for you in max 2hrs, and I can start now.
$70 USD in 0 day
5.0 (20 reviews)
5.3
5.3
4 freelancers are bidding on average $78 USD for this job
User Avatar
I can do this. Thanks
$150 USD in 1 day
5.0 (20 reviews)
6.6
6.6
User Avatar
please check your pm.
$40 USD in 0 day
4.9 (28 reviews)
5.2
5.2
User Avatar
please check pmb
$50 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of CANADA
Pictou, Canada
5.0
59
Member since Nov 3, 2008

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.