Forum Replies Created

Viewing 15 posts - 6,856 through 6,870 (of 8,760 total)

  • RE: update table from variable table column

    You are more or less there, here is a run-able self explanetory example

    😎

    USE tempdb;

    GO

    CREATE TABLE dbo.TBL_TO_UPDATE

    (

    TTU_ID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED...

  • RE: sp_trace_setstatus

    Quick suggestion which doesn't use a cursor and also avoids touching the default trace which cannot be altered via the procedure. The @status = 0 turns them off, 1 turns...

  • RE: Long running MERGE

    Luis Cazares (10/6/2014)


    Not sure if I can call it luck. The one in charge of this process decided to remove the MERGE and use a combination of update and insert...

  • RE: Are the posted questions getting worse?

    GilaMonster (10/6/2014)


    Eirikur Eiriksson (10/4/2014)


    Is it just me or does this smell like a spam? A quick search returned few similar postings referencing the same vendor on other sites.

    😎

    It's the same...

  • RE: Drop Temp Tables from INFORMATION_SCHEMA.TABLES

    bpowers (10/6/2014)


    That was it Thanks so much! Any idea how I can run this across three test databases in one piece of code?

    Quick suggestion

    😎

    DECLARE @DB TABLE(DBNAME NVARCHAR(128));

    INSERT INTO @DB(DBNAME)

    VALUES (N'DB_1'),(N'DB_2'),(N'DB3');

    DECLARE...

  • RE: Xquery

    Here is a quick solution, more for prototyping but it works

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    GO

    DECLARE @TXML XML = '<EventOne Date="09/22/2014" ID="12196996" InternalEventOneID="96436969" xmlns:reslib="urn:reslib">

    <EventOneDate>09/22/2014</EventOneDate>

    <TimestampCreate>09/22/2014 11:37:06:413</TimestampCreate>

    <Comment>Comment One!!</Comment>

    <EventZ EventID="834033" EventHistoryID="375381" InternalEventID="4843699" InternalHistoryID="17082526">

    <EventType Word="PLAD">One</EventType>

    </EventZ>

    <EventOne...

  • RE: First database design (looking for reviews)

    Quick first notes (there will be more):

    😎

    "Users"

    1. What attribute or collection of attributes uniquely identifies each user?

    2. Users cannot have middle or additional names?

    3. Full name should be a...

  • RE: How to show rows in column

    punnaiah.pendyala (10/5/2014)


    Hi

    Use this

    select min(wan),max(wan),subscriber from retail group by subscriber having count(*)>1

    Will not work if the earlier wan is higher than the later wan as noted in the previous posts.

    😎

  • RE: How to show rows in column

    The assumption made in the code was that the WAN values would be in an increasing order, as that's correct according to the last sample, one has to add a...

  • RE: Drop Temp Tables from INFORMATION_SCHEMA.TABLES

    Quick thought, if the table/object is not in either the user's default schema or in the dbo schema, the reference to the table must be fully schema qualified

    😎

    (Changes in bold)

    DECLARE...

  • RE: OUTPUT in Stored Proc

    Quick thought, the output parameter must be declared with the output keyword

    😎

    ALTER PROCEDURE [dbo].[spTelling]

    (

    @scannummer Nvarchar(13)-- input only

    @myOutputParam INT OUTPUT -- output parameter

    )

    AS

    BEGIN

    Then the keyword is used...

  • RE: How Many Different Random Numbers?

    TomThomson (9/30/2014)


    Eirikur Eiriksson (9/30/2014)


    Sounds like a contradiction, an event which in it self cannot be considered random just because we do not comprehend the causes, resulting in another event (for...

  • RE: Conversion of varchar to datetime

    ramana3327 (10/5/2014)


    It is showing try_parse is not a recognized built-in function

    What is the output of

    SELECT @@VERSION

    on your system?

    😎

  • RE: What is the Powershell warning and How to get rid of this Warning??

    SQL-DBA-01 (10/5/2014)


    WARNING: Failed to load the 'SQLAS' extension: An exception occurred in SMO while trying to manage a service. --> Failed to retrieve data for this request. --> Invalid class

    This...

  • RE: SSIS (FORLOOP)

    Duplicate post, respond here

    😎

Viewing 15 posts - 6,856 through 6,870 (of 8,760 total)