Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Need help with a query

  1. #1
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default Need help with a query

    I need to update a bunch of shipping phone numbers. Basically I have a lot of shipping phone numbers that came into my system via WSI as blank. My old system didnt require shipping phone but ASPDNSF does and I have had a lot of customers confused by it. To get around this short term I updated all blank phone numbers to 999-999-9999

    Id like a query that I could run that would update all shipping phones with 999-999-9999 set to that of the associated billing phone number.

    something like

    update address set phone = (select phone from address where ????) where phone = '999-999-9999'

    Obviously what I wrote wont work but it gives the gist.

    Any ideas?

  2. #2
    Amazing is offline Senior Member
    Join Date
    Nov 2008
    Posts
    103

    Default

    I've always liked this site if you need some basic syntax.
    http://www.tizag.com/sqlTutorial/sqlexpressions.php

    It wasn't clear to me exactly what you want... but the system stores all the addresses as seperate entrie, only after an order is placed are they copied into the order information as billing or shipping. In the Customer table the BillingAddressID and ShippingAddressID link back to the Addresse table.

    So to clarify, I think you are trying to lookup which Address ID is listed in a customers BillingAddressID and assign the same ID to ShippingAddressID ?

  3. #3
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Hi amazing,

    We imported all our customers from our old system to the ASPDNSF using WSI. When they imported there is no shipping address phone number (wasnt required on my old system). Now customers are trying to checkout and getting hung up due to this required field.

    I would like a query that would find each customers two records (biling and shipping) and copy the billing phone number to the shipping phone number IF the shipping phone number = 999-999-9999.

    The 999-999-9999 was a way I could get a number in the shipping phone number so customers could check out easily.

    Thanks