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...
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...
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...
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...
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
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...
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
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.