Forum Replies Created

Viewing 15 posts - 331 through 345 (of 1,554 total)

  • RE: Newbie needs some T-SQL help, please

    Best would be if you provided an example of the table with columns involved, some rows of testdata that would act as prescribed, and what the desired output from that data...

  • RE: ORDER BY in Views and Table Functions not working

    Didn't read through all too closely, but AFAIK, there's no changes in the behaviour of CASE per se.

    As usual regarding case - potentional pitfalls may be nullhandling and other stuff...

  • RE: Every monday in date range

    Here's another take on the problem, and you don't need to be dependent on @@DATEFIRST settings either.

    --==== return weekday of @myDate regardless of @@DATEFIRST settings

    --==== 1 = Monday...

  • RE: ORDER BY in Views and Table Functions not working

    How do you mean?

    A CASE isn't a sort like an ORDER BY..

    Could you provide an example?

    /Kenneth

  • RE: ORDER BY in Views and Table Functions not working

    Correct, this is by design.

    SQL Server isn't obligated to honor any ORDER BY except in the outermost scope.

    eg

    CREATE VIEW myView

    AS

    SELECT TOP 100 PERCENT foo, bar FROM foobar ORDER BY foo

    go

    If you...

  • RE: Remote Access to SQL Server

    Well, not really. (again, though, don't take my sole word for it, but..)

    As I understand VPN.....

    The goal is to create a 'secure' means of communication over an 'unsecure/unknown' space (read:...

  • RE: NULL dates - best practices?

    In this particular case then, the birthday is indeed unknown - and 'should' be represented as NULL.

    Especially since you also say that it may be filled in at a later...

  • RE: Remote Access to SQL Server

    Google is always a good startingplace.

    Since you have windows authentication on the server, you need to somehow log into the domain (or your...

  • RE: JOIN vs =*

    Seems this baby has it all - inner, left and right joins mixed together.

    It's very hard to figure out how to rearrange it, without knowing more on how the tables...

  • RE: View Question

    It depends.

    There's no black or white in general, and the question is very general.

    You can read up on views in BOL (Books on Line) and also on the subject of...

  • RE: Will SQL 2005 allow me to nest INSERT EXEC statements?

    It seems you do have a nesting 'problem' - there's a lot of jumping around with temptables..

    Perhaps you could consider rethinking what each proc does..?

    'unsafe' looks like it could...

  • RE: Will SQL 2005 allow me to nest INSERT EXEC statements?

    Could provide some example of your code that produces the error message?

    It's pretty hard to see what 'nested' means in your case without an example.

    /Kenneth

  • RE: restoring to a marked transaction

    Couldn't really get from BOL if the tran marked was included or excluded in the restore, but...

    There is also a STOPBEFOREMARK, that might suggest that STOPATMARK is inclusive, and before...

  • RE: getting date in a very specific format

    SELECT CONVERT(CHAR(8), GETDATE(), 112)

    --------

    20070125

    The format you want is also known as the ISO format (look up 'convert' in BOL and you'll see the different styles you can fomat dates...

  • RE: Using CASE in another CASE Statement?

    Sometimes it can be a little tricky to get all bits just right, but in answer to your question:

    Yes, it's quite possible to nest CASE statements.

    /Kenneth

Viewing 15 posts - 331 through 345 (of 1,554 total)