Forum Replies Created

Viewing 15 posts - 346 through 360 (of 907 total)

  • RE: How to combine results from one column?

    Here is another way to use a pivot table query. This example is a modified version of one of the pivot table examples on my website:

    create table Ttest (id...

    Gregory A. Larsen, MVP

  • RE: Job Status Stuck Performing Completion Actions

    I remember someone saying this has something to do with your mail server going down. Might try:

    xp_stopmail, then xp_startmail.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out...

    Gregory A. Larsen, MVP

  • RE: text field that contains varying strings

    Maybe something like this might work for you. This should return one word proceeding the characters "Domain:"

    create table x (row int, test_text text)

    insert into x values (1,'User name: claremsu...

    Gregory A. Larsen, MVP

  • RE: Update with comma embeded

    I don't seem to get an error when I run this code on my SQL Server 2000 machine:

    create table task(taskid int, taskname varchar(100), comment varchar(100))

    insert into task values (5, 'garbage','garbage,...

    Gregory A. Larsen, MVP

  • RE: Correct CASE

    Ok, I have to confess I spelled it wrong first, but the word just doesn't seem to be one that is part of my everyday communication.

    Sure is amazing...

    Gregory A. Larsen, MVP

  • RE: Restore

    Yes. One optin would be to have a job on the from server that does the following:

    Step 1) Takes a backup of the database.

    Step 2) Runs sp_start_job...

    Gregory A. Larsen, MVP

  • RE: text field that contains varying strings

    I thinks something like this might work. Let me know if this does the trick:

    create table x (row int, test_text text)

    insert into x values (1,'Logon Failure: Reason: Unknown user...

    Gregory A. Larsen, MVP

  • RE: SQL job in Seconds

    Here is what I might do:

    1) Add a job that never end, and all it does is run your process every ten seconds.

    or

    2) Add a job that never ends, and...

    Gregory A. Larsen, MVP

  • RE: Correct CASE

    Possible COALSCE might be slightly faster than ISNULL. Even if it is not, it does support more than than just two columns. Here is an example:

    create table x...

    Gregory A. Larsen, MVP

  • RE: Restore

    A backup and retore will work. Or you could detach the database, make copies of the physical log and data files, and copy them to the external box, and...

    Gregory A. Larsen, MVP

  • RE: Display sp code in an web browser

    You might also try:

    sp_helptext <your sp>

    This sp will return the the code for the SP.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • RE: Create Index in TSQL using ASC | DESC

    Try this out:

    CREATE nonCLUSTERED INDEX index_by_Returned_Date

    ON finaltable(Returned_Date DESC)

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • RE: collation mismatch after upgrading DB to SQL2K

    In this http://www.sqlservercentral.com/columnists/glarsen/collate_part1.asp I described how to work with different collating sequences.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • RE: nth record of a recordset

    Just wanted to correct EWILSON10's two query option a little. You need to sort each query in different orders (inner one asc, outer one decending)

    USE Northwind

    SELECT TOP 1 tablename.LastName

    FROM...

    Gregory A. Larsen, MVP

  • RE: Starting database Message from SQL log

    I'm wondering if these are related to your database closing when no one is using it. If this is the case, it would open whenever someone needed to use...

    Gregory A. Larsen, MVP

Viewing 15 posts - 346 through 360 (of 907 total)