Forum Replies Created

Viewing 15 posts - 8,311 through 8,325 (of 15,381 total)

  • RE: Insert statment

    Greg Snidow (5/17/2013)


    Sean Lange (5/17/2013)


    When you don't do this stuff all the time it is the easy things like that which can drive you nuts. 😉

    Indeed, I'm in my SQL...

  • RE: Insert statment

    You are welcome. When you don't do this stuff all the time it is the easy things like that which can drive you nuts. 😉

    Glad you were able to get...

  • RE: Insert statment

    You don't need the values keyword when using a select as the source for your insert.

    Insert into SQL_ENVIRONMENT.dbo.DatabaseSizing (instancename,databasename,db_datafile,db_logfile,db_datasize,dateofsize)

    values

    select convert(nvarchar(50),SERVERPROPERTY ('Servername')),

    convert(nvarchar(50),sys.databases.name),

    (SELECT (SUM(sys.master_files.)*8/1024)

    FROM sys.master_files

    where sys.databases.database_id = sys.master_files.database_id and type=0),

    (SELECT (SUM(sys.master_files.)*8/1024)

    FROM sys.master_files

    where...

  • RE: Are the posted questions getting worse?

    GilaMonster (5/17/2013)


    "I know the drawbacks of nolock, in our case it cannot be avoided"

    Hmm...

    Probably doesn't wear a seatbelt on the autobahn either. 😛

  • RE: Parse a filed to look up data???

    jbalbo (5/16/2013)


    thanks for getting back...

    so on table assessment there is a field called assessment_nodes and has the values like

    (@@)@@/1/140/@@/1/2/3/84/6/11/12/82/7/28/@@/1/2/3/84/6/11/12/82/7/28/76/@@/1/2/3/84/6/11/12/82/7/28/76/77/@@

    representing a path of a tree where assesements are

    each last set on...

  • RE: Parse a filed to look up data???

    jbalbo (5/16/2013)


    Hi,

    Not sure how to start this, or even explain it right....

    I have this "Node path" field on a table looks like

    (@@)@@/1/140/@@/1/2/3/84/6/11/12/82/7/28/@@/1/2/3/84/6/11/12/82/7/28/76/@@/1/2/3/84/6/11/12/82/7/28/76/77/@@

    after looking it up each set between @@ is...

  • RE: Running xcopy commend from Select Statement

    skb 44459 (5/16/2013)


    Its going to be ondemand . I am going to create a stored procedure for it and the select statement will have a where clause (Parameters).

    Can you post...

  • RE: Running xcopy commend from Select Statement

    skb 44459 (5/16/2013)


    I am guessing that what you have is just the file name stored in the database and you want to make a physical copy of the existing file...

  • RE: Running xcopy commend from Select Statement

    skb 44459 (5/16/2013)


    select

    OrderNum,

    OrderLine,

    OrderRelease

    FileTemplateName

    from OrderLines

    I would like to run a xcopy statement for each record and copy the file from FileTemplateName to

    c:\OrderFiles\<OrderNUm>\<OrderLine>\<OrderRelease>\<OrderNum>_<OrderLine>_<OrderRelease>_FileTemplateName

    I am...

  • RE: nolock

    gchappell (5/16/2013)


    Has nolock been depricated in SQL Server 2012, or does the optimizer ignore the no lock and still run?

    I don't know that it has been deprecated but you should...

  • RE: Inserting records with a TIMESTAMP field for Archiving Table Data

    simonholzman 14059 (5/16/2013)


    Lynn Pettis (5/16/2013)


    You have documented proof that NOLOCK actually makes things run faster? It opens a whole lot of cans of worms with regard to the data...

  • RE: Need Help

    You have a couple syntax issues in your dynamic sql.

    First instead of using double quotes " you should use 2 single quotes ''.

    The bigger issue is that you have not...

  • RE: Are the posted questions getting worse?

    It is Friday for me. 😛 I am out tomorrow for field day at the kid's school.

  • RE: using multiple UNION in query

    John Mitchell-245523 (5/16/2013)


    But that's because you changed the order. The proviso was that the UNION operator is the last one to be evaluated. If you use parentheses to...

  • RE: using multiple UNION in query

    John Mitchell-245523 (5/16/2013)


    Sean Lange (5/16/2013)


    John Mitchell-245523 (5/16/2013)


    Phil Parkin (5/16/2013)


    lnardozi 61862 (5/16/2013)


    Just for completeness sake, you never use more than one UNION, which is the last one. All the rest should...

Viewing 15 posts - 8,311 through 8,325 (of 15,381 total)