Forum Replies Created

Viewing 15 posts - 286 through 300 (of 323 total)

  • RE: write multiple lines to DOS file with xp_cmdshell

    You're not just whistling, Phil. 

    I have tried every variation of CHAR(13) + CHAR(10), and every example of ECHO I could find.  No joy.

    There is no "i" in team, but idiot has two.
  • RE: Scope of Variables

    BOL is your friend:

    The scope of a local variable is the batch, stored procedure, or statement block in which it is declared.

    Mr. or Ms. alluded to the batch, which...

    There is no "i" in team, but idiot has two.
  • RE: Quick SQL Drill (Sorting)

    Good one.

    Without cranking up QA, I think Query #1 will give you the result in the wrong order, mm-dd-yy instead of ccyymmdd like you want it.  Queries #2 and 3...

    There is no "i" in team, but idiot has two.
  • RE: Can not get system stored procedures text in SQL Server 2005

    BOL for SQL Server 2000 says:  "This procedure is included for backward compatibility. Use sp_grantdbaccess."  So maybe they finally took it out in Yukon?

    There is no "i" in team, but idiot has two.
  • RE: Getting text of system stored procedures in 2005

    BOL for SQL Server 2000 says:  "This procedure is included for backward compatibility. Use sp_grantdbaccess."  So maybe they finally took it out in Yukon?

    There is no "i" in team, but idiot has two.
  • RE: sp_add_job doesn''''t seem to work as advertised

    Dang.  I was hoping someone would come back with, "yep, that's a known bug".  That's how I call it, too.

    declare @ReturnCode int

    , @jobID uniqueidentifier

    EXECUTE @ReturnCode = msdb.dbo.sp_add_job 

      @job_id = @JobID...

    There is no "i" in team, but idiot has two.
  • RE: Using a variable as a field value in a bulk insert

    I would load the data into a staging table with bulk insert, then insert the date into the batch table, and finally insert the data from the staging table into...

    There is no "i" in team, but idiot has two.
  • RE: Business Days/Hours Calculations

    This was posted 12/18.

     

    I have used a lookup table.

    CREATE TABLE dbo.BusinessDays (

    BusinessDay datetime NOT NULL PRIMARY KEY CLUSTERED)

    go

    --Load the table with dates, starting with the first business day...

    There is no "i" in team, but idiot has two.
  • RE: Avoiding row deletion with a trigger

    An INSTEAD OF trigger should work.  Check out "Designing INSTEAD OF Triggers" in BOL.

    There is no "i" in team, but idiot has two.
  • RE: table returning udf join

    What if you used a derived table instead of a udf?

     

    select a.id from MyTable AS a

    JOIN 

    (SELECT MyLastTable.id FROM MyNextTable JOIN MyLastTable ON MyNextTable.colb = MyLastTable.colb) AS b

    ON a.id = b.id

     

    I don't...

    There is no "i" in team, but idiot has two.
  • RE: Help! Business Days Question

    That's odd, the page redacted most of my comments.  Right before the ALTER TABLE you need to manually edit the table, deleting the rows which have dates that are not...

    There is no "i" in team, but idiot has two.
  • RE: Help! Business Days Question

    I have used a lookup table.

    CREATE TABLE dbo.BusinessDays (

    BusinessDay datetime NOT NULL PRIMARY KEY CLUSTERED)

    go

    Load the table with dates, starting with the first business day of the year:

    TRUNCATE TABLE dbo.BusinessDays...

    There is no "i" in team, but idiot has two.
  • RE: Good Book for SQL Developer

    I agree with Herb on Advanced T-SQL for SQL Server 2000:

    "http://www.bookpool.com/.x/3b9ypa4by8/sm/1893115828

    Ken Henderson's "Guru" books are also very helpful.  Inside SQL Server 2000 gives good explanations on what is happening...

    There is no "i" in team, but idiot has two.
  • RE: FIPS US states, territories, and possesions codes

    Thanks, all.  Silly me, I was looking for a FIPS standard at the FIPS site, http://www.itl.nist.gov/fipspubs/.

    What was I thinking? 

    There is no "i" in team, but idiot has two.
  • RE: FIPS US states, territories, and possesions codes

    Yep, that's what I mean.  Nothing even close to a delimiter, multiple codes on one line.  I was hoping that I wasn't the only one who needs to validate FIPS...

    There is no "i" in team, but idiot has two.

Viewing 15 posts - 286 through 300 (of 323 total)