Viewing 15 posts - 5,941 through 5,955 (of 6,036 total)
Your script does not use sp, but it will cause the same problem.
There's nothing wrong with sp, it's about updting table from its own...
September 15, 2005 at 6:07 pm
You created nested triggerd.
Your UPDATE trigger invokes sp KVtest which updates the table and fires the trigger which invokes the sp which fires the trigger which ...
Read BOL about Recursive...
September 15, 2005 at 3:57 pm
Nobody mentioned another important difference.
Compare:
Select @a = ColA from tblA where ColB = @b-2
Set @a = (select ColA from tblA...
September 15, 2005 at 3:42 pm
Look around before posting:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=219897
September 14, 2005 at 7:44 pm
Trick is COUNT(ColumnName) counts only not null values, count(*) counts everything.
September 14, 2005 at 5:41 pm
SELECT TP.TableParentID , Count(TP.TableParentID ), Count(TC.TableChildID)
FROM TableParent TP
LEFT JOIN TableChild TC on TC.TableParentID = TP.TableParentID and TC.Date1 IS NULL
GROUP BY TP.TableParentID
criteria for select:
September 14, 2005 at 5:39 pm
add to my script:
where syscolumns.id = object_id(N'dbo.PROC_AllEvents')
and you'll see sky with diamonds!
SPs are in that list too.
September 14, 2005 at 5:25 pm
SELECT *
FROM syscolumns
INNER JOIN syscomments ON syscolumns.cdefault = syscomments.id
September 14, 2005 at 4:57 pm
Try to comment everything in SP but this statement and run it.
Looks like you look at wrong point.
September 14, 2005 at 3:28 pm
Are trying to create reporting tool out of single query?
Answer on your last question depends on:
where you going supply results to;
what kind of presentaton format you gonna use;
etc...
But actually SQL...
September 13, 2005 at 8:28 pm
Replace
SUM ( Quantity * UnitPrice ) AS [TOTAL AMOUNT]
with
'====' + convert(varchar(25), SUM ( Quantity * UnitPrice ) ) + '====' AS [TOTAL AMOUNT]
OR
September 13, 2005 at 6:59 pm
If you will convert to CHAR(8) yes, not more than 8 chars will be allowed. In case of less than 8 chars string will be filled with spaces up to...
September 13, 2005 at 6:55 pm
Same way. Just don't forget to convert "Total Amount" to any of char types before concatenation.
select '====' + convert(varchar(255), [Total Amount]) + '===='
September 13, 2005 at 6:45 pm
Use Varchar(255) or Varchar(8000) instead of Char(8) if you need.
The only point is to use same type of data in the column. '=======' is char (varchar) data, so you cannot use...
September 13, 2005 at 6:40 pm
Viewing 15 posts - 5,941 through 5,955 (of 6,036 total)