Forum Replies Created

Viewing 15 posts - 1 through 15 (of 36 total)

  • RE: Tempdb stopped SQL Service

    Nothing in the eventlogs indicating hardware/network problems?

    Have you had a chance to look at that KB article from Microsoft?

  • RE: Tempdb stopped SQL Service

    OK, it was worth a shot of course.

    Do you know if there was a big query running at that time or is there maintenance scheduled that could have caused this?

    Have...

  • RE: Tempdb stopped SQL Service

    Google is your friend

    This blog describes a similar case, including their solution: http://www.sqlmusings.com/2011/06/25/connection-error-233-no-process-at-the-other-end-of-the-pipe/[/url]

  • RE: Count(*) returning a lower figure than Count(Distinct columnname)

    I don't see why count(*) would give a lower number then count(distinct) based on your table design and the query being a single select statement.

    However I noticed there is no...

  • RE: help me with attaching database

    I'm afraid it will impossible to reattach the database without .mdf or .ndf files.

    I hope you have a recent backup available, you will most likely need it.

    I'm stating the obvious...

  • RE: show hierarchy record

    I'm not 100% sure that this is what you mean, but I changed the way the sorting is handled by the query. Instead of using the row_number() function, I have...

  • RE: KEEP (DENSE_RANK LAST ORDER BY) from Oracle to SQL Server

    Happy to help mic.con87

    Seeing what you try to do, I think you can create a view that returns the result of your subquery. Then use that view in an outer...

  • RE: T-sql html insert

    Sean Lange (12/7/2011)


    In general you need to be careful about doing that. By changing from single quote to a double you are changing the data. For html this is not...

  • RE: KEEP (DENSE_RANK LAST ORDER BY) from Oracle to SQL Server

    Your example seems to be rather simple and can be solved like this:

    select max(rl.YearOfIncident) as YearOfIncident

    , cc.ClaCaseID

    from Staging.ClaCases cc

    ...

  • RE: T-sql html insert

    I think it's best to replace all single quotes inside the string to double quotes before inserting the html code, like so:

    INSERT dbo.Table1 (Html)

    SELECT '<table cellpadding="0" cellspacing="0" border="0" id="Table2"><tr><td align="center"><img...

  • RE: Msg 207, Level 16, State 1 Invalid column name

    Faye Fouladi (12/6/2011)


    I have something like this in the stored proc

    Have you tried recompiling the stored procedure?

    exec sp_recompile 'your_proc_name_goes_here';

    exec sp_refreshsqlmodule 'your_proc_name_goes_here';

  • RE: show hierarchy record

    You can obtain the same result by using a CTE, which is prefect for retrieving results that contain a hierarchy, like so (I used a table variable for demo purposes):

    set...

  • RE: KEEP (DENSE_RANK LAST ORDER BY) from Oracle to SQL Server

    I'm not sure what the expected result is, maybe you can provide an example?

    In any case, following your remarks, I think that, instead of the order by, a partition by...

  • RE: KEEP (DENSE_RANK LAST ORDER BY) from Oracle to SQL Server

    For the date truncation, I prefer one of these two conversions:

    declare @date datetime = getdate() ;

    select @date as [ThisIsNow]

    , convert(date, @date) [asDate]

    ...

  • RE: Slow Running Stored Proceudre

    hi eseosaoregie

    Going back to the procedure [prv].[sp_TradeDetail], there is a subquery in the select list that returns the top 1 OECD_Memberflag:

    CASE WHEN len(ltrim(rtrim(I.IssueCountry))) = 0 THEN (SELECT TOP 1...

Viewing 15 posts - 1 through 15 (of 36 total)