Forum Replies Created

Viewing 15 posts - 8,686 through 8,700 (of 26,490 total)

  • RE: UDF Help

    Your other function would look something like this:

    CREATE FUNCTION dbo.hd_iTVF (@s1 varchar(8000), @s2 varchar(8000))

    RETURNS TABLE WITH SCHEMABINDING

    AS

    RETURN(

    WITH

    nums(n) AS (SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 0)) FROM [master].dbo.spt_values Tally),

    matrix ...

  • RE: UDF Help

    Alan.B (3/1/2013)


    This is something I need to play around with more. I took what Jeff said to imply that, in the code below, the iTVF function (nsq_iTVF) would be faster...

  • RE: Joins

    beb9021 (3/1/2013)


    Hello RP_DBA.. I tried your method. However, in the message box I am getting this error message:Msg 208, Level 16, State 1, Line 1

    Invalid object name 'Table_1'.

    Is there a...

  • RE: a tricky query

    mehta.saurabhj (3/1/2013)


    I came across a certain query which was as follows:

    Find employees having salary greater than avg salary of their department

    The solution was :

    select * from student e where salary...

  • RE: SQL Agent skipping job execution

    Have you considered setting up a history table for the reorg/reindex process so you can review those stats on a daily basis to see if any of the indexes actually...

  • RE: Joins

    Just another solution:

    DECLARE @Table1 TABLE (

    EID INT,

    EmployeeName VARCHAR(32),

    Title VARCHAR(32),

    Number CHAR(12)

    );

    DECLARE @Table2 TABLE (

    ...

  • RE: How to change the named instance name to default instance name on SQL Server 2008 R2?

    You can't. What you can do is install 2008 as a default instance and then migrate the databasse(s) from the named instance to the default instance then uninstall the...

  • RE: does index also change the output?

    sqldba_newbie (3/1/2013)


    Jeff Moden (3/1/2013)


    opc.three (3/1/2013)


    Jeff Moden (3/1/2013)


    Actually, the change of an index CAN very much change the result especially where UPDATEs are concerned.

    I think we covered the OP's question about...

  • RE: get the first and last day of any Year/Month

    ben.brugman (3/1/2013)


    Jeff Moden (2/26/2013)


    Just be aware that string conversions of dates will be a bit slower than integer conversions. It'll take a million rows to notice a difference but...

  • RE: Getting minimum of top n rows without using subquery

    demonfox (3/1/2013)


    winmansoft (2/28/2013)


    thanks for replies

    We want sorting sometimes,I think we will stick to

    select min[v.date]

    from

    (select top 100 [date]

    from WHERE [date] BETWEEN '01-Jan-2012' and '20-Jan-2013'

    order by [date] desc)...

  • RE: Current date data problem in SSRS

    Without seeing the code we can't give you the answers you want. It is a black box and all we can do is shoot in the dark.

  • RE: Using a Variable for an IN Predicate

    Brett Phipps (6/21/2011)


    Celko

    Some version of this mis-use of SQL gets invented again every few months. It is a slow, dangerous mess. Are you familar with the long parameters list idiom?...

  • RE: Can I call a UDF in another database?

    Create a synonym in the database you are trying to run the UDF referencing the UDF in the other database. Use the two-part name of the udf synonym when...

  • RE: does index also change the output?

    When you say you are getting two different results, are you saying that the result sets are different or just ordered differently? If you are talking about order, there...

  • RE: Current date data problem in SSRS

    Can't see from here what you see there. There really isn't enough information to help you unless all you want are shots in the dark.

Viewing 15 posts - 8,686 through 8,700 (of 26,490 total)