Forum Replies Created

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

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Trigger not getting values from INSERTED

    just a quick note: your trigger will fail if the INSERTED table has more than one row . you should change it to something like this:

    if update(entry)

      begin

        update results_ext...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: smart headers

    awesome! glad it worked out for you.

    It was a neat challenge to try and figure that one out. It's really just grabbing building blocks of code I used before, and...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Using sp_executesql

    lol sorry for pointing out the obvious...I'll read a bit more on it and see if i find something un-obvious.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Using sp_executesql

    Gordon that latch type 2 error made me remember that there was  a problem in early service packs....while it might not be your specific problem, what version is on your...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: smart headers

    bcp doesn't allow you to append files, but the COPY command certainly is able to do it.

    here's a complete example: it uses the function i suggested above.

    psuedocode: bcp, make header,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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