Forum Replies Created

Viewing 15 posts - 12,796 through 12,810 (of 13,460 total)

  • RE: Help with a SQL query tunning

    since all three of these tables (sr_srvc_request_v,sr_note_v,sr_activity_v) are joining on the srvc_request_num column, all three might also benefit from an index on their srvc_request_num column;

    I'd look at the execution plan...

    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: Query to create batch numbers?

    it looks like your batch number is arbityary...can it be based on the workID?

    select 'us' + RIGHT('000' + (convert(varchar,(workID / 100) + 1)),3)

     

    select 'us' + RIGHT('000' + (convert(varchar,(1 / 100)...

    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 with a SQL query tunning

    good catch and sorry for the typo;

    check to see if there is an index on ra_review_t.srvc_request_num ;

    all three joins use that for this query, and it might speed up if 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: How to allow developers to ''''see'''' proc text in a protected db environment

    as a developer will this allow them to see the text?

    SELECT TEXT FROM SYSCOMMENTS WHERE ID=object_id('USP_IE_GET_INVOICES_BY_USER_ID')

    if that does work, you could create your own proc and grant them...

    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: Table, Index, Column Information

    something like this might help you; note i limited it to top 100 because this can be a huge result set on some db's: the columns in the sqlstatmenet 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: trigger inner join problem

    if (SELECT     COUNT(*)

    FROM        inserted INNER JOIN

                          tblInternalEduModule ON [inserted].[Quiz Name] = tblInternalEduModule.Quiz

    WHERE     (tblInternalEduModule.Category = 'WIN') ) !=@@rowcount

     

    that looks invalid to me. select count(*) from inserted will set @@rowcount...

    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: Change field Length in Enterprise Manager

    in enterprise manager, expand the views and drill in till you see the table that contains the column you wish to change.

    right click on the table>>Choose "Design Table"

    A list of...

    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! Need to bring back old Master.mdf

    no need;

    you can simply insert these user tables back into the current master; you can use either DTS to copy the tables, or sql commands

    I assume you restored or attached...

    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 with a SQL query tunning

    try something like this: i've moved the counts you are comparing into two subselect tables instead;

    I've found this improves performance for me:

    SELECT rev.srvc_request_num AS serviceRequestId,

                   rev.reviewed_dt AS "review.lastUpdatedDate",

                   rev.reviewed_by AS...

    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: views based on other views...performance suffers?

    actually very helpful Colin thanks for the response; I had suspected views of views sucked, glad to hear a confirmation.

    I was hoping to simply prune the complexity of some of...

    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: Today''''s Date

    are you sure you need SQL to return the date in that format? can you do it clietn side instead?

    Programming languages like vb6/.NET, delphi, etc all can handle formatting a...

    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: Compression of Table in SQL 2000 Environment

    neat idea;

    does anyone have a compression algorythm / stored proc to do this to text? i could see how it could be nice to stuff some compressed, non-binary xml into...

    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: Querying the sys tables to find out those triggers not for replication

    im sorry i kind of confused you; i got the vbalues inverted.

    0 in the replinfo means not replicated.

    a non zero value means it is being replicated.

    here are some of 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: Querying the sys tables to find out those triggers not for replication

    select name, replinfo from sysobjects where xtype='TR'

    this will return all triggers, and a zero or one value for the replinfo.

    if replinfo is [zero], the "not for replication" is true.

    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: Corrputed Stored Procedure

    do you have auto-create statistics turned on on the database?

    an execution plan may become less effective if the table(s) it queries have a lot of inserts/updates. the statistics are used...

    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,796 through 12,810 (of 13,460 total)