Forum Replies Created

Viewing 15 posts - 7,636 through 7,650 (of 13,460 total)

  • RE: CREATING TRIGGER

    hemanth T (5/7/2011)


    Hi Lowell,

    I tried your code for my trigger.It is working fine.

    Thank you for your valuable suggestion.

    Hemanth

    ....................................................................................................................................................

    Glad it helped you build your trigger!

    Understanding the relationship between the INSERTED...

    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: "Subquery returned more than 1 value" error when querying linked server

    darn; i was guessing you were appending a WHERE statement...

    ok how about the REPLACE?

    this section:

    Replace(URL.URL,'{0}',RTRIM(CL.ClientID)) as LOB_CompanyRecord,

    uf Url.URL has one row, but CL.ClientID has multiple rows, that oculd cause 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: "Subquery returned more than 1 value" error when querying linked server

    something is missing;

    the error raise typically occurs when you assigning a variable' like SELECT SomeVar = SomeOtherField,

    or in a WHERE statement... WHERE SomeVar = SomeOtherField,

    JOINS on field = otherfield...

    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: Any SQL Server 2008 R2 Best Practices Documents

    Most best practices for previous version of SQL are still valid, of course, so don't limit your searches jsut to 2008 R2.

    there's several series of articles here on SSC for...

    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: Generate login account scripts for a specific database

    i think if you connect to a specific database and run this it might do what you are after:

    select 'EXEC sp_help_revlogin ' + name

    from sys.database_principals

    where type_desc IN ('SQL_USER','WINDOWS_USER')

    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: execute trigger problem

    sounds like a problem with the trigger; paste it here and we can give you some better input on identifying the issue.

    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 valued Function Performance

    this is the lsit of tables used int he query; can you try this update statistics command?

    UPDATE STATISTICS [CWT] WITH FULLSCAN

    UPDATE STATISTICS [Calendario] WITH FULLSCAN

    UPDATE STATISTICS...

    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: CREATING TRIGGER

    hemanth T (5/6/2011)


    Hi All,

    I met a scenario "When a coloumn of a table A is updated trigger should be performed like"AFTER UPDATE" and i need to insert values into table...

    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 valued Function Performance

    rootfixxxer (5/6/2011)


    Thanks

    Like i wrote i didn't had the time to optimize the function...

    But the main problem here it's why in 2000 only takes 11 seconds and now in the 2005...

    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 valued Function Performance

    ok now i see it; 5 cursors are being executed for each row;sqlnaive hit it on the issue first; you've got to break it up, or change the logic 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: Table valued Function Performance

    the devil is in the details.

    Can you post the actual execution plan as a .sqlplan xml file, so we can look at it and identify what it's running so...

    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: list all login\username, server role, db role, status in sql server 2005

    there's a huge amount of posts and submitted scripts here on SSC that do what you are asking for:

    http://www.sqlservercentral.com/search/?q=script+roles+permissions

    take a look at any of those and see if they do...

    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: Handling truncated leading spaces in Reporting Services

      is the html symbol for non breaking space.

    the forum here will convert   into the html space...so you wouldn't see what i was talking about. i had...

    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 can we use 'select' statement inside an 'Insert' Statement

    you need at least one more column.. if i count everything in the table, there's just one value...in your example you said 680.

    bit if you count...group by anothe rcolumn, 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: Question on best place to use a function

    better:

    Select * from TableA where col1 = ReverseOfSomeFunction(@VariableA)

    Since the index is on col1, so it would be used and speed things up and would result in an index seek for...

    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 - 7,636 through 7,650 (of 13,460 total)