Forum Replies Created

Viewing 15 posts - 466 through 480 (of 691 total)

  • RE: Question of the Day for 17 Dec 2004

    More questions like this, please! They really show off that the author....

    print convert(varchar(3), 0x697320) +

    convert(varchar(5), 0x747279696E) +

    convert(varchar(1), 0x67) +

    convert(varchar(7), 0x20746F206D616B) +

    convert(varchar(4), 0x65206869) +

    convert(varchar(3), 0x6D7365) +

    convert(varchar(8), 0x6C66207365656D20) +

    convert(varchar(1), 0x6C) +

    convert(varchar(3),...

  • RE: SQL Server 2005 DBCC Command Quick Reference

    Good job. Very helpful article!

  • RE: SQL Server DataTime Format Question

    Here's another way, slightly more intuitive IMO (as it does not rely on conversion to FLOAT/knowledge of SQL Server's internal date format):

    select dateadd(ss, -1, dateadd(dd, 1, datediff(dd, 0, getdate())))

  • RE: SQL Server DataTime Format Question

    Why would you use 23:59:59 rather than 00:00:00 ? The latter, IMO, is more intuitive...

  • RE: Text Field Search

    I thought about this some more and realized that the solution I posted won't work if the search string starts, e.g. at character 7999 and ends at 8001... I believe...

  • RE: Text Field Search

    CHARINDEX will not search beyond 8000 characters in SQL Server 2000... So that function doesn't quite work as expected:

    create table testsearch(textcol text)

    go

    declare @bigstring varchar(8000)

    set @bigstring = replicate('0', 8000)

    declare...

  • RE: Text Field Search

    An easy way to do this with a varchar(8000) is to do something like:

    declare @instring varchar(8000)

    set @instring = 'abcabcabc'

    declare @teststring varchar(100)

    set @teststring = 'abc'

    SELECT (LEN(@instring) - LEN(REPLACE(@instring, @teststring, ''))) /...

  • RE: Bowling Challenge - The Results

    Including validation in the script earned extra points? That should deduct points, IMO. Data validation belongs in constraints, not in data access code. Yes, this was just...

  • RE: Views vs Stored Procs

    That's correct. Keep in mind that indexed views were really designed to assist with performance of aggregate-heavy queries (lots of SUM, AVG, etc). A lot of developers attempt...

  • RE: query table UDF with a subquery?

    You can't do that in SQL Server 2000. In SQL Server 2005 you will be able to, using the APPLY operator.

  • RE: Views vs Stored Procs

    If you already have a table-valued function, why bother with a view?

    A table-valued function is essentially a parameterized view... (or non-parameterized, if you don't bother using parameters!)

  • RE: select overlapping date(s) problem.

    This will return both rows 2 and 3... Both are technically overlapping, so IMO that's correct behavior. If you want only one or the other it might be possible...

  • RE: Skipping header row while doing bulk inset

    BULK INSERT YourTable FROM 'YourFile' WITH (FIRSTROW=2, FIELDTERMINATOR='|')

  • RE: Views vs Stored Procs

    "I have read that, under the covers, SS implements a view the same way it implements a stored proc, i.e., it creates a query plan, keeps it handy for execution,...

  • RE: Help Populating a Heirarchy

    Joe,

    You already have a Nested Sets model -- kind of. You should be able to write a cursor against your ordered select, and use that to insert row-by-row...

Viewing 15 posts - 466 through 480 (of 691 total)