Forum Replies Created

Viewing 15 posts - 58,411 through 58,425 (of 59,066 total)

  • 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.

  • RE: SCOPE_IDENTITY vs. @@IDENTITY

    Yep... I agree with Trigger... don't ever use @@IDENTITY because if a trigger fires and that trigger inserts into another table, @@IDENTITY will not contain the value you think it...

  • RE: Checking to see if Table is being processed

    Ummmm.... you could us sp_lock to see if the table is being worked on by the type of lock it has.  You would, of course, need to know the ID...

Viewing 15 posts - 58,411 through 58,425 (of 59,066 total)