Forum Replies Created

Viewing 15 posts - 2,776 through 2,790 (of 13,461 total)

  • RE: BCP Out Failure About Login Failure

    my first guess is permissions; xp_cmdshell doesn't typically use the network permissions you expect.

    run this command, and it can help you see if the user SQL uses for disk access...

  • RE: Time issues

    and somethign from my snippets, which is grouping data into half hour intervals:

    With MySampleData

    (AgentID,State,StartTime,EndTime,Duration)

    AS (

    SELECT '1234','NotReady',Cast('2011-04-05 08:00:00' AS datetime),Cast('2011-04-05 08:00:05' AS datetime),'5' UNION ALL

    SELECT '1234','Ready','2011-04-05 08:00:05','2011-04-05 08:01:00','55'...

  • RE: Time issues

    can you post the data as consumable sql stateemtns we can paste into SSMS, along with the datatypes?

    something like this is an example

    ;WITH MyCTE([Times],[ACD],[Other],[Outb])

    AS

    (

    SELECT '8:30AM','0:00:00','0:00:00','0:00:00' UNION ALL

    SELECT '9:00AM','0:09:48','0:00:00','0:00:23' UNION ALL

    SELECT...

  • RE: Remove DATE ONLY from datetime column

    assuming you want AM/PM? here's a couple more examples; one keeps the milliseconds, the other is stuffed to remove the milliseconds to leave seconds +am/pm:

    select right(convert(varchar,getdate(),131),14),

    STUFF(right(convert(varchar,getdate(),131),14),9,4,'')

  • RE: Select ALL logins, users, and user groups shown in SSMS Security > Logins

    select * from sys.server_principals

    that will have domain users, as well as all the built in users; the sql_logins is a limited view of that same data(WHERE type_desc = 'SQL_LOGIN').

  • RE: SQL Credentials to Access Network File

    can you see if you add the option for readonly, if it will work?

    i have this saved in my snippets:

    SELECT * FROM OPENROWSET('MSDASQL',

    ...

  • RE: Create a View with OPTION (FORCE ORDER)

    h.tobisch (12/13/2013)


    use option (force order) when selecting from the view

    note: eight year old thread.

  • RE: Long Path Names to Files on SQL Server Installation

    cathy.baker (12/13/2013)


    I'm getting a rule check fail "Long path names to files on SQL Server Installation media failed" when installing SQL 2012 Standard edition from a network share. What...

  • RE: Check for a list of special characters in a column

    yes you can, SQL supports some regular expressions:

    WITH

    MyLastNames(LName) AS

    (

    Select 'DeCaprio@gmail' UNION ALL

    Select 'Pitt[phone]' UNION ALL

    Select 'Schwarzenegger(phone)' UNION ALL

    Select 'Wahlberg' UNION ALL

    Select 'Damon' UNION ALL

    Select 'Willis'

    )

    SELECT

    B.LName

    FROM ...

  • RE: Stored Procedure EXEC in Excel

    you could create a temporary stored procedure.

    whether you can do it through excel, i'm not sure, but thios example works just fine; your proc obviously woudl be more complex

    CREATE PROCEDURE...

  • RE: Failing to get logged in sql server throught windows login

    anoop.mig29 (12/11/2013)


    Hi friends

    At one of our client side we are not abled to get logged in sql server through windows login and we donot have sa pwd or any...

  • RE: Developing a comprehensive database metadata report

    this generates the basics of what you are asking; you'll need to further filter on the datatype of the columns(text,image,bit, others?); the first version i tested returned an error for...

  • RE: Remove DATE ONLY from datetime column

    didn't notice this was for SQL2005, so the TIME datatype is out, but the other two converts i posted will work.

  • RE: Remove DATE ONLY from datetime column

    Dave i think the easiest is cast your datetime as TIME datatype, but here's a quick example of the three i could think of:

    /*

    create_date ...

  • RE: Developing a comprehensive database metadata report

    darth.pathos 62444 (12/13/2013)


    Thanks Lowell, I'll have to review this a little more closely after I'm out of my meeting, but (and this may simply be a case of my missing...

Viewing 15 posts - 2,776 through 2,790 (of 13,461 total)