Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: brettgab
  • Content: Threads
  • Order by date
  1. brettgab

    Darn query causing me grief

    I have two tables, an I'm trying to list all the items from I_ToDecide.stock_code which do not have a corresponding value in I_Stock_Colours.colour_stock_code. When I do a query using IN (SELECT...), the correct results are retured, but when I do a NOT IN (SELECT...), no values are returned...
  2. brettgab

    Select query help

    I have a table from which I need to select all records with a 'matching pair of fields'. For example my table contains the following structure, and the fields I'm matching are FIELD1 and FIELD3 ID FIELD1 FIELD2 FIELD3 1 Bob Ted Reg 2 Bob Peter 3 Bob...
  3. brettgab

    SQL Update Help Needed

    I have two tables, Merged_Stock and I_Products. I_Products has a field 'stock_code'. Merged_Stock has two fields, 'old_stock_code' and 'new_stock_code'. I want to write a query which updates I_Products.stock_code with Merged_Stock.new_stock_code. Records will be matched on I_Products.stock_code...
  4. brettgab

    Can't get Query Syntax right.....

    I'm trying to run a query which returns three fields, one of the fields needs any potential leading space stripped off. Due to my being a bit SQL-retarded, I can't get it working. Any help appreciated... SELECT DISTINCT kpp.plan_phone_code + kpp.plan_phone_suffix AS Plan_Code...
  5. brettgab

    Can't get query syntax right....

    There are two problems with the query below... 1. I'm trying to populate the field 'Territory_Code' with '900' if the Conn.Rep_Code exists in Table CCR, and populate it with the Conn.Territory_Code if it doesn't. I've got the first part working (populating certain records with '900') but you're...
  6. brettgab

    Can't get correct results with JOIN

    Here is my problem.... There is a view which displays connection profit amounts for stores. View CONN_PROFIT DATE STORE_ID CONN_PROFIT 01-Sep-2001 603 56.00 01-Sep-2001 603 144.00 01-Sep-2001 603 500.00 01-Sep-2001 604 200.00 01-Sep-2001 605...
  7. brettgab

    Query Performance is poor

    Greetings all (esp Terry !), OK I'm quite new to SQL Server and Transact-SQL and know very little about getting the best performance. I'm programming for a company and I have a massive query...Here it is... SELECT S.sys_description AS STORE, V.Territory_Code, (IsNull(Sum(V.Conn_Profit),0) +...
  8. brettgab

    SQL Server was renamed - can't use replication

    Hello, I am VERY new to managing a SQL server database, although I'm an ASP programmer, all I've done is basically connected to one using ODBC. Any advice will have to be written as though you are talking to a complete novice. I am currently setting up a website (hosted elsewhere) which will...

Part and Inventory Search

Back
Top