Forum Replies Created

Viewing 15 posts - 4,996 through 5,010 (of 13,460 total)

  • RE: Database Mail XPs disabled so can't send mail!

    Scott D. Jacobson (8/9/2012)


    do you have to do this in TSQL?

    I think Lowell's right here. There are an infinite number of solutions to this problem that don't involve...

    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: Trigger to rollback if no PK assigned

    interesting requirement;

    i just tested this trigger as both ON DATABASE and ON ALL SERVER, and it worked fine in my brief testing;

    i was able to create temp tables without 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: Database Mail XPs disabled so can't send mail!

    parameters for a vbs file are limited in size for the command line...4096 chars max length, i think, right?

    so while you could send parameters to teh fiel (no spaces allowed...

    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: T-sql Via Linked server - MySQL

    i think you can do it like this?

    EXECUTE ( 'TRUNCATE TABLE SalesTable' ) AT MyLinkedServer;

    that code example is how i can calla CREATE TABLE command at a remote, 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: "Per-user" temp table

    a couple of other possibilities;

    create lots of global temp tables, with a naming convention like #temp_51 (dynamic SQL = 'CREATE TABLE #tmp_' + CONVERT(varchar,@@spid) )

    then in your procs, you'd have...

    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 XPs disabled so can't send mail!

    database mail is disabled, but xp_cmdShell is enabled?

    that is so backward security wise.

    did you try the process you outlined here and sent something to yourself? did it work?

    let me help...

    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: procedure started taking longer time to retrieve data in last two days

    OK some fresh thoughts this morning.

    you should be able to :

    SELECT

    @BeginMeasure MIN(BeginMeasure ),

    @EndMeasure = MAX(EndMeasure)

    FROM #RptParms

    then you can use the logic i posted previously; you'll...

    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: Unable to get a case statement to accept a Like operator

    Donalith (8/8/2012)


    lol.. That's why I asked, Lowell. If it's done in memory I was wondering if the internal mechanics of string comparison using LIKE would out-perform the substring-string comparison or...

    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: Unable to get a case statement to accept a Like operator

    Donalith there would be some performance hit, yes:

    if there is an index on APImport.Description, then the LIKE can use the index to find the value(s) that match.

    by getting 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: procedure started taking longer time to retrieve data in last two days

    if you do that, then all 146K rows in

    EDWGEARS...VW_FRED_AADT_HIST will get copied over to tempdb, adn then the join will occur.

    I'm thinking that's the best solution: get 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: Unable to get a case statement to accept a Like operator

    it's syntax;

    it's like this:

    Warranty1 = (

    Case

    When APImport.Description like 'Enduro%'

    then (DateAdd(year,1,APImport.DateShipped))

    ELSE NULL

    End)

    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: Triggers

    testing testing testing.

    that's the key.

    here's your updated script; i can insert 'josh' multiple times.

    DROP TABLE TestUniqueNulls

    CREATE TABLE TestUniqueNulls

    (RowID int IDENTITY NOT NULL,

    NoDupName varchar(20) NULL)

    GO

    Create Trigger NoDuplicates

    On TestUniqueNulls

    After Insert,...

    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: Default SA password

    much easier to just reset teh password, i think

    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: Triggers

    ok, i corrected your alias problems, but not the logic.

    here's the test code; try it, and see the error you get when inserting the second row:

    CREATE TABLE TestUniqueNulls

    (RowID int IDENTITY...

    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: Changing Properities of a Linked Server

    i'm pretty sure you have to to drop and recreate the linked server;

    i'd script the linked server out and change the script.

    I'm not much of a GUI kind 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 - 4,996 through 5,010 (of 13,460 total)