Forum Replies Created

Viewing 15 posts - 976 through 990 (of 1,086 total)

  • RE: Extracting correct week from getdate()

    Actually, you are a tiny bit off.  Week two starts on Sunday, January 2, 2005. 

    SELECT DATEPART( week, '01/01/2005')

    SELECT DATEPART( week, '01/02/2005')

    SELECT DATEPART( week, '01/03/2005')

    Either way, this...

    I wasn't born stupid - I had to study.

  • RE: Aye Yi Yi

    Trees, schmees... You can easily regrow those.  My first degree was in environmental science and you would not believe the pollucka we have bought into regarding MOST environmental issues...

    I wasn't born stupid - I had to study.

  • RE: what is the sql server equivalent to mysql limit x, y

    I have seen a number of examples using Row Identifiers for sending the first 50, then the next 50, etc. records to an asp output page.  I know of no...

    I wasn't born stupid - I had to study.

  • RE: insert command issue

    Beautiful!  Thank you. 

    I wasn't born stupid - I had to study.

  • RE: insert command issue

    What about #TempTables?  Especially ones which do not contain any indexes, contraints, etc.  One of our folks insists that SELECT INTO is far more inefficient than building the table ahead...

    I wasn't born stupid - I had to study.

  • RE: INSERT from a SELECT where Identity doesn''''t match

    Can you be more specific?  What doesn't work?  No insert? 

    Why is @MaxDate less than StartTime? 

    I wasn't born stupid - I had to study.

  • RE: view syntax

    You can also do it this way...

    FROM        

     dbo.OccMain ocm

     INNER JOIN dbo.OccMalignant omg ON( ocm.AilmentID = omg.AilmentID)

     LEFT JOIN dbo.CodeLookUp c ON( c.Code=omg.SentNode AND c.CType = 65)

    I wasn't born stupid - I had to study.

  • RE: Frank''''s Addition to Family

    Thanks, David!  I can't spell worth a poop.   

    My son had colic and it was a living hell!  That is the most blood...

    I wasn't born stupid - I had to study.

  • RE: Selecting "most recent" records

    SELECT MAX( Date) and GROUP ON Code and Item Name, (if you need Item Name).  You said the Item Name might change, so you may want to get that value...

    I wasn't born stupid - I had to study.

  • RE: Need help in writing this query..plz help

    I am not sure how you are including table T2 in this by your Business Rules. 

    I have put together this little script; maybe you can give me more information. ...

    I wasn't born stupid - I had to study.

  • RE: Inconsistent behavior of Store Proc

    I think PhilM99 hit it right with the following: "In order to avoid wild goose chases, it is best if you improve the stored proc to give you back any...

    I wasn't born stupid - I had to study.

  • RE: Please Help ---User defined functions (using a dynamic table name)

    No, that is not how it works.  Within your code, you Create #Table.  Then call function and within the function make it Return @Table (same table structure) as the #Table.  Then insert...

    I wasn't born stupid - I had to study.

  • RE: Please Help ---User defined functions (using a dynamic table name)

    You can insert into one.  You need to create it ahead of time.  Then call your function. 

    I wasn't born stupid - I had to study.

  • RE: Pivot Table, Row to Column???

    I, personally, like the pivot table as it is easier to look at and understand.  What would concern me is, are you having to ALTER TABLE to add more key's? ...

    I wasn't born stupid - I had to study.

  • RE: Please Help ---User defined functions (using a dynamic table name)

    What if you populated a @TableVariable with the names of the new tables and then simply looped through those records? 

    SELECT name AS TableName

    INTO @TableVariable

    FROM sysobjects

    WHERE xtype...

    I wasn't born stupid - I had to study.

Viewing 15 posts - 976 through 990 (of 1,086 total)