Forum Replies Created

Viewing 15 posts - 2,356 through 2,370 (of 2,462 total)

  • RE: Exercises in t-SQL

    For the crowd you describe I think the SQL tutorial at W3Schools is a good start (my 2ยข). Like Jeff mentioned they have a "Try it yourself" section and they...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: html from sql server 2K8R2

    eugene.pipko (11/27/2012)


    Thanks, what if I need to change font-weight at <tr> level?

    How do I access <tr>?

    The top row (the first instance of the TR tag) you could add any attributes...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Configuring Replication in 2012

    jjolk (11/21/2012)


    I know I'm missing something obvious, but I'm trying to learn about Replication and all the documentation I read says to right click on the "Replication" node in SSMS...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: html from sql server 2K8R2

    eugene.pipko (11/19/2012)


    Thank you for reply,

    So, for every <td>, if I need to change an attribute, I'd need to select 'td/@style' = ......?

    Thanks,

    Yes.

    P.S. W3Schools is the best place to go...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Optimization Techniques

    karthik M (11/26/2012)


    All,

    what are all the new "Optimization Techniques" available in SQL 2012 which is not available in SQL 2008?

    On the new T-SQL optimization I highly recomend Microsoft SQL Server...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: How to do a full copy of a database onto the same server with a different name

    jarid.lawson (11/26/2012)


    Glad I posted this, because my brilliant idea caused the system to crash.

    I tried the Tasks > Copy Database option. I made it most of the way through, but...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: How to do a full copy of a database onto the same server with a different name

    Backup/Restore is best.

    You can also do a copy by: right-click your db >> Tasks >> Copy Database then go through the wizard.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Replication data out of sync

    Guras (11/26/2012)


    It is a transactional replication. It is strange that I cannot find that job in my SQL Agent job list.

    The agent job will be running whereever the job is...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Replication data out of sync

    Guras (11/26/2012)


    Unfortunately we are in the prod.

    First, I concur with MyDoggieJessie - check for filters, check the agent job to see if it is running without error...

    I don't know...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Replication data out of sync

    Guras (11/26/2012)


    I re ran the agent but still the rows are mising in the subscriber.

    I going to assume we're not in Prod...

    If the snapshot agent ran correctly your tables should...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Replication data out of sync

    You can accomplish this by re-running the snapshot agent for that subscription.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Help in writing a statement

    Based on the info provided:

    -- This table has the name of every department

    DECLARE @dept TABLE (

    deptNbr int primary key,

    department varchar(10) NOT NULL );

    -- This is where department goals are...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Split a String

    -- place to test the insert

    DECLARE @targetTable TABLE (val1 varchar(30), val2 varchar(30));

    -- the value fed to your query

    DECLARE @splitMe varchar(40) = '9279-1^Respiratory Rate^LOINC';

    ;WITH x(a,b) AS

    (SELECTLEFT(@splitMe, CHARINDEX('^',@splitMe)-1),

    RIGHT(@splitMe, LEN(@splitMe)-CHARINDEX('^',@splitMe))

    )

    INSERT...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Optimization of stored procedures

    If by "slows down the entire database" you mean that running these reports slows down other, non-reporting activity then my advise would be to do what Eugene was saying: consider...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Query Help

    Lokesh Vij (10/10/2012)


    This query would give the best performance from all the queries posted above ๐Ÿ™‚

    SELECT dtStartDate,

    (SELECT Max(dtRunDate)

    ...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 15 posts - 2,356 through 2,370 (of 2,462 total)