Forum Replies Created

Viewing 15 posts - 2,581 through 2,595 (of 13,460 total)

  • RE: Is there a better query criteria?

    djj (2/3/2014)


    Lowell, thanks for the reply. I am actually looking to delete the "bad" numbers so yes it is an IN.

    well going forward, you could add a check constraint...

    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: Is there a better query criteria?

    The only way to make it perform better is to make the search terms Sarg-able and index-able, as John referred to, otherwise you are stuck with a table scan.

    you could...

    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: Password checker automation

    Adam i think just doing UNION or UNION all would probably be better than the OR statements ; one of those simple fixes that should have a perfroamnce imact:

    SELECT ..

    LEFT...

    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: Data spilt in two tables

    you'll want to look into using the OUTPUT clause so you can capture the new identity values, along with your data, so tyou can isnert/update the second table.

    here's just one...

    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: Write a conditional query

    read up at Gails blog on catch all queries: http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/

    here's an example of a catch all query:

    WHERE 1 = CASE

    ...

    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: Implementation of regular expressions

    i've added Phil Factor's Regular Expressions CLRs[/url] to my servers for a while now ;

    in several of my projects, the regular expressions, since they are inline table value functions, are...

    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: Get list of all workers having same SET of Rates

    nice job providing the sample data!

    in this case, you need to get the "sets" organized first so they can be compared.

    Someone else may have another method, but i thought using...

    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: Save SSMS Query Results Options

    hayden_jones (1/31/2014)


    I have a report to run every day in SSMS. I have selected query options to send results to a file with pipe delimited results. Tomorrow, I...

    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: Common Checks

    here's one that i just got bitten with and added to my common checks:

    i added a filtered index, and a stored proc that updated the table with the...

    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: permissions for stored proc that reads distributed partitioned view

    ok in that case, what you want is a certificate signed stored procedure.

    then the credentials of the certificate are used, and that can satisfy the cross database/instance permissions issue, i...

    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: cannot be opened because it is version 655. This server supports 612 and earlier

    you can never restore a higher version db to a lower version;

    looks like your db is 2008 but you are installing/using SQL2005. check to see if you installed an isntance,...

    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: permissions for stored proc that reads distributed partitioned view

    evansrf (1/30/2014)


    I'm having trouble understanding the requirements for this.

    I'd like to have a stored proc that selects/updates a distributed partitioned view.

    I really don't want to have to grant rights 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: converting date time from string

    I think you simply want SET @Day = cast( getdate() as date)

    you have a DATENAME function that would reurn 'FRIDAY", which you tehn try to cast as a date, 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: Extarct Words With Specific Format in SQL Column(text)

    ok i got a lot more data than the ten or so rows you displayed, but this seems to do it.

    you might need to grab a vopy of DelimitedSplit8K

    http://www.sqlservercentral.com/articles/Tally+Table/72993/

    ;WITH MyCTE([clndr_id],[clndr_data])

    AS

    (

    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: Extarct Words With Specific Format in SQL Column(text)

    interesting; so you need to find multiple substrings that are like 'd|[0-9][0-9][0-9][0-9][0-9]' ie '(d|41519)'

    here's a cte of his post for the adventurous;

    i'm trying a lazy DelimitedSplit8k cross apply...

    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 - 2,581 through 2,595 (of 13,460 total)