Forum Replies Created

Viewing 15 posts - 421 through 435 (of 13,460 total)

  • RE: Same query different Execution plan on two different server

    files are actually zip files with a sqlplan extension.

    On Plan1_server1 you can see the estimated and actual number of rows are way off(estimated = 91.2K, actual = 1.8K,...

    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: Hashing column using SHA256

    variable, string OR [COLUMN NAME] of type varchar/nvarchar  is accepted for the parameter!
    so if you choose a column, or the converted value of a column that is NOT 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: Formatting in HTML table

    For the RevenueAmt, if the datatype is MONEY, the convert function has an additional parameter and will insert your commas for you. if it si a decimal, you have 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: Solution to audit login

    I did this once, when we identified that developers were using the application login as their  dev login to do work. I got the management buy in that this should...

    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: Solution to audit login

    As John Mitchell noted in the other thread,,all you can do is reasonably infer the person, based on the IP address or hostname(whihc technically can be spoofed in the connection...

    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: List of scheduled sql jobs

    the first table should be sysjobs, as some jobs may exist but have NEVER been executed,and thus have no history.
    also, the joins should be LEFT JOINs, since jobs could...

    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: Linking instances in a cluster

    Robert, are you talking about each Server in an Always On Availability Group, or a Windows Server Failover Cluster with shared storage and a cluster aware SQL instance?

    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: task => generate script with tool sqlCmd

    I've seen issues like this in the GUI scripting; when you use an older version of SQL Server Management Studio(lets say 2008 or 2012) and are connecting to a higher...

    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: Can't convert minutes to hours after 24 hours

    you could do it as a string representation like this:

    /*--results
    ElapsedString    Days    Hours    Minutes    Seconds    Milliseconds
    3:03:30:11    3    3    30    11    446
    */
    WITH MySampleData
    AS
    (
    SELECT
       [Days]    = datediff(day,0,ET-ST),
       ...

    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: Long running insert

    ok since you are inserting into a table, you do not need the ORDER BY in the end.

    You could fiddle with changing it to use EXISTS 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: How to add comments to your database

    Scott Coleman - Tuesday, July 11, 2017 11:17 AM

    RE: VB vs Java (why not PowerShell?) for managing extended properties.  Why use either?
    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: Moving SQL Server System databases to new drives

    i would think about slicing the new SAN into three drives; two big ones for the SQL stuff for db and logs, and a new,smaller one for the disk-based packages.

    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: BULK Insert + create temperory table at the time of insert

    I've done this with a script task in an SSIS package. it is a good size snippet of code, with lots of caveats.... the end result is exactly what everyone...

    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: Replicate process from excel to sql

    Yes, you'll end up needing  bunch of case statements, one for each column.
    This could also be done int he presentation layer, so for example SSRS could use an expression...

    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: Index Created Date

    With the exceptions of indexes created as part of a primary key or unique constraint, then no. SQL does not save the creation/modify date of indexes. you can get 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!

Viewing 15 posts - 421 through 435 (of 13,460 total)