Forum Replies Created

Viewing 15 posts - 901 through 915 (of 2,007 total)

  • RE: Dynamic Tablename within stored procedure HELP PLS

    I've not got time to go over it and make sure all of the syntax is correct, but this is the general idea: -

    ALTER PROCEDURE [dbo].[Rep_Urlaubstage] (

    -- Add the...

  • RE: Splitting strings in SQL

    nairdeepa (2/10/2012)


    Thanks. Do you have link to it?

    My whole post was a link to the article[/url] describing it. The article includes the code.

  • RE: substring function

    To get it out of the way, Text is deprecated so you shouldn't really be using it.

    To answer your issue, cast it as VARCHAR(MAX) before doing your substring.

    e.g.

    SELECT SUBSTRING(CAST([Message] AS...

  • RE: substring function

    What data-type is [Message] ?

  • RE: Splitting strings in SQL

    nairdeepa (2/10/2012)


    Hello,

    I need to split the below string:

    'Spring 2012,Spring 2011'

    as

    'Spring 2012','Spring 2011'

    Does any one know how to do this ?

    Thanks,

    Debra

    Try Jeff Moden's string splitter function, by far the fastest purely...

  • RE: Need to replace #temp tables with CTE

    I'd be surprised if it makes an improvement.

    Without DDL, sample data and expected results, all I'm going to do is directly convert your temp tables into CTEs. If you...

  • RE: sql query execution time & rowcount, without results

    Anything wrong with using a variable as a holder?

    e.g.

    DECLARE @holderValue VARCHAR(MAX)

    PRINT REPLICATE('-', 80)

    SET STATISTICS IO ON

    SET STATISTICS TIME ON

    SELECT @holderValue = number /*use primary key*/

    FROM master..spt_values

    WHERE type = 'P'

    PRINT REPLICATE('-',...

  • RE: Query SQL to return back a XML string created Select Combobox

    manjuke (2/9/2012)


    Well you could try something like this..

    DECLARE @xml AS XML = (

    SELECT @id AS '@id',@name AS '@name',@onclick AS '@onclick',(

    SELECT TOP 100 PERCENT A.* FROM(

    SELECT '0' AS '@value', NULL...

  • RE: Need to tune SQL

    kiran.rajenimbalkar (2/9/2012)


    Hi Professional,

    Just please tell me which HINT's i need to use in the mentioned above SQL for retrieving the data fast.

    Regards,

    Kiran

    Here's a hint. . . read this article and...

  • RE: Help with a query.

    SELECT @cols = STUFF((SELECT '],''0'' [' + RTRIM(CPA.n)

    FROM...

  • RE: Need to tune SQL

    kiran.rajenimbalkar (2/8/2012)


    So can you able just look to where i need to change something in the SQL?

    No. There is too much guess work involved, which is why she asked you...

  • RE: Help with a query.

    I'd have probably done it like this

    DECLARE @cols NVARCHAR(max) DECLARE @number INT

    SET @number = 9

    SELECT @cols = STUFF((SELECT '],''0'' [' + RTRIM(CPA.n)

    ...

  • RE: Hierarchy Query

    Cadavre (2/8/2012)


    cdh-727733 (2/8/2012)


    No but they are linked to the children of 13, or the grandchildren of 11.

    Essentially I am trying to achieve the drill down effect so as long as...

  • RE: Hierarchy Query

    cdh-727733 (2/8/2012)


    No but they are linked to the children of 13, or the grandchildren of 11.

    Essentially I am trying to achieve the drill down effect so as long as there...

  • RE: Hierarchy Query

    cdh-727733 (2/8/2012)


    Ah yeah that was hard coded when I was testing!

    I still can't get it though to step through :

    Screwdrivers > Phillips / Slotted > Big / Small

    Using your execution...

Viewing 15 posts - 901 through 915 (of 2,007 total)