Forum Replies Created

Viewing 15 posts - 7,156 through 7,170 (of 13,460 total)

  • RE: DDL Trigger to prevent dropping of a specific table?

    upstart (7/14/2011)


    ... either covered their tracks really, really well or our default 'black box' trace for some reason did not capture anything regarding it....

    In my career I've seen mostly careless...

    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 LTRIM on a column within a derived table

    the trimmed field needs to be aliased...same as if you did a min or max, for example.

    SELECT DISTINCT

    T2.Number

    FROM table1 AS T1

    INNER JOIN (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: DDL Trigger to prevent dropping of a specific table?

    don't know if you use other schemas than the default dbo, but this slight modification to the model prevents dbl.tblBananas from being dropped, but not TestSchema.tblBananas; probably a good enhancement...

    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: Truncation of a float field when copying

    scoleman_cambridge (7/14/2011)


    I can manage to do a straight import from 1 dbs to another dbs without truncating data, but if I try to copy the data to another table in...

    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 check image is exist in table

    i've done something like this with putting icons in a database, and i get a CRC value from vb.NET,and store it along with the varbinary(max) in the row;

    it seemed 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: DDL Trigger to prevent dropping of a specific table?

    yes.

    i just created and tested this trigger as a prototype.

    i've created 4 tables, and tried to delete them, only one is successful, the others raise the expected error.

    CREATE TRIGGER [TR_ProtectCriticalTables]

    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: Truncation of a float field when copying

    well good we eliminated that as being a possible issue.

    how is the data being migrated from source to destination?

    Somewhere in that process, it seems, would be the issue.

    is it 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: Truncation of a float field when copying

    what's the datatype of the destination table?

    if the destination is INT or DECIMAL(10,0) you would loose everything to the right of the decimal point due to implicit conversions.

    the minimum size...

    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: calling stored procedure in a cursor

    lots of stuff doesn't look right here.

    if you EVER call that proc more than once, it will fail because it creates a permenant table, but never drops it.

    depending on how...

    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: calling stored procedure in a cursor

    anjaliv (7/13/2011)


    Lowell's solution worked. Thank you!

    I am creating a table in a stored procedure I have written. But when I call it from the above query, it returns an error...

    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: xp_sendmail not sending @message text

    are you concatenating strings, and one of them is null?

    you know the old SET @string = Firstname + ' ' + LastName,

    where ofirstname might be null or something?

    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: Strange performance problems

    that's good news! i was also either a hardware /100%CPU pegged issue, or thinking maybe somebody dropped the indexes in the database, if everything was running slow would be 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: calling stored procedure in a cursor

    well it depends on your proc whether will work correctly or not, but you can call the proc via a 3 part naming convention, and explicitly naming the database 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: Strange performance problems

    the general, wave of the hand, "it's all slow" is really hard to pin down.

    One of the first places i'd look is statistics. updating at a minimum the statsitics 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: Missing Index Hints is...missing.

    if that server has the SSMS tools installed with SQL 2005, you'll see that issue;

    it's the GUI that decides to show the missing indexes, even though they might actually exist...

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