Forum Replies Created

Viewing 15 posts - 616 through 630 (of 13,460 total)

  • RE: Poweshell script to script out jobs, databases, users, linked servers, logins, roles, alerts, etc from a list of servers

    I'm having some trouble with this running it against a SQL2016 server. just limiting it to one specific issue for now, scripting the definitions for the databases themselves, and not...

    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: Select Into from Linked server

    LTRIM + RTRIM is your problem.
    all those LTRIM + RTRIM force the results to be varchars, regardless of what the original data types are. .
    if the values were...

    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: Select Into from Linked server

    it's true that SELECT INTO will have the datatypes preserved, but it depends on what the source is doing.
    CONVERT functions ,ISNULL, or implicit conversions in a query(due to unions?)...

    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: Invalid length parameter passed to the LEFT or SUBSTRING function. Trying to remove everything after the period

    use a case statement and don't parse it when the period does not exist.

    SELECT MachineName,
    CASE
    WHEN CHARINDEX('.', MachineName) > 0
    ...

    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 Session is stuck at Runnable State - SQL Text INSERT Command

    First, change all those table variables to temp tables.
    The Query engine assumes that a table variable has one row in it, and builds a plan which assumes that one...

    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: SSRS Email Subscription

    also i use this proc to update the job description of SSRS subscriptiosn to have the report name; makes it a LOT easier to track down.
    it uses dynamic SQL...

    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: SSRS Email Subscription

    you could also create a subscription in Standard edition, and use a SQL Agent job to call the subscription job if the criteria is met.

    so assume you create...

    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: Use of CONCAT function in datetime column.

    There's more than one way to do that.
    in my case, the convert function would work nicely, if you include the optional code:
    SELECT CONVERT(varchar(10),getdate,112) , where you replace getdate()...

    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: SSIS There are no usable controls in the group Drag an item onto this text and add it to the toolbox

    wrong toolbox.
    click in the upper right corner here to get the SSIS toolbox 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: Run As Account does not exist on the target system or does not have enough permissions

    LPIM = Lock Pages In memory?

    i had no idea that was a permissions headache, but i found an image!

    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 2012 update statement

    we'd need to see your update and select statements, really.

    does your update inner join to another table?
    a SELECT might return more rows, because the other 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: All mail showing as "unsent" in sysmail_allitems (Database Mail)

    great, now go back to your queries for all mail and the query i posted for failed mail;
    do you see those messages as sent or failed?
    did they...

    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 do I find posts I've made in the forums?

    find your name in the upper right corner and click it.
    basically your profile page then has three links down at the bottom of your picture...
    Topics = Original...

    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: All mail showing as "unsent" in sysmail_allitems (Database Mail)

    the code generated the command to run. I also pasted it in my post for convenience; it's not as familiar looking  as a regular SELECT statement, but it will 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: All mail showing as "unsent" in sysmail_allitems (Database Mail)

    notice the item with 40 rows?
    that's the one that's stuck.

    run teh "ClearQueueCommand" that was in the results:
    WHILE EXISTS(SELECT
         'ExternalMailQueue' AS ServiceBrokerQueueName,
         *
         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!

Viewing 15 posts - 616 through 630 (of 13,460 total)