all groups > sql server programming > july 2006 > threads for saturday july 8
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
SELECT FROM @Variable how?
Posted by James Hancock at 7/8/2006 10:10:02 PM
I'm trying to build up a table variable based on a loop that goes through
several tables in the database and pulls specific records and drops them
into the table variable.
Here's what I'm doing:
DECLARE @TableName nvarchar(50)
DECLARE @SQL nvarchar(255)
DECLARE cSyncOrder CURSOR READ... more >>
i'm sorry query
Posted by x taol at 7/8/2006 9:05:33 PM
tbl1
fNum fNal fPum fIn fOut fStock
1 2006/05/06 p1 9 1 8
3 2006/05/07 p1 10 0 18
2 2006/05/07 p2 7 3 4
4 2006/05/08 p3 10 9 1
5 2006/05/10 p3 4 3 2
tbl2
fNal fPum
2006/05/08 p1
2006/05/08 p2
2006/05/08 p3
2006/05/09 p1
2006/05/09 p2
2006/05/09 p3
2006/05/10 p1
2006/05/10 p2
2006/... more >>
why doesn't isnull return a value?
Posted by vtxr1300 at 7/8/2006 6:01:16 PM
I have the following query
SELECT ISNULL(userId, 0) AS userId
FROM dbo.users
WHERE (email = 'test@test.com')
There are no records in the table at all, so why doesn't isnull return
0? When I run it in vs 2005 or sql management studio 05, I get back no
row at all.... not eve... more >>
Case sensitive vairable names
Posted by Jesse Houwing at 7/8/2006 3:24:39 PM
Hey all,
We're working with two teams, working on two different SQL Server
instances. As it turns out the first server will accept the following:
declare @NUMBER int
set @Number = 1
The second server is more picky however. It will only accept:
declare @Number int
set @Number = 1
A... more >>
query
Posted by x taol at 7/8/2006 3:23:50 PM
fNum fNal fPum fIn fOut fStock
1 2006/05/06 p1 9 1 8
3 2006/05/07 p1 10 0 18
2 2006/05/07 p2 7 3 4
4 2006/05/08 p3 10 9 1
5 2006/05/10 p3 4 3 2
fNal fPum
2006/05/08 p1
2006/05/08 p2
2006/05/08 p3
2006/05/09 p1
2006/05/09 p2
2006/05/09 p3
2006/05/10 p1
2006/05/10 p2
2006/05/10 p3
... more >>
GROUP BY question
Posted by Mike9900 at 7/8/2006 8:52:01 AM
I need to return certain rows that I do not want to be grouped by. Is there
a way to do so?
Here is how I want it.
SELECT DISTINCT T.TID,T.Date,TD.PaymentType,(T.Debit - T.Credit) AS
OriginalAmount,T.Type,ISNULL(T.Debit - (T.Credit +
SUM(TD.Amount)+SUM(ISNULL(TD.Discount,0))),T.Debit -... more >>
@@rowcount without displaying select
Posted by peter walker at 7/8/2006 2:22:52 AM
Hi, im hoping someone could shed some insight.
If i do the following in a trigger:
select * from <table> where <condition>
if @@rowcount > 0
begin
<perform tasks>
end
.... but im not necessarily interested in displaying a rowset. The above
select statement wi... more >>
Job category not visible
Posted by VSS at 7/8/2006 12:00:00 AM
I have added one new category using , sp_add_category, but when i open to
add new job, category is not available in dropdown of catgory in the new job
dialog?
I used following tsql for adding categroy:
EXEC sp_add_category 'JOB', 'LOCAL', 'ABC'
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
|