Forum Replies Created

Viewing 15 posts - 946 through 960 (of 1,124 total)

  • RE: help with sqlcmd

    Use sqlcmd command line utility

  • RE: Service pack query difference

    Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

    Its the service...

  • RE: Optimizing query

    ma (10/31/2007)


    Msg 8159, Level 16, State 1, Line 1

    'RecordHeaderCTE' has fewer columns than were specified in the column list.

    I missed one thing....

    ; WITHRecordHeaderCTE( RowNum, RecordHeaderID, RecordStatus )

    AS

    (

    SELECTROW_NUMBER() OVER( PARTITION BY...

  • RE: Help- (T-SQL)

    If you just want the first 10 characters of the account then use the derived table in the queries.

    SELECT SUBSTRING( Account, 1, 10 ) AS Account, COUNT( * ) NoOfMatches

    FROM...

  • RE: Help- (T-SQL)

    Here it is...

    SELECT T1.Account, T2.NoOfMatches

    FROM Account T1

    INNER JOIN

    (

    SELECT SUBSTRING( Account, 1, 10 ) AS Account,

    COUNT( * ) NoOfMatches

    FROM Account

    GROUP BY SUBSTRING( Account, 1, 10 )

    HAVING...

  • RE: Optimizing query

    You could give a try on this....

    ; WITHRecordHeaderCTE( RowNum, RecordHeaderID, RecordStatus )

    AS

    (

    SELECTROW_NUMBER() OVER( PARTITION BY TypeNo ORDER BY RecordHeaderID ) AS RowNum,

    RecordHeaderID

    FROM(

    SELECTRecordHeaderID, TYPECODE, ( CASE WHEN TYPECODE = 'vinyl' THEN...

  • RE: How do I create a fulltext index on a view?

    You can only create full-text indexes on tables or on indexed views.

    1. Create the view with SCHEMABINDING option.

    2. Create a UNIQUE INDEX on this view.

    3. Create FULL-TEXT INDEX...

  • RE: Cannot create a row of size 8252 which is greater than the allowable maximum of 8060.

    It might be the case that the total length of the entire row (including columns other than there in update) is exceeding the limit.

    Well, in this case you...

  • RE: INSERT Query

    Just a point to make...

    @@IDENTITY and SCOPE_IDENTITY return the last identity value generated in any table in the current session. However, SCOPE_IDENTITY returns the value only within the current scope;...

  • RE: Look for identical column in parallel database

    There are many third party tools available in the market, such as SQL Compare from RedGate, SQLDiff from ApexSQL with 30 day free trial editions...

  • RE: if...else statement...

    A variable can only be declared once within a batch or in a loop. IF...ELSE is a branching statement whereas IIF not a valid statement in SQL but in...

  • RE: Why Does This Return NULL?

    David (10/30/2007)


    '' is being treated as 0. That's the problem when i want one result set for 0 and a different one for ''.

    If it treats the empty string...

  • RE: Update Statement With Incrementing Number

    You can achieve it by using variables in an UPDATE statement like

    DECLARE @Counter INT

    SET @Counter = 0

    UPDATE Table1

    SET @Counter = @Counter + 1, Email = Col1+'.'+Col2+ CAST(@Counter AS VARCHAR(10) )+'@email.com'...

  • RE: SQL Query and .CSV files

    jacob.ostop (10/30/2007)


    I am getting this error

    Msg 8116, Level 16, State 1, Line 13

    Argument data type text is invalid for argument 1 of replace function.

    This is because the column program is...

Viewing 15 posts - 946 through 960 (of 1,124 total)