Forum Replies Created

Viewing 15 posts - 3,751 through 3,765 (of 13,460 total)

  • RE: I need answer for this can anyone help me with this

    same issues remain...run and test your code, don't just change one thing and re-post it..

    test test test!

    Lowell (4/4/2013)


    ok then, here's two hints:

    1. your final SELECT belongs outside of the loop,...

    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: Prevent DDL Triggers from disabling

    vivekkannan.k (4/4/2013)


    thx Lowell 🙂

    yes u r correct, users have Sysadmin permission .

    Is there any way to Audit the Changes (delete , disable) on DDL Triggers .

    The sys.triggers table has...

    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: Column name or number of supplied values?

    there's a VALUES command hanging out there, and the column names should not be in single quotes;

    create table PendingIO (

    [database] varchar (100),

    Physical_name varchar (100),

    io_pending int,

    io_pending_ms_ticks int,

    io_type varchar (20),

    num_of_reads int,

    num_of_writes int,...

    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: I need answer for this can anyone help me with this

    ok then, here's two hints:

    1. your final SELECt belongs outside of the loop, not inside.

    2. your final SELECT command with the Department and SUM() should not reference any @variables whatsoever.

    if...

    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: Sp_msforeachdb syntax error

    looks like an incomplete paste from your actual source? can you edit and put the whole command that is failing?

    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: Prevent DDL Triggers from disabling

    only a sysadmin can disable the triggers, so as long as only you have sysadmin permissions, it's not a problem.

    if other people have sysadmin,and you want to prevent them from...

    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: I need answer for this can anyone help me with this

    you are grouping by a variable instead of the column from the temp table.

    this is not allowed:

    GROUP BY @Department

    there is no need for a cursor in the operation 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: How to create explain in sql

    sudarshanpatil6060 (4/4/2013)


    explain for as select statement....

    explain for select * from employees

    we also provide oracle,sql training http://oracletrainingpune.blogspot.in

    posts like this make me want to cry.

    you offer training, but seem to be asking...

    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: Sql Server 2008 Generate Script Process

    also, the If Not Exists is a scripting option.

    you can set it yourself, so that from whenenver you change the setting, it scripts the objects out as dynamic sql with...

    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: Linked server

    the mere existence of linked servers will not affect anything; it's the same as your phone having my number, and my phone having yours; they are independent.

    now if you try...

    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: CHAR(10) sometimes work

    how are you determining it doesn't display right on some servers but not other servers?

    the data will have the control characters no matter what in them, 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: i need the max length value of every column in every table in a database

    I believe he means a single query, getting all the max lens in one query:

    SELECt

    Max(len(col1)) As m1,

    Max(len(col2)) As m2,

    Max(len(col3)) As m3

    FROM yourTable

    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: drop and add all FKs in the database

    i missed the truncating the table part.

    there's a lot of script contributions, it looks like, that do exactly that.

    some of them are scripts that ASSUME your foreign key is on...

    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: drop and add all FKs in the database

    i would consider disabling and re-enabling them instead; either way it's effectively the same thing:

    select

    'ALTER TABLE '

    + QUOTENAME(schema_name(schema_id))

    + '.'

    + quotename(name)

    + ' NOCHECK CONSTRAINT ALL' 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: Audit Trail

    from the way it sounds, a trigger sounds like the solution, especially if you need to know WHAT was changed by the stray process/program.

    Since the Application Name and the Whostname...

    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 - 3,751 through 3,765 (of 13,460 total)