Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: Drop a table and views

    save yerself some typing:

    if object_id('dbo.table_name') is not null

    drop dbo.table_name

    toss that at the top of the script too before dropping the sp ahead of the create statement

  • RE: Who is "the IT guy?"

    The term IT guy, I've found, is usually only used in small companies where the department is 5 people.

    If IT is a big part of your company, then the desktop...

  • RE: Calculate Age

    why not just datediff() the number of days between the parameter and getdate() - then divide that number by 365.25?

  • RE: XML Workshop XVII - Writing a LOOP to process XML elements in TSQL

    just do this to retrieve the element count for the loop - we've had to do this a lot..

    select @max-2 = @x.value('fn:count(/Employees/Employee)','int')

    or you could even include the xpath...

Viewing 4 posts - 1 through 4 (of 4 total)