Forum Replies Created

Viewing 15 posts - 12,181 through 12,195 (of 13,469 total)

  • RE: xp_cmdshell problem

    ok, The command line you pasted does make it a little clearer...and I'm going to guess that the issue is still permissions;

    hrggrouper.exe

    -i D:\PCT_Warehouse\LoadFiles\GrouperFiles\AEGrouperTemp.csv <--input file i...

  • RE: How to create a table schema using an Excel file with 200 field definitions?

    you could also do the same thing with a calculated column in Excel:

    =IF(E3="N",B3 & " DECIMAL("&F3&","&G3&"),",B3 & " VARCHAR("&D3&"),")

    that would return this for the fiurst column:

    YPNO DECIMAL(8,0),

  • RE: How to create a table schema using an Excel file with 200 field definitions?

    i just took what i thought were the relevant columns, pasted them in editPlus, and then ran some find and replace macros agaisnt it...I assumed AlphaNumeric columns were varchars,...

  • RE: random name generator query

    there's a similar thread where someone needed to generate the same kind of random sample...read matt Millers example here: http://www.sqlservercentral.com/Forums/Topic427826-338-2.aspx you'd change just the portion that did TOP 1000000...

  • RE: xp_cmdshell problem

    looks like we'll need more info...can you post the actual contents of the bat file?

    I've used xp_commandshell lots of times, and usually, if it doesn't come back it's due to...

  • RE: Convert RTF data

    glad you got it working Leonard; this is one of those things that adds to the toolbox, but you don't use too often.

    I made this function to try and...

  • RE: Convert RTF data

    I tested this just now with the same example I had posted, but with 2005; I had to enable OLE witht he surface area tool first, of course.

    It works on...

  • RE: Begin,RollBack,Commit

    similarly, there is a SET command which rollsback automatically if an error occurs, so there's no need to explicitly check for @@errors:

    create proc name

    as

    begin

    SET XACT_ABORT ON

    begin tran

    update .....

    update......

    update......

    update......

    commit tran

    end

  • RE: Formatting numeric value of calculated column in View

    if you care to use SQL's built in rounding, you can simply use the convert function:

    select convert(decimal(10,3),108451.4587) results in 108451.459

    so simply format the column in your view as convert(decimal(10,3),columnmname)

    if you...

  • RE: Julian dates

    looks like you have some holes in your logic...let me try to explain.

    typically, a julian date is the number of dasy since a certain start date.

    select getdate(),convert(int,getdate())

    results:

    DATE: 2008-01-04...

  • RE: Trouble with opening sql files

    here's the easiest way i know:

    hold down shift, and right click on a .sql file.

    select "Open With..Choose Program" from the context menu.

    browse to the right folder, which is C:\Program...

  • RE: how to write collation agnostic queries?

    you can't set a session/connection to use a certain type of collation...it's all in the database.

    we run into this occasionally, where a client will have a default collation of case...

  • RE: Find locked tables

    here's an example SQL: note that the function object_name takes a second paramter, dbid, only in SQL 2005.

    Create Table #tmplocks (

    spid int,

    dbid int,

    objid int,

    indid int,

    type varchar(30),

    Resource varchar(30),

    Mode varchar(30),

    Status varchar(30) )

    insert...

  • RE: Find locked tables

    run the stored procedure sp_lock, and pay particular attention to two columns "Type" and "Mode"

    exec sp_lock

    a value of X for Mode means it is exclusively locked, and it...

  • RE: Next Sequence Values

    a scenario like you describe depends on a few assumptions that you don't mention. Do you need the values so you can insert new records? you do know that you...

Viewing 15 posts - 12,181 through 12,195 (of 13,469 total)