Forum Replies Created

Viewing 15 posts - 1,471 through 1,485 (of 3,543 total)

  • RE: How do I create a fulltext index on a view?

    As a matter of interest why do you not do this

    SELECT ci.itemName

    FROM Content_Items ci

    INNER JOIN Content_Pages AS cp ON ci.contentItemId = cp.contentItemId

    INNER JOIN FREETEXTTABLE(Content_Items, title, @searchString) AS...

  • RE: Temp Table 'vs' Table Variable 'vs' CTE.

    Gail... nice explanation! Short, sweet, and to the point.

    Ditto 😀

    What a nice friendly dialogue :w00t:

    Must be painful with all that back slapping 😉

  • RE: Seperate digits

    ...but I doubt I ever have the skills to write anything like it!

    Sure you will, we all started as beginners 😉

    Now we try to elevate ourselves to Jeffs' level...

  • RE: "fetch"

    :ermm: suspicious question

    SELECT employeeid, sickleavehours + (vacationhours * salariedflag) AS [paidtimeoff]

  • RE: Alternative for VARCHAR (MAX) or VARCHAR (8000)

    Plus only counting nullable columns will reduce the size of the query

    Could build several strings and then EXEC(@string1+@string2+@string3)

    Or use a cursor like this (but performance could be poor due to...

  • RE: Convert positive number to a negative

    * -1 should work

    what is the datatype and what makes you think it did not work

    btw

    preceding a column or variable with - will achieve the same, eg

    DECLARE @myvariable int...

  • RE: String Manipulation

    Notwithstanding the above, I think this might work

    You will need a Numbers table (search this site for examples)

    SELECT k.[ID],k.Word,k.WordCategory

    FROM (SELECT SUBSTRING(' ' + @String + ' ',

    ...

  • RE: T-SQL statement to return SQL Job Last Run Date

    SELECT j.[name],

    MAX(CAST(

    STUFF(STUFF(CAST(jh.run_date as varchar),7,0,'-'),5,0,'-') + ' ' +

    STUFF(STUFF(REPLACE(STR(jh.run_time,6,0),' ','0'),5,0,':'),3,0,':') as datetime)) AS [LastRun]

    FROM msdb.dbo.sysjobs j

    INNER JOIN msdb.dbo.sysjobhistory jh

    ON jh.job_id = j.job_id AND jh.step_id = 0

    WHERE j.[name]...

  • RE: Seperate digits

    Is the database really the best place to do this?

    However providing the data is always in the format specified then this is how I would do it

    Create a temp table...

  • RE: Banker''s rounding in T-SQL (like Math.Round in .NET)

    Wow :w00t:

    A cool headed amicable discussion about Banker's Rounding 😎

    Amazing 😉

  • RE: Convert 2005 table valued function to 2000

    I read this joins on positions with a comma

    Correct 🙂

    however outputting n in the select list points to the start of each delimited string

    n.Number is the char position of the...

  • RE: Convert 2005 table valued function to 2000

    Where does the data come from?

    If from a table then you can use this in a subquery

    SELECTa.AccountNo,a.[Date],SUBSTRING(',' + a.[String] + ',', n.Number + 1,

    CHARINDEX(',', ',' + a.[String] + ',',...

  • RE: Need Help !

    Peter Larsson (10/3/2007)


    Cross post

    Thanks Peter 🙂

  • RE: Need Help !

    What is ticCount supposed to signify?

    Please edit your post and insert spacing as I cannot determine what data belongs in which column

  • RE: SQL querie

    DELETE t

    FROM candidateTenant t

    WHERE EXISTS(SELECT * FROM waitList w WHERE w.candidate_no = t.candidate_no)

Viewing 15 posts - 1,471 through 1,485 (of 3,543 total)