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 strongm 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: *

  1. xponcall

    query result into new table - bit messy

    Hi, thank you very much. base on your code, it will return the result...but for some reason the client want to display each result out by line. Not sure of reason...but that what they want. create table #tmpInvTbl( acct int, [date] datetime,[tran] char(1), qty int) insert into #tmpInvTbl...
  2. xponcall

    query result into new table - bit messy

    I have the following, and need to be convert and insert into a new table. This could be done in a some sort of reporting tool, but for now this what I need. Server: SQL 2000 ------------------ table1 Acct Date Tran Qty 101 10/1/2008 A 500 101 10/2/2008 A 1000 101 10/3/2008 A 200 102 10/5/2008...
  3. xponcall

    ranking - need help

    This seem to solved the problem.... thanks select * from ( select a.*, Rank() over (Partition BY a.rowid order by case when (a.amount <> 0 and a.prodtype=3)then 0 else 1 end, case when (a.Qty <> 0 and a.prodtype=2)then 0 else 1 end, a.Prodtype DESC, a.amount desc , a.qty...
  4. xponcall

    ranking - need help

    select * into #table1 from ( select 49 rowid, 7373194 id, 3 ProdType, 200 Amount , 180 Qty union all select 49 , 106049 , 2 , 0 , 180 union all select 1096 , 5008960 , 1 , 0 , 120 union all select 1096 , 108891 , 2 , 0 , 120 union all select 1096 , 6627903 , 1 , 0 , 250 union all select 1096 ...
  5. xponcall

    group and ungroup sum

    I have the following: Select t0, t1,t2,t3,t4,sum(x1)as tx1,sum(x2)tx2 into tbl2 From Tbl1 Group by t0,t1,t2,t3,t4 Having (sum(x1)+sum(x2))> 10 trying to ungroup the above by flaging the tx column to 'Y': update a set a.tx='Y' from tbl1 a inner join tb2 b on a.t0=bt0 and a.t1=b.t1 and...
  6. xponcall

    mulit insert to sql

    George, thank you for the quick response. I'm a bit rusty with XML and not can't afford to learn the stuffs right now, because of the time limited on the project. thanks
  7. xponcall

    mulit insert to sql

    I'm trying to limited many network round-trips call from the ASP.NET. What is the best method to insert these into the table: Customer Order: items,qty,price,desc: 102, 1, 250, 'Sql books' 105, 2, 10, 'Book binder' 106, 1, 5, 'Special Pen' 110, 5, 2, 'Paper Box' I looking into Array and pass...
  8. xponcall

    sequence sorting

    Oh how mush I wish I have sql 2005. In fact, I be happy with 2000, this is an sql7.0. Interest solution Esquared. So I have to get a count and do a while loop to update the table? I will give it a shoot. thanks
  9. xponcall

    sequence sorting

    Hi all, I need the following to sort out base on the condition of the 3 & 2 col. eg: c1 c2 c3 x y 0 x c y x n c x a b x b n c1 c2 c3 x a b x b n x n c x c y x y 0 -if 0 start, get col2 value next line, the col3 must match col2 previous value and so on.

Part and Inventory Search

Back
Top