Forum Replies Created

Viewing 15 posts - 49,021 through 49,035 (of 49,552 total)

  • RE: how convert float to nvarchar

    the reason is i want to use the floating point value to be my unique key in the format of nvarchar

    Why? If you want to use the current date as...

    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: Distinct

    Firstly, don't use select *. It's lazy coding. Get into the habit of explicitly naming the columns in your query, and only returning the columns that you need.

    Second, don't use...

    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 Aug 2006

    EXECUTE Northwind.dbo.sp_who should have worked and printed Surprise.

    Actually not, it has something to do with the name resolution, but any procedure that starts sp_ is first looked for in master,...

    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: Divide by zero encountered

    NULLIF takes 2 parameters, returns null if the two equal each other, otherwise it returns the first.

    Hence NULLIF(fld, 0) returns NULL if fld is zero, otherwise it returns fld.

    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: Transaction log reading tools

    The dblog virtual function produces nicer output than DBCC Log. Specifically, since it's part of a query, it's easy to filter, group, etc

    SELECT

    *...

    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 Time format

    Datetimes are not stored in any format in a table. They're stored in a numeric format.

    If you want to display a date in a specific format, then you'll need...

    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: Being a Professional

    I don't know about those who are presenting, but I submitted an offer to speak at the conference, which was declined. I got a mail from PASS recently, thanking me...

    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: Using BEGIN TRAN...COMMIT TRAN

    Why don't you try it out? You can use the RAISERROR statement to force an error, or intentionally do an update that violates a constraint on the table.

    Be very...

    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: Understanding the Algorithms used by SQL Server

    I'd also recomend 'The Guru's guide to SQL Server Architecture and Internals' by Ken Henderson

    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: Need Help with Query

    Oops, missed that. 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: Need Help with Query

    It's messy, inefficient and I'm sure several others will have better solutions, but this does what you want. The big problem is the comma-delimited values in the commission table

    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: empty string

    or you can use the datalength function, which can be used on text fields

    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 Beginner

    The SQL 2005 books online conain a lot of information for beginners. The sections on create procedure, insert statements, update statements and if - else statements will probably be of most...

    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: Insert - Null issues

    Are you maybe trying to do this?

    Select  sum(cast(ISNULL(Hedonic_Value,0) as bigint)) as SumHedonic,  sum(cast(sa_sqft as bigint)) as sa_sqft,

    sa_census_tract, sa_census_block_group, count(*) as totalHomes, 'B' as HouseType

    From ReplyAVM

    Where isnull(sa_sqft, 0)...

    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: Automating Procedures to execute

    I would agree on the job, but not on the cursor. From the sounds of things, the updates can be done set-based.

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