Forum Replies Created

Viewing 15 posts - 12,421 through 12,435 (of 13,465 total)

  • RE: Date, Sum and SQL recursive

    the above also would not take into consideration if there were 3 or more rows that should condense to a single time slot you'd need to handle it differently, most...

  • RE: smart headers

    you gotta try what i posted: you end up with a 15 character string with the preceeding zeros you requested.

    SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,1),15)

    SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,86456),15)

    SELECT RIGHT('000000000000000'...

  • RE: DB Permissions

    you want to change all the objects back to smdb;

    --find everything NOT owned by dbo, and create the sqls to change them to dbo as owner:

    select 'EXEC sp_changeobjectowner...

  • RE: Scalar UDF and dynamic sql - alternatives?

    it really depends on what your UDF is doing;

    we need that code to determine whether this can be done cleaner; the more real details you post, the better we...

  • RE: txt file importing

    when you say the columns are not in the same order, what do you mean? is the data in name:value pairs, like 'fruit:apple;vegetable:peas and carrots;'

    could you post a couple of...

  • RE: Date, Sum and SQL recursive

    i think i was able to do this as a set based operation by joining the table against itself:

    take a look at the same data and my results, adn tell...

  • RE: Update this Table

    yes...but you have to take the same code from that function, which uses charindex and other stuff, and incorporate it into your query.

    That makes it harder to read, but...

  • RE: Stop HTML matches with CONTAINSTABLE

    can you add another column of data which contains only the non-HTML data, and fulltext against that instead?

    I've got this old 2000 proc to strip html out via TSQL, but...

  • RE: Academic Developer Edition Install from Visual Studio Pro Package

    Since your operating system is a server operating system(ie Windows2000 Server, 2000 Advanced Server, Windows 2003) the install dummies itself down to the Express Version.

    I believe that is what you...

  • RE: help make query faster please with an index

    take a look at your WHERE statement:

    WHERE TIMESTAMP=(SELECT MAX(TIMESTAMP)FROM DEMANDSPREAD)",

    because this query is keying off of the TIMESTAMP column, it would greatly benefit from having an index on it.

    that...

  • RE: Update this Table

    look in the script contributions here on SSC and find the split() function. it takes a string, and converts it to a table based on the delimiter.

    select dbo.split(@a,',') would return...

  • RE: smart headers

    to do what yoiu are asking, you need to take the RIGHT() 15 chars of 15 '0' + the convert of your value.

    for example

    SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,GETDATE(),112) ,15)

    look at...

  • RE: Trigger not getting values from INSERTED

    anytime you SELECT something, you technically could insert it into another table.

    if you did SELECT TOP 5 NAME FROM sysobjects WHERE xtype='U', there's 5 rows right?

    if INSERT INTO SOMETABLE(TableNames)   SELECT...

  • RE: if isdate(5647) returns true, how do you determine if a value is a date

    --As Ray identified, an integer will return as a valid date, so you need to filter the results with what date ranges are acecptable for you:

    declare @someval int,

            @MinDate...

  • RE: Stored Procedures

    system stored procedures have a lot of notes in Books Online.

    all the other stored procs would be created by your developers or some other party, so it's up to...

Viewing 15 posts - 12,421 through 12,435 (of 13,465 total)