Forum Replies Created

Viewing 15 posts - 49,351 through 49,365 (of 49,552 total)

  • RE: Help with prepared statement

    At first glance (no coffee yet) I'd guess it has something to do with the fact that you have two tables with the same alias. You have both SupplierItemAttributeValue sv...

    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: Viewing intermediate results

    Profiler should work. Capture the SP:StmtStarting event (under stored procedures)

    Otherwise you can create a 'debugging' table and have the stored proc insert the query that it's about to execute in...

    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: PC specs?

    Home machine: (custom built)

    Athlon 3200 XP

     1.5 GB memory

     220 GB hard drive (1x200 GB, 1x20 GB)

     DVD reader

     CD Writer

     Soundblaster Live

     GeForce 6800 LE

     17" monitor (don't have space on desk for larger)

     + accessories...

    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: Software Engineers Needed Immediately

    Please don't cross-post. Most people here read multiple forums.

    Besides, this belongs in the Job Postings forum, not here.

    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: help me out here please!

    This should get you what you want.

    SELECT MasterTable.Name, DetailTable.Id, DetailTable.Day, DetailTable.Result, DetailTable.Campaign, DetailTable.PhoneNumber FROM DetailTable INNER JOIN

    (SELECT MAX(ID) AS LatestID, PhoneNumber

       FROM DetailTable

       GROUP BY PhoneNumber) LatestEntry ON...

    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: help me out here please!

    Could you please post the DDL of your tables and some example data? It'll make things a lot easier for us to come up with a solution.

    What do you mean...

    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: Extent lock

    Thanks. Didn't know that the number was actually a page number.

    Never seen that DBCC command before either. (even in the list of DBCC commands that I found)

    Thanks.

    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: GUID conversion

    I can't answer your conversion question, but I was faced with a similar problem a few months ago. What we decided to do was to add an additional step at 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
  • RE: Optimising XML

    That works great. Thank you very much.

    Would you mind explaining what/how the xpath works there?

    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: Null comparison question

    Rather don't use the ansi_nulls setting and write your stored proc as follows

    Create Procedure TestNulls

    As

    Begin

      Select * from T1 Where (C1=C2 OR (C1 IS NULL AND C2 IS NULL))

    End

    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: Cast-Convert question

    DECLARE @Value DECIMAL(8,0)

    SELECT @Value = 10005555

    SELECT CAST(SUBSTRING(CAST (@Value AS VARCHAR(8)),1,4) AS DECIMAL(4,0)) AS FirstHalf,

     CAST(SUBSTRING(CAST (@Value AS VARCHAR(8)),5,4) AS DECIMAL(4,0)) AS SecondHalf

    HTH

    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: Deduct 60 minutes from getdate() ?

    Not for what you're trying to do.

    From Books Online:

    The DATEADD function adds an interval to a date you specify.

    The DATEDIFF function calculates the amount of time in dateparts between...

    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: Deduct 60 minutes from getdate() ?

    Either

    SELECT DATEADD(mi,-60,GETDATE())

    or

    SELECT DATEADD(hh,-1,GETDATE())

    First subtracts 60 minutes, second subtracts 1 hour.

    HTH

    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: sql mortal

    The structure of your tables and some example data would realy help, but I'll take a shot at it without.

    I think you'll find a subquery will help greatly.

    SELECT ...

    FROM...

    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: BCP - getting data in the same order of data file

    According to relational theory, the phrase 'order of rows in a table' is meaningless.

    The fact that, in SQL, a clustered index gives the data a natural sort order is more...

    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,351 through 49,365 (of 49,552 total)