Forum Replies Created

Viewing 15 posts - 1,126 through 1,140 (of 13,460 total)

  • RE: Accessing Reports via Server Name

    is there a specific error? what if you try https?

    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: Server Trigger for RESTORE_DATABASE

    Mel Lusk (4/15/2016)


    You can't use DML triggers on a system table....

    https://technet.microsoft.com/en-us/library/ms187834(v=sql.105).aspx

    old thread from six years ago...

    the msdb object mentioned msdb.dbo.restorehistory is not a system object; adding a trigger 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: Using local ssd for tempdb cant add files

    since this is on a cluster, pretty sure you cannot use local disks to each box, regardless of whether they are SSD's or not ; only drives that are shared...

    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 variable with USE command

    is it accessing metadata, like sys.tables and stuff,so you KNOW the object sit access exist in ALL databases, or is it assuming that specific tables exist int he database you...

    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 get a multi user table created without DBA involved?

    the public role has access to tempdb, so you could create a semi-permanent table that would exist until the sql service was stopped and started/server rebooted, by creating...

    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: Finding a value by interpolation

    not sure if this is what you are after, this was my first guess

    /*--Results

    ClosestUnder ClosestOver

    20 25

    */

    ;WITH MyCTE([Code],[Number],[Value])

    AS

    (

    SELECT '5',convert(float,'10.00'),convert(money,'1.9201') 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!

  • RE: Need to dynamically add grouping based on username

    did you try the query at 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!

  • RE: System databases not backing up

    i just made a minor change and tested, i got this error because the directory structure is not there yet, could that be it?

    Msg 50000, Level 16, State 1, Procedure...

    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 to dynamically add grouping based on username

    yeah, i think my sum case will do exactly that for you.

    what does this return? does it look right?

    SELECT

    USERNAME as [User Name],

    SUM(CASE WHEN [Status_Type] =...

    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: find date value from file name

    if you look at it the other way, are the last eight characters of the file name always a correctly formatted datestring?

    so it-doesn-t-matter-about-dashes04122016.txt? can get me the right values with...

    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 to dynamically add grouping based on username

    I'm thinking you'll need to group by your username, and maybe some other columns, and use the SUM(CASE trick to count the items meeting your criteria.

    my first guess , based...

    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: Msg 102, Incorrect syntax near ')'

    prachiverma10 (4/12/2016)


    @Lowell, Thank you so much for your help. I did miss to end the if statement.

    Regarding the other issue you pointed out, can you give an example in what...

    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: Msg 102, Incorrect syntax near ')'

    prachiverma10 (4/11/2016)


    I have created a trigger, which after getting the inserted values in variables tries to insert in another table.

    following is the insert query which is giving error.

    insert into tblDoctorPatient...

    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: Opinions on triggers

    another reason to avoid them: Linq To SQL and Entity Framework side affects.

    we just had an issue with transactions rolling back without any SQL error;

    the issue was a linq 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: How to convert this procedure as dynamic SQL

    changing this to dynamic sql implies you need to do the exact same thing, but maybe to other tables with identical structure;

    i don't see anything in the procedure that seems...

    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 - 1,126 through 1,140 (of 13,460 total)