Forum Replies Created

Viewing 15 posts - 6,301 through 6,315 (of 13,460 total)

  • RE: DDL Database Trigger causes error when Droping Table

    not sure if it's applicable, as I'm not sure of the specific error you were getting, but you have a logging table dbo.changelog;;

    your trigger could potentially fail if 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: Database Mail

    Yes, The example I provided is probably more oriented to developers who need a proof of concept, and the ability to test.

    You wouldn't use GMail in a corporate environment, youd...

    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: Database Mail

    definitely Gmail is possible, and very handy for forum examples here too!

    here's a screenshot of my working Gmail settings for database mail to use as a model:

    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 DMVs

    MyDoggieJessie (11/30/2011)


    Lowell, I have no doubt that the origination of the SQL I posted was derived from this website 🙂

    I've been haunting this place a while, and i never tripped...

    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 DMVs

    I have an amazingly similar HTML report for all objects in a given database.

    here's a link to teh sql file, it's kind of long, but creates similar output;

    it's based off...

    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 compress the tables in a database

    yes, but only with 2008 and above, and i'm not sure if this is an enterprise edition only option. partitioning is certainly Enterrise only, but i think compression is part...

    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 compress the tables in a database

    duplicate post.

    no need to cross post to multiple forums it fractures the answers you get and makes posters duplicate others work.

    the "Recent Posts" link shows us everything.

    continue the thread here:http://www.sqlservercentral.com/Forums/Topic1214220-392-1.aspx

    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: New package that I have to create...HELP?

    you'll need to use the object_id instead of db_id at the table level.

    why are you not saving the tablename? if you drop and recreate a table, it will ahve 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: New package that I have to create...HELP?

    see the post i follwoe dup with...if your destination table expects an int instead of the database name, you had to wrap it with db_id(''?'') instead 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: New package that I have to create...HELP?

    asm1212 (11/30/2011)


    Im sorry I think I confused you...

    The script there is for INSERTING INTO my Tables table...I have already accomplished that...

    Now Im trying to INSERT INTO my Columns table...

    you've never...

    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: BCP - Executing Stored procedure throwing error

    can we see the bcp command?

    lets try to eliminate the simple things, like calling the proc without specifying the database.schema.procname, is it?

    could a copy of the proc exist in 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: New package that I have to create...HELP?

    you just have to modify the script a bit: db_id() function , and 'll let you add your own WHERE statement to skip master/tempdb/model/msdb:

    sp_MSForEachDB 'INSERT INTO SpecificDatabase.dbo.DBTables

    ( DatabaseID ,

    TableName ,

    ColumnCount...

    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: Stored Proc errors for usp_Admin_Delete_Files_By_Date

    it's not obvious.

    the post, instead of having spaces, has CHAR(160)(which looks like a space, but isn't) in it, which prevents you from copy/paste/compile

    i did a find/replace for you, 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: File rename saving as @MyFileNametxt

    your snippet has the string hardcoded, isntead of substituting the variable.

    something like this is what you are after, i think.

    DECLARE @MyFileNametxt varchar(50)

    DECLARE @cmd as varchar(1000)

    set @MyFileNametxt = 'PASS_ASR_ALL_' + CAST(DATEPART(YYYY,...

    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 sort select result with special order and case clause? Thanks.

    with Org(Business_Line)

    AS

    ( SELECT 'Blue' UNION ALL SELECT 'Orange' UNION ALL SELECT 'Others' UNION ALL

    SELECT NULL UNION ALL SELECT 'Yellow' UNION ALL SELECT 'Green' UNION ALL

    SELECT 'Red' UNION ALL 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!

Viewing 15 posts - 6,301 through 6,315 (of 13,460 total)