Forum Replies Created

Viewing 15 posts - 16 through 30 (of 79 total)

  • RE: T-SQL Variable vs String Equivalent

    Hi SQL Padawan,

    I coded up your example to explain the difference between estimated execution plans and actual I/O statistics.

    Both of your statements use the idx_field_value in the query plan.

    In my...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: SQL Server Agent 2012 - Slow on startup and closure

    Definitely a VM hypervisor issue.

    I would do a google search. Maybe post under a VM / SQL forum.

    We use hyper-v for test boxes only. Do not...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: elegant strategies for complex update statements?

    http://craftydba.com/?attachment_id=5149

    Hi SQL Guy,

    Unless you try the sample code that I gave you, we really do not know what you are trying to do.

    I updated table A to have two records....

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: elegant strategies for complex update statements?

    Again, real data would help me help you!

    Here is a shot in the dark, table #a has a one-to-one relationship with table #b. Update work fine!

    create table #a

    (

    DomainName1 varchar(25),

    OfficeName1...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: SQL Server Agent 2012 - Slow on startup and closure

    The sql server agent job runs under the credentials of the service account.

    Question 1 - Do you have the same performance issue when logging into SSMS using that account?

    The min...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: elegant strategies for complex update statements?

    Hi SQL Guy,

    Please post a sample structure for the two tables with some sample data.

    This will help us determine what is wrong with the TSQL.

    Thanks

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: Odd behaviour from sys.dependencies

    Cool beans, some type of memory issue.

    Do you have regular alerting and operators defined on the box so that you get error messages?

    We use SQL Sentry Monitor but...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: Converting to Float in ssis

    I am intermediate SSIS programmer, but it looks like a data conversion issue to me.

    If column 188 is a numeric, you have strings mixed into the equation.

    [Column 188] == "...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: Diff b/w Temp tables varibles and CTE's

    I have a whole presentation with TSQL examples on temporary objects.

    Coverage:

    1 – Derived tables.

    2 – Local temporary tables.

    3 – Global temporary tables.

    4 – Table variables.

    5 – Common Table Expressions (CTE).

    6...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: Odd behaviour from sys.dependencies

    Hi JJ,

    I have two comments to your issue.

    1 - I had to look up this dm on books on line since I never used it. The sample from BOL...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: elegant strategies for complex update statements?

    It all depends on the situation.

    Stay away from Cursors if the data set is large since they are inherently slow.

    Sometimes, Extract, Translate, and Load (ETL) programmers will create a patch...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: CHAR(10) sometimes work

    There are two different ways to display query results in the SQL Server Management Studio (SSMS) - text or grid view. Per the previous post, they act differently.

    I guess...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: Get the one set of values from the same table

    Hi Gunjan,

    There are at least two ways to do this.

    The script below creates a sample database named TEST with a table called MY_SHIPPING.

    I loaded the table with your sample data.

    First...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: retrieve records by joining history table

    Hi There,

    I think you will find this script to solve your problem. It creates a sample database called TEST with two tables named MY_MASTER & MY_STATUS_HISTORY.

    Both these tables were...

    John Miner
    Crafty DBA
    www.craftydba.com

  • RE: Bulk insert in procedure. Use of quotes for variables

    It all has to do about strings ... And what is truely a string?

    First example does not have quotes in the string.

    -- Simple string

    DECLARE @X VARCHAR(128);

    SET @X = 'A...

    John Miner
    Crafty DBA
    www.craftydba.com

Viewing 15 posts - 16 through 30 (of 79 total)