Forum Replies Created

Viewing 15 posts - 31 through 45 (of 52 total)

  • RE: Process deadlock

    This is the error log

    2015-03-06 16:32:25.49 spid52 DBCC TRACEON 1222, server process ID (SPID) 52. This is an informational message only; no user action is...

  • RE: Process deadlock

    I enabled Trace and got into deadlock. Can you please advise where I can see the graph/log?

  • RE: Execute stored procedures dynamically

    Never mind posting. It seems I need to declare NVARCHAR to fix the issue;

    DECLARE @sql NVARCHAR(MAX)

    SELECT @sql = STUFF((SELECT ';EXEC ' + StoredProcedureName + ''...

  • RE: How do we generate csv with custom data?

    Right now, I have created SP and used sqlcmd to dump to file. But, when I open in text file, it shows up lots of empty space as it...

  • RE: How do we generate csv with custom data?

    I'm planning to create a stored procedure which dumps to a file in the specified path. It will be scheduled as job on the server.

  • RE: Table Type and OpenRowSet

    Yes, it is capable of handling multiple rows.

  • RE: ROW_NUMBER() OVER (PARTITION BY *** ORDER BY ***) excluding NULL values

    I guess you might need to do something like this:

    SELECT * ,

    ROW_NUMBER() OVER ( ORDER BY ID ) RowNum

    FROM ...

  • RE: Table Type and OpenRowSet

    Thanks Igor for your valuable suggestions.

  • RE: Table Type and OpenRowSet

    I have created a table type matching my output of stored procedure and am able to store the data. I'm still interested to see if there will be any...

  • RE: Question on PIVOT

    Thanks a lot!! I didn't expect you giving me complete code 🙂

    PS: Hope you took Aspirin!

  • RE: Question on PIVOT

    I have one add on question. Not sure if it needs to be a different topic.

    Assume I have data like

    Name Type Value

    Sarath Age 33

    Sarath Id 333

    Sarath Id 123

    Mahesh Age 22

    mahesh...

  • RE: Question on PIVOT

    Thanks for the reply. Yes, you are right. I did using dynamic @sql by creating columns on the fly. Do you think it is the...

  • RE: Getting heirarchy

    it's really wonderful... I can see that my CTE has incorrect joins!! Thanks a lot...

  • RE: Getting heirarchy

    CREATE TABLE [dbo].[User](

    [UserId] [int] NOT NULL,

    [Active] [bit] NOT NULL

    ) ON [PRIMARY]

    CREATE TABLE [dbo].[UserReporting](

    [UserId] [int] NOT NULL,

    [ReportingUserId] [int] NULL

    ) ON [PRIMARY]

    INSERT INTO [dbo].[User] ([UserId] ,[Active]) VALUES (1,1)

    INSERT INTO [dbo].[User] ([UserId] ,[Active])...

  • RE: Issue with Dependency

    Thanks for your reply,

    Though I am not proficient in SQL, I have tried to do the below steps.

    I have selected master database and executed the below one:

    EXEC sp_refreshsqlmodule 'mySP'

    Output:

    Msg 2812,...

Viewing 15 posts - 31 through 45 (of 52 total)