Forum Replies Created

Viewing 15 posts - 12,091 through 12,105 (of 14,953 total)

  • RE: Pass file name as variable

    If xp_cmdshell is enabled on your server, you could use:

    create table #Files (

    FName varchar(1000))

    insert into #Files (FName)

    exec master..xp_cmdshell 'dir c:\Misc\*.txt /b'

    That will give you a table with a list of...

  • RE: Move database/ldf file

    Really!?! That's odd.

    I moved a database just last week just using the Alter Database commands, and the files ended up where I wanted them. Of course, that was...

  • RE: Creating crosstab/pivot table

    I'd go with Unpivot on this one. Performance on it has been really quite good in my tests.

  • RE: Cursor

    Trust me, I'm not mad or anything. I understand that requirements change and all that.

    I just didn't have the time to keep up with all the changes on this...

  • RE: How Important Is Usability?

    Usability is critical.

    When I used to be responsible for a front-end application, as well as the database behind it, I used to do things like watch actual users in their...

  • RE: add column in certain position

    My sympathy for you. Sometimes bosses do demand things that don't actually make sense, and it's easier to just go with it than to fight for the right way....

  • RE: Help with a T-SQL query.

    http://www.simple-talk.com has a good article by Phil Factor and Robyn Page on how to put together a dynamic pivot in T-SQL. You might want to look at that.

  • RE: NOLOCK Discussion

    I might see Nolock or Readpast as moderately useful in a Where Exists statement in a trivial issue. Even there, I'd be concerned about it, since it's hard to...

  • RE: Move database/ldf file

    Preston (9/4/2008)


    After running the above codes on a VM, I received "The file "ExampleDB" has been modified in the system catalog. The new path will be used the next time...

  • RE: add column in certain position

    Since column order in the table is very specifically supposed to NOT matter, the only way to specify it is to drop and create.

    Why does the order matter to you...

  • RE: Using Recursion

    Try this, see if it gives you what you need:

    ;with

    Starts as

    (select pat_nr, date_time

    from a_ereig

    where er_m_nr = 100),

    Ends as

    (select pat_nr, date_time

    from a_ereig

    where er_m_nr = 102)

    SELECT a_mon.pat_nr,...

  • RE: Porcess Range IDs

    jj, that still doesn't get it. You have to know the range before-hand for that solution to work. If you know the range already, then you don't need...

  • RE: Help with a T-SQL query.

    You should be able to achieve this with the Pivot function, but I recommend not bothering. Have a front-end application do your pivots for you. They're better at...

  • RE: NOLOCK Discussion

    Nolock reduces query time in two ways. First, it eliminates the establishment of a lock, which means less processing time. Second, it allows the select to read data...

  • RE: EXEC in UDF

    You might be able to accomplish what you need in a CLR UDF. Will be a whole different animal, but might give you what you need.

    Of course, the whole...

Viewing 15 posts - 12,091 through 12,105 (of 14,953 total)