Forum Replies Created

Viewing 15 posts - 58,396 through 58,410 (of 59,053 total)

  • RE: Seek Table Design Advice\Best Practice: Accounting Period

    Absolutely... and that, in fact, your suggestion would definitely be the best way to solve the problem, but someone wanted me to demo using DATEDIFF as both a filter and...

  • RE: Seek Table Design Advice\Best Practice: Accounting Period

    Yep, true enough... I've made the same recommendation to others, myself.  It's a great example of why you need a primary key, though...

    -------------------------------------------------------------------------------------------------------------------------------

      |--Compute Scalar(DEFINE: ([Expr1004]=datename(month,...

  • RE: ISQL

    Try something like this (defaults to tab delimited for Excel)...

    BCP "SELECT au_fname, au_lname FROM pubs..authors ORDER BY au_lname" QUERYOUT Authors.xls -c -S"yourservername\instancename" -Uyourusername -Pyourpassword

  • RE: Build Views Dynamically

    John,

    I didn't take the time to convert some of my old code to your specific example but the following code is a good example of a "dynamic crosstab".  Since the...

  • RE: Running a script using "osql"

    You could also embed the OSQL command in a Batch file that could provide instant gratification as to the outcome...

     

  • RE: Seek Table Design Advice\Best Practice: Accounting Period

    Sure, Dennis... having a bit of a lack of sleep going on myself, here's an example using the Northwind database...

        USE NorthWind

    DECLARE @Year CHAR(4)

        SET @Year...

  • RE: NewID() vs. Identity field

    Concur... doesn't sound like the Developer ever heard of the IDENTITY property of a column.  Using the IDENTITY property does have some other uses, as well... think of it as...

  • RE: DATEFORMAT

    I just gotta remember to read the last page  ... Serqiy already made a similar suggestion.  Guess a concurrence never hurts though...

  • RE: DATEFORMAT

    This will successfully convert characters in the DD/MM/YYYY format into a DateTime datatype without much fanfare...

    CONVERT(DATETIME, yourstringdate, 103)

    Here's an example you can try...

    DECLARE @ddmmyyyyString CHAR(10)

        SET...

  • RE: Seek Table Design Advice\Best Practice: Accounting Period

    I dunno... 6 bytes, 4 bytes, 8 bytes... for me, I'd still be tempted to use DateTime just because of all the things you can do with DateTime functions without...

  • RE: Output to a text file

    I agree... BCP is a great tool especially when you learn how to use the format files.  You could also try a simple OSQL call using the SELECT of your...

  • RE: The ARRAY In SQL Server 2000

    Here, here! I second the thought!

  • RE: sql query help

    Thanks for the offer, Ken... we're all set.

     

  • RE: Introduction to SQL Server 2005

    Great article!  And, I didn't like the Merge Into function anyway...

  • RE: sql query help

    Jesper, thanks for pulling me off the ceiling... you're the best.

Viewing 15 posts - 58,396 through 58,410 (of 59,053 total)