Forum Replies Created

Viewing 15 posts - 751 through 765 (of 13,460 total)

  • RE: How to imbed an image into an email sent by dbmail

    you should start a new thread to get a bit better help;

    however, here's a decent framework to start with.

    the email portion is the easiest part, really.

    the only thing you need...

    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: Need Help with sending email only when result fetches atleast one record

    here's an example of your code.

    your example has no where statement. which doesn't make sense to me, you'd want to filter on a table,a nd send if there is data.

    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: Need Help with sending email only when result fetches atleast one record

    i always insert into a temp table,and then check if exists:

    SELECT *

    INTO #temp

    FROM [AdventureWorks].[Sales].[SpecialOffer]WHERE SomeFilterOrColumn =SomeValue

    IF EXISTS(SELECT * FROM temp)

    BEGIN

    --all the email logic you had previously

    --but FORXML select 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!

  • RE: How to imbed an image into an email sent by dbmail

    Reconsider the tool to use for your project;

    This post started out with "how to include an image in sp_send_dbmail".

    certainly possible, but is the right tool for your specific question...

    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: User defined database role

    I tend do do commands like this in a script rather than the GUI;

    my example script would look something like this:

    CREATE ROLE DevelopersReadWrite;

    GRANT VIEW...

    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: Options for auditing SQL logins

    DataAnalyst011 (12/16/2016)


    Do you mind if I ask one more question? Obviously your code works and mine didn't. However, do you use the @@ROWCOUNT method because it is faster? I've pretty...

    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: Options for auditing SQL logins

    i would handle the upsert like this:

    also, i think you granted INSERT to public, but you did not grant UPDATE or SELECT to public, so that is a point 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: Complicated INT Conversion to DECIMAL - No, Really

    a case statement is going to lock you into one datatype, so i would simply use money(= Decimal18,4)

    and do the math in a case statement;

    wouldn't something like this do 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: DB Growth Report weekly for all servers

    since you have CMS set up, I would use a powershell script to poll each CMS server, and insert data into a centralized table.

    then you could generate an SSRS report...

    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: Deleting files from backup drive

    the example here:

    http://ss64.com/nt/syntax-delolder.html

    is so close to your version, i'm not sure there's an issue:

    the only thing i see is that the example uses slashes instead of hypens for 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: query to find out duplicate records in different databases

    mcfarlandparkway (12/16/2016)


    I want to exclude one column from select list how to do this?

    Column is empname(need to exclude from selct *)

    my example contained the word [ColumnList] as a placeholder for...

    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 Process only the "Latest" file based on name

    Phil Parkin (12/16/2016)


    Glad you solved it. Not sure whether you know this, but if you add

    using System.IO;

    into your Using block (towards the top of your code module)

    it allows you to...

    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: query to find out duplicate records in different databases

    mcfarlandparkway (12/16/2016)


    All the column data should be same in all 7 databases. - basically select *..from table

    do we need to use intersect?

    you said find duplicates in the first post.

    INTERSECT finds...

    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: Options for auditing SQL logins

    i always put my audit table in the master database, since it is guaranteed to exist, and all logins inherit some access to it.

    someone already mentioned the three part 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: query to find out duplicate records in different databases

    it depends on what you define as a duplicate; a few columns, or every column, including identities and CreatedDates?

    also, is a duplicate in two databases, or must be in ALL...

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