Forum Replies Created

Viewing 15 posts - 49,516 through 49,530 (of 49,552 total)

  • RE: GROUP BY a text column

    Very simplified down

    i.ID, i.Header, i.Subheader, CAST(i.Text AS VARCHAR(200)) from Issues i

    group by i.ID, i.Header, i.Subheader, CAST(i.Text AS VARCHAR(200))

    Increase the size of the varchar if you need more chars (up to...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Stored Procedures running for long time

    It sounds to me like it could be a locking issue. If there are other queries running against the table you're trying to update, your stored proc will be blocked...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Install Reporting Server - Service wont Start

    Were you logged in as an administrator when you tried to install? If not, uninstall the whole lot, log in as admin and try to reinstall.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Install Reporting Server - Service wont Start

    Any error message either from the installation or the start service?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: CASE syntax

    Case can only be used within a select statement

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Question of the Day for 05 Aug 2004

    Bigint (Integer (whole number) data from -2^63 (-9,223,372,036,854,775,808) through 2^63-1 (9,223,372,036,854,775,807). Storage size is 8 bytes.)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Data Difference between 2 structurally identical tables

    This should work, although I haven't tested it

    Select * FROM A LEFT OUTER JOIN B ON A.a1=B.a1 AND A.a2=B.a2 WHERE B.a1 IS NULL AND B.a2 IS NULL

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to select records using just the date and not the time in a datetime field

    Two ways, the second may prevent the use of indexes, so be warned.

    DECLARE @dt DATETIME

    SET @dt = '2004/07/16'

    SELECT * FROM tbl

    WHERE cTime BETWEEN @dt AND DATEADD(ss,-1,DATEADD(dd,1,@dt))

    (all records where cTime...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Sp with Subquery/where statement

    I do most heartily apologise, I missed out a + when I specified the where clause for you.

    It should be

    WHERE TplanCond=''' + @Tplan + ''''

    *most embarrassed*

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Sp with Subquery/where statement

    That said, I don't think you need the nested SQL statement.

    SELECT tblthisproductmodelFinal.lngModelOfficeNum,

    tblthisproductPolicyNumbers.lngPolicyNumber AS lngPolicyNumber,

    tblConditions.lngConditionNumber AS lngConditionNumber,

    tblConditions.numCycle AS numCycle,

    ...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Sp with Subquery/where statement

    You're missing some quotes

    ....WHERE p.TplanCond='thistestplan'

    Without the quotes sql is looking for a column named thistestplan, which I assume from your comment doesn't exist.

    Replace the where clause in the string...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Question of the Day for 28 Jul 2004

    And the second query has a syntax error in that there is a space between Table and 2

    (Table 2 instead of Table2)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Beginning Administration

    Articles on managing a data warehouse would be greatly appreciated.

    Specifically any differences between managing a data warehouse as opposed to managing an OLTP system

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Query Help

    This should work, though it's a bit ugly

    SELECT * FROM order WHERE ord_id IN

    (

    SELECT Col_A FROM Ref UNION

    SELECT Col_B FROM Ref UNION

    ...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Intermitant failures

    The delete and backup are done in a DTS package, with an On_Completion workflow between them. I added the delete in after the first time I got this error. The...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 49,516 through 49,530 (of 49,552 total)