Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

SQL Query - Need advise

  • 01-03-2007 11:29AM
    #1
    Registered Users, Registered Users 2 Posts: 224 ✭✭


    Hi All,

    Im a novice to SQL. So any help will be appreciate.

    I have a table (tblQuotes) which contains a couple of columns. The ones Im trying to query are
    • QuoteID
    • ItemDescription
    • Supplier
    • SupplierCode

    Except for ItemDescription the rest of the fields are in dropdowns. The form fields are called
    • ddQuoteID
    • txtItemDesc
    • ddSupplier
    • ddSupplierCode

    I need to be able to create a query that will allow for every variation possible of selection.

    Any help guys:confused:


Comments

  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    What do you mean by "I need to be able to create a query that will allow for every variation possible of selection. "?

    Is it just that you want to put the QuoteID, Supplier and SupplierCode into select boxes??


  • Registered Users, Registered Users 2 Posts: 224 ✭✭The Mighty Dubs


    What do you mean by "I need to be able to create a query that will allow for every variation possible of selection. "?

    Is it just that you want to put the QuoteID, Supplier and SupplierCode into select boxes??

    *************

    Sorry getting ahead of myself a little here. basically I have QuoteID, Supplier and SupplierCode in drop down boxes and itemdesc in a textbox. What i need is an SQL query that will allow the user to select any of the drop downs and enter in a descriptive into the itemdesc field (or not as the case maybe) and the results to yield back whatever the choices made warrants...
    Is this any clearer?


  • Registered Users, Registered Users 2 Posts: 41 keeffe2001


    Whats the programming language you are using?

    basically your looking at making up a sql string query by pulling values from the three drop downs

    example if i had a name textbox

    str sql = "Select * from tblPeople where firstName = '" & txtName.text & "';"


  • Registered Users, Registered Users 2 Posts: 224 ✭✭The Mighty Dubs


    I am using ASP & VBScript. Yes I will be looking to do something along those lines alright. I have tried all sort of combinations using "And" , "OR" but one always seems to cancel the other out.


Advertisement