Forum Replies Created

Viewing 15 posts - 10,471 through 10,485 (of 13,460 total)

  • RE: Delete Duplicates from table with no identity column

    it's the actual physical address: i think the format is [file_id]:[page_id]:[slot_id], so it's the true physical address on your server;

    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: Delete Duplicates from table with no identity column

    ar-727381 (9/25/2009)


    i already have this table created. i just gave you the top few rows of it. I dont think i can update the table with %%LockRes%%

    so will...

    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: Delete Duplicates from table with no identity column

    ok here's a 2005 secret: there is a hidden row identifier in every table row named %%LockRes%%,

    in 2008 they renamed the identifier to %%physloc%%

    you can use that as part 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: Make a backup of SQL Server tables............

    as you know SQL backs up whole databases, so your options are:

    -- a not "real" SQl backup: send the DDL and the data to a text file via BCP, 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: Email script

    yes...because the test is HAVING COUNT(RT_MCP_Alarm_Text) >= 1, it probably sends for testing purposes...change it back to 30, and it won't until you finally have 30 or more messages 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: Email script

    that looks more like an error from running the script on the wrong database.

    if the original SQL you pasted was valid, the rest should be valid too...

    what you pasted is...

    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: Email script

    brian yes, that is exactly how i would do it;

    to test it, simply run the sql inside the EXISTS() portion....it probably returns nothing, so change the HAVING to1 instead...

    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: Email script

    i know it's kind of repetitive, but htis is how i've done it...use an exists to test for the condition, then the query to build the email, same as you've...

    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: INSERT performance

    BCP or BULK INSERT are a couple orders of magnitude faster than getting the data from a linked server; is that how you are getting the data from 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: Search for string in stored procedures excluding comments

    just noticed that you posted in a 2000 forum: the solutions is still the same, just a different table to get the data, plus you will be handicapped because syscomments...

    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: Search for string in stored procedures excluding comments

    Chuck's idea got me thinking....his requirement obviously was more expansive, but i justed tested this solution below, and it strips out all the comments; so if you use the results...

    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: Conditional delete

    ok, again, if you had provided the full DDL of the tables and sample data, this would have been easier...i think you changed from id_Member being an int to being...

    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: Conditional delete

    to clarify, if the above SELECT returns a row, you were allowed to delete the member, if it does not, noone would be deleted.

    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: Conditional delete

    i kinda need some sample data to see if i have the logic down right;

    ok, here is how i would do it:

    i have a sub select below of every "admin"...

    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: Conditional delete

    SQL server handles concurrency for you automatically, even if your two users were to try to delete each other at the EXACT same millisecond, SQL will determine that one 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!

Viewing 15 posts - 10,471 through 10,485 (of 13,460 total)