Viewing 15 posts - 4,501 through 4,515 (of 5,394 total)
You could try with
select serverproperty('MachineName')
OR
select serverproperty('ComputerNamePhysicalNetBIOS')
but I can't confirm it works, because all my servers are name uppercase.
Hope this helps
Gianluca
April 1, 2010 at 6:08 am
This is the piece of code I use in my triggers:
DECLARE @SQLBuffer nvarchar(4000)
DECLARE @buffer TABLE (
EventType nvarchar(30),
Parameters int,
EventInfo nvarchar(4000)
)
INSERT @buffer
EXEC sp_executesql N'DBCC INPUTBUFFER(@@spid) WITH NO_INFOMSGS'
SELECT @SQLBuffer = EventInfo
FROM @buffer
April 1, 2010 at 3:38 am
DBCC INPUTBUFFER(@@SPID) is the only way I have found so far to do this.
All queries involving DMVs did return the trigger code or the calling stored procedure code. I...
March 31, 2010 at 8:19 am
No, no other ideas without table scripts, sample data and desired output. It's a shot in the dark this way.
Please see the article in my signature.
Once you provided more info,...
March 31, 2010 at 8:14 am
You may find a technique to achieve this in Jeff Moden's article on running totals:
http://www.sqlservercentral.com/articles/T-SQL/68467/
Hope this helps
March 31, 2010 at 7:54 am
I don't think you will get any useful replies this way. Many things are missing.
You're not saying which tables are involved and what they look like, and, first of all,...
March 31, 2010 at 7:51 am
Try using LEFT join instead of INNER JOIN, assigning a predetermined value to NULL answers (-1 in my example):
SELECT dbo.tbl_Results.User_ID,
dbo.tbl_Questions.Answer AS...
March 31, 2010 at 7:03 am
It's impossibile to answer this question without seeing the code.
Please post table scripts and the stored procedure code.
If your tables have triggers defined, post their code too.
March 31, 2010 at 6:15 am
It would be very helpful to see what your tables look like.
Anyway, without any other information, all I can tell you is something like this:
SELECT answer, COUNT(*) AS answer_count
FROM answers
WHERE...
March 31, 2010 at 6:01 am
Sorry, I removed my reply, since I misunderstood your question.
March 30, 2010 at 4:26 am
Gift Peddie (3/29/2010)
The Napolitano is warm and friendly, the Vienezano is cultured and reserved and the Milanese is snooty and aloof.
Have you ever been to Italy, Gift? If so, I...
March 30, 2010 at 1:38 am
GilaMonster (3/29/2010)
Jack Corbett (3/29/2010)
... but the time change and amount of natural light has little to do with how well I function prior to finishing my coffee and 10am arriving.
So...
March 29, 2010 at 9:04 am
jcrawf02 (3/26/2010)
Paul White NZ (3/26/2010)
Gianluca Sartori (3/26/2010)
When I received it I saw it was shipped from Auckland, NZ!!! That's why it took so long!Hey! Don't go blaming Auckland! :crazy::angry:
(joke)
So...
March 26, 2010 at 6:57 am
Paul White NZ (3/26/2010)
Gianluca Sartori (3/26/2010)
When I received it I saw it was shipped from Auckland, NZ!!! That's why it took so long!Hey! Don't go blaming Auckland! :crazy::angry:
(joke)
It couldn't...
March 26, 2010 at 6:15 am
BTW, I received my copy of SQL Server MVP Deep Dives two weeks ago, but I ordered it 3 weeks earlier from Amazon.com, even if I chose the Expedited International...
March 26, 2010 at 3:27 am
Viewing 15 posts - 4,501 through 4,515 (of 5,394 total)