Forum Replies Created

Viewing 15 posts - 1,516 through 1,530 (of 13,469 total)

  • RE: Create dates right on the hour interval-best technique

    you can also use the dateadd/datediff functions to strip to the hour, and still keep the value as a datetime instead of a varchar.

    select DATEADD(hh, DATEDIFF(hh,0,getdate()), 0) --2015-09-04 10:00:00.000

  • RE: Wrapping of text in HTML(XML)

    i just built this example from my notes about adding align in xml.

    this quick example seems to generate valid xml/html snippets, using inline styles.

    i would do as suggested and use...

  • RE: Get-ADGroup with wildcards

    this is working for me:

    Import-Module ActiveDirectory

    Get-ADGroup -Filter {Name -like '*SQL*'} -Properties * | select -property SamAccountName,Name,Description,DistinguishedName,CanonicalName,GroupCategory,GroupScope,whenCreated

  • RE: Does anyone know Mike Byrd?

    i just checked the wayback machine over at archive.org, which only had part two of the three part series,a nd pointed to SQL Saturday #234, since it was a presentation...

  • RE: Interview Question

    SQLBill (8/31/2015)


    Trick question isn't it?

    UNIQUE constraint: used to "...make sure that no duplicate values are entered..." So you can't have duplicates.

    -SQLBill

    no, it's a classic question on the...

  • RE: How to Perform Update Query that Involves Multiple Tables?

    this looks right to me, and is sytactically correct, but you didn't mentione what the new value was.

    i would use the ansi 92 syntax to make it clear to my...

  • RE: Change text format from case sensitive to case insensitive

    NineIron (8/31/2015)


    How can I change my T-SQL text editor from text sensitive to text insensitive?

    assuming your text editor is SQL Server Management Studio, SSMS itself is not case sensitive; however,...

  • RE: DBO permissions on database replaced during RESTORE

    have your dba create a procedure that features EXECUTE AS OWNER that adds missing permissions.

    have the procedure loop through each database on the dev server, and do a classic if...

  • RE: what is the underlying base for "Transactions Per Second" in SQL

    bumping this for the morning, hopefully someone may remember what counts as a transaction per second.

  • RE: SQL Insert Into question

    you altered the table and added a new column [date1]

    the table [Metrics].[dbo].[x64_Restore_Metrics_All_Temp] now has four columns, but your insert has only three.

    if you do insert into table without a column...

  • RE: Copy existing row data into new table rows

    i think it's just a select of three queries, which inserts into the new table.

    INSERT INTO NEWTABLE(ColumnList)

    SELECT RecordID,ManagerID,ManagerApprovedDate,'ManagerApproved'

    From OriginalTable WHERE ManagerID IS NOT NULL UNION ALL

    SELECT RecordID,ClerkID ,ClerkApprovedDate,'ClerkApproved' ...

  • RE: T-SQL MDF & LDF size for spreadsheet

    i built this proc from some examples i found here on SQLServerCentral:

    IF OBJECT_ID('[dbo].[sp_dbspaceused]') IS NOT NULL

    DROP PROCEDURE [dbo].[sp_dbspaceused]

    GO

    --#################################################################################################

    --developer utility function added by Lowell, used in SQL Server...

  • RE: CTE within a stored proc

    mar.ko (8/28/2015)


    Ed Wagner (8/28/2015)


    The statement that contains the CTE needs to end with a query that uses the CTE. Like Luis said, please post the code; that should clear...

  • RE: Execute procedure in procedure?

    looks to me like the issue is in the complicated select that you left out of the post...

    you not getting the data you expect, so it's gotta be in the...

  • RE: CTE within a stored proc

    the command prior to WITH MyCTE AS(...

    must be terminated with a semicolon. that's probably where the issue likes.

    that issue makes a lot of people precede their [WITH] to feature...

Viewing 15 posts - 1,516 through 1,530 (of 13,469 total)