Forum Replies Created

Viewing 15 posts - 61 through 75 (of 335 total)

  • RE: question with querying same filed twice

    COUNT(*) and SUM( CASE WHEN datefield BETWEEN whenever AND whenever THEN 1 ELSE 0 END )

     

  • RE: 64bit and bcp utility through xp_cmdshell in QA

    You ought to post your actual syntax when asking a question like this. 

    From what little you've provided, I'm going to guess it has to do with quoted identifier being...

  • RE: selecting the every tenth record.

    OK you ought to use the MODULO operator instead of the more complex math:

    select * from sysobjects where id % 10 = 0

    But the caveat is: IF you have...

  • RE: Find missing numbers in sequential column

    from table a left outer join table b on a.key = b.key -1 where b.key is null

    gets you last row BEFORE a break

    reverse to get last row AFTER a...

  • RE: Char to int

    declare @a varchar(20)

    select @a = '122aa'

    select CONVERT( INT, SUBSTRING( @a, 1, patindex( '%[A-Z]%', @a ) - 1 ) )

    Filter the statement with...

  • RE: Dynamic SQL - evaluate EXEC results?

    Use @@ERROR AND @@ROWCOUNT to evaluate:

    --sample failure:

    exec ('insert into sysobjects select ''abc''' )

    select @@error, @@rowcount

    --sample success:

    exec ('declare @a int select @a=1 ' )

    select @@error,...

  • RE: How to make a DB a "black box"

    Assuming you mean "Given SQL Server"...

    I suppose if you completely encapsulated all access via DLLs or other client applications it might be possible.  (By way of shipping a finished db...

  • RE: Stored Procedure to Excel???

    Have the stored procs put the data into a temp table like I said. It doesn't matter how many steps it takes. Then after you're done, the last thing...

  • RE: What Sarbanes-Oxley Won''t Do

    Cringely had a good piece on this about the new robberbarons:

    http://www.pbs.org/cringely/pulpit/pulpit20050804.html

    In a nutshell:  This and related legislation will be used to drive the smaller more competitive institutions out of...

  • RE: Stored Procedure to Excel???

    If it's ok with you to have your proc access xp_cmdshell, then do the simple thing:

    BCP queryout with the -c option makes it tab/CRLF delimited

    (and you may need to stage...

  • RE: Help with this MonthEndDate Query

    why not join to an embedded query which gets max date for each month?

    select key, yr, mo, value

    from tablex x

         JOIN (

    select key, datepart( yy, datefield ) AS yr,...

  • RE: Today''''s article - Bogus resumes and unblushing lies

    Throughout the history of man, he has searched for the holy grail of objective assessment of others.  The only certainty that I have found is that, the more criteria/hoops/steps you...

  • RE: Naming Conventions for SQL Server

    So why not start by defining your own set of meta-standards?  You don't have to know anything about SQL Server to do that, you just have to figure out why...

  • RE: Data Warehouse Developer

    That depends, what's your favorite color?

    Seriously, how do you define "value"?  Are you asking what pays more?  Chances are if your asking that you don't really care, you just want...

  • RE: Naming Conventions for SQL Server

    OK, well, for me, I'm partial to calling SQL Server, "SQL Server".  Sometimes during conversations, I'll simply say "Server" or "The Server".  Then, when lapsing into laziness, I might generically...

Viewing 15 posts - 61 through 75 (of 335 total)