Forum Replies Created

Viewing 15 posts - 5,116 through 5,130 (of 5,590 total)

  • RE: Executing Dynamic SQL with input of dynamic parameter?

    Dave, you are actually pretty close.

    Instead of using EXEC(), use sp_executesql. This will allow you to pass in the appropriate parameter also - see BOL for how to do this.

    In...

  • RE: Executing Dynamic SQL with input of dynamic parameter?

    Dave Ballantyne (7/1/2009)


    My personal option would be

    DECLARE @Date1 DATETIME, @Date2 DATETIME, @Date3 DATETIME, @Date4 DATETIME

    SET @Date1 = '1991/06/01'

    SET @Date2 = '1991/06/29'

    SET @Date3 = '1991/08/01'

    SET @Date4 = '1991/09/04'

    ;with CteDates(Dates) as

    This...

  • RE: Intellisense for sql 2005 is needed

    GilaMonster (7/1/2009)


    WayneS (7/1/2009)


    Which brings up some questions:

    1. What difference does it make what version a server is on for Intellisense to work?

    Valid T-SQL constructs.

    Good point Gail. So much of what...

  • RE: Query Issue

    raghu (7/1/2009)


    Update Requests

    Set ER.[Part] = SUM(CAST(PT.[PREM] AS money)*Cred.CreditSigned / 100)

    FROM Requests ER JOIN tblBuyinPtB Pt

    ON ER.[SSN] = PT.[BOSSN] JOIN dbo.tblCredit Cred

    ON ...

  • RE: What is the Best Way to Test SQL?

    GSquared (7/1/2009)


    On the subject of knowing .NET and T-SQL, I have to say that I know enough VB.NET to be able to read it, and enough C# to recognize it,...

  • RE: Intellisense for sql 2005 is needed

    GilaMonster (7/1/2009)


    The only way I know is buying something like SQLPrompt (Redgate). There's no built-in intellisense in SQL 2005 and the intellisense built into SQL 2008 only works when connected...

  • RE: Generating Insert Statements

    Chris Howarth (7/1/2009)


    Nice idea.

    An alternative is to use SSMS 2008's in-built data scripting functionality:

    http://www.sqlskills.com/BLOGS/PAUL/post/Scripting-schema-AND-data-with-SSMS-in-SQL-2008.aspx

    Chris

    I just love it when I start the day off learning something new. With this link, and...

  • RE: Script to get notify when opentransactions running more than 30 seconds

    vinaykumar.bommareddy (6/30/2009)


    Hi,

    i want script to notify when any opentransctions running more than 30 seconds.

    I'd suggest setting up an alert.

    Under Object, select :Transactions

    Under Counter, select Longest Transaction Running Time

    Under Alert if...

  • RE: Help me for insert on query please

    Nardig (6/30/2009)


    Yes the text file looks like this

    1,'John','Smith','Washington'

    2,'Nick','Smith','London'

    3,'blabla','blabla','blaa'

    .

    .

    .

    this text contains 1200 records

    Check out Books-Online (BOL) for "BULK INSERT". If your destination table has additional columns, you may need a format...

  • RE: Raw count for all tables in databsae

    SimonH (6/30/2009)


    IF EXISTS( SELECT [name] from tempdb..sysObjects WHERE [name] ='#Store' and xtype ='U')

    BEGIN

    DROP TABLE #Store

    END

    Simon,

    Just as an FYI, this is not the correct way to check for a temp table....

  • RE: Raw count for all tables in databsae

    arun.sas (6/30/2009)


    pat (6/30/2009)


    how can i get report to get row count for all tables in database

    Hi,

    Try Another method

    USE DB

    GO

    SELECT

    a.name, object_name (i.id) TableName, rows as RowCnt

    FROM sysindexes i INNER JOIN sysobjects...

  • RE: Are the posted questions getting worse?

    Gianluca Sartori (6/30/2009)


    ... and tomorrow I'm taking my wife to the hospital for the birth of my first daughter: I think I'll be even busier from now on!!

    Congratulations! I...

  • RE: Are the posted questions getting worse?

    Florian Reischl (6/30/2009)


    WayneS (6/30/2009)


    Florian Reischl (6/30/2009)If you have any questions, feel free :-). .NET development is the main part of my job.

    My sympathies are extended to you...

    I'm not sure if...

  • RE: Are the posted questions getting worse?

    Florian Reischl (6/30/2009)[hrIf you have any questions, feel free :-). .NET development is the main part of my job.

    My sympathies are extended to you...

  • RE: Are the posted questions getting worse?

    Paul White (6/30/2009)


    WayneS (6/29/2009)


    Hey gang... I'm looking to take "She who must be obeyed" (in this case, both my wife and mother... )

    When I first read that, it sounded like...

Viewing 15 posts - 5,116 through 5,130 (of 5,590 total)