Forum Replies Created

Viewing 15 posts - 571 through 585 (of 1,347 total)

  • RE: what is wrong with parameter stored procedure.

    Your "fix with a single quote" is not a fix and introduces another bug.

    The root problem is this line:

    @moduleName  ='Part I'

    It should be

    SET @moduleName  ='Part I'

  • RE: what is wrong with parameter stored procedure.

    You are missing parentheses around the parameters:

    CREATE PROCEDURE [dbo].[get_phy_list]  (

     @DateFrom datetime,

     @DateTo datetime,

     @mName varchar(50) =null

     )

    AS

  • RE: Is Transcender Exam Wrong?

    I agree, the answer is technically incorrect without the cast.

    The syntax with the cast is below. This runs in my Northwind with no errors:

    SELECT   

        ProductName,

        UnitsInStock,

        CASE...

  • RE: Is Count(*) faster than count(1)

    As long as there is no WHERE clause on your query, then all 4 should produce the same execution plan and execute in the same time.

    The plan will most likely...

  • RE: Is Transcender Exam Wrong?

    ReorderLevel =

        CASE

        WHEN ReorderLevel IS NOT NULL THEN ReorderLevel

        ELSE 'Not Specified'

        END

    The "Reorderlevel" in red font is the alias. This is old-style...

  • RE: Is Transcender Exam Wrong?

    What was the question ?

    Technically it is incorrect and needs to CAST() the ReOrderLevel so that the same column can hold numbers and 'Not Specified'.

    Depends on what the question was...

  • RE: Duplicating tables with TSQL

    Write SQL to generate SQL:

    SELECT 'SELECT * INTO ' + name + '_Copy FROM ' + name + ' WHERE 0 = 1'

    FROM sysobjects

    WHERE type = 'U'

    Take the output of...

  • RE: Returning Two different values from join

    You need to join to the table twice, assigning aliases to differentiate each instance of the table:

    Select

      Contact.FirstName  AS 'PersonCalling',

      [Case].CreatedById,

      [UserC].FirstName  as 'OpenedBy',

      [Case].OwnerId,

      [UserA].FirstName  as 'AssignedTo'

    FROM [Case]

    INNER...

  • RE: Query producing Dups

    The date was your clue that it was the table containing the date that you should look at.

    The date column in the resultset was pd.OnHold

    If you are still joining to...

  • RE: How to Connect To Oracle 9i

    Do you have an Oracle DBA that can help you ?

    I've only worked with Oracle 7 & 8 connected to Sql Server, but I don't even try any SQL connectivity...

  • RE: How to Connect To Oracle 9i

    What have you tried so far ?

    Can you TNSPing the Oracle instance you're trying to connect to ?

    Have you read the BOL example code under the sp_addlinkedserver topic:

    C. Use the...
  • RE: Refrence Input Param-Brain Farting I suppose

    Behind the scenes, any table prefixed with '#' is decorated with additional connection /session data to make it unique.

    If you are concerned about scope, you could also use a table-type...

  • RE: TSQL - Minimum of numeric value

    Insufficient info, based on your sample data.

    eg: Data value  'AFGBS004SA55'

    Is that the number 4 ? Or 55 ? or 455 ? What are the requirements/rules for parsing a value with...

  • RE: Refrence Input Param-Brain Farting I suppose

    You have to declare a table or temp table that matches the columns in the resultset, then use INSERT INTO.

    eg:

    CREATE TABLE #Temp ( {Your column list goes here} )

    INSERT INTO...

  • RE: Refrence Input Param-Brain Farting I suppose

    >>Do you have a recomendation on how to do pagination in a stored proc. 

    It depends on what you have available, in terms of data and version of Sql Server.

    If you're...

Viewing 15 posts - 571 through 585 (of 1,347 total)