Forum Replies Created

Viewing 15 posts - 14,221 through 14,235 (of 14,953 total)

  • RE: total time difference between more than two dates

    Well, since dates are stored as floating point numbers, it can have those problems, but there isn't a way around that if you're using datetime data. And it should...

  • RE: Is there a better approach?

    ALZ, why do it as a separate table? Two parents, yes. But why a separate table?

  • RE: total time diff between more than two dates

    This is a duplicate post. There's more data in the one that was posted in SQL Server Compact Edition. (In the future, please don't post twice.)

  • RE: Sort question with a date

    A datetime dimensions table would definitely be the way to go.

    Create a table with half-hour increments of dates and times. Should have a "begin" column and an "end" column....

  • RE: Not sure how to approach this.

    Would a cross-join between customers and skills, and a left join to the map table, with a null select in the Where for the map table, work?

    Something like:

    select Customer, Skill

    from...

  • RE: Deadlocks on a simple select statement

    Turn on a deadlock trace (Books Online has details), and you'll find out exactly what's causing it.

    Most likely, some other process is trying to update the same information you're trying...

  • RE: Bloated

    I'm on the side of thinking that keeping business-relevant data, even stuff that was relevant once but may no longer be so, is more important than the minor costs of...

  • RE: total time difference between more than two dates

    Jeff, good article. Just to add to it, you can do this:

    declare @D1 datetime, @D2 datetime

    select @d1 = '02/Nov/06 9:14:21 AM', @d2 = '19/Apr/07 11:52:31 AM'

    select datepart(year, @d2-@d1)-1900 as...

  • RE: sql memory usage

    I'm having trouble following your question.

    Are you asking if you can make the database faster by making more of it stay on the disk instead of in memory? That...

  • RE: total time diff between more than two dates

    "datediff(hour, date1, date2)" will give you the hours.

    "datediff(minute, date1, date2)" will give you the minutes, but you need to use "datediff(minute, date1, date2)%60" to get the minutes left over after...

  • RE: LONG TEXT need to be able to view, edit and update data

    You seem to have posted this in the wrong forum. This is for SQL 2005.

    Regardless, there's no way to "edit" text data through Query Analyzer, so far as I...

  • RE: Subsitute of TO_CHAR in transact SQL???

    I agree with Jeff that SQL isn't the way to do this. Every front end app I've ever worked with will do this better.

    If, somehow, you absolutely must do...

  • RE: Union/OR query

    The reason I think it's something other than the select statement causing this is because of what Books Online says about Select statements and Locks.

    Shared (S) locks allow concurrent transactions...

  • RE: Can these 3 queries be combined to only use one query?

    I'm sure they can be combined, but I need to know more about what the desired end result of the query is. For one thing, it's not clear to...

  • RE: Indexing Against "Optional" WHERE Conditions

    Now I know it's been a long week. Yeah, dynamic SQL will do that quite nicely.

Viewing 15 posts - 14,221 through 14,235 (of 14,953 total)