Forum Replies Created

Viewing 15 posts - 331 through 345 (of 442 total)

  • RE: SQL query

    Here is a small snippet that might get you started.

    Quick hint, when you have a table with datetimes, do not bother converting them to string to compare them, it's a...

    Cheers,

    J-F

  • RE: SQL query

    Hi,

    Is this task in a stored procedure that you call from a scheduler (SQL Agent)?

    Do you use xp_cmdshell to execute the .exe?

    If it is already the way you are executing...

    Cheers,

    J-F

  • RE: Concatenating field values in one string

    Thanks Lynn, hope a XML Guru can see this post! 😉

    Cheers,

    J-F

  • RE: Concatenating field values in one string

    Nice Job Lynn, tried to solve it myself, and I couldn't get to group them. I've seen you use the FOR XML a few times in other posts.

    I got...

    Cheers,

    J-F

  • RE: Extracting specific data from a column

    No problem, thanks for your feedback!

    Cheers,

    J-F

  • RE: Extracting specific data from a column

    Finally got it to work.. hehe, sorry about that,

    Here it is:

    CREATE TABLE extractExample

    (

    ItemNumber CHAR(12) NOT NULL,

    ...

    Cheers,

    J-F

  • RE: Extracting specific data from a column

    My bad, that does not work, it worked for an easy example, but when you put a text that does not have those values, it still works.. and it should...

    Cheers,

    J-F

  • RE: Extracting specific data from a column

    Hi, here's something you can do:

    You can easily put this in a procedure, for reusing, it would be a good idea.

    Hope it helps,

    CREATE TABLE extractExample

    (

    ...

    Cheers,

    J-F

  • RE: Report Problem

    Can you provide some sample data in the format Jack has in his signature? It will take you a few minutes, and you will get quick answers on how to...

    Cheers,

    J-F

  • RE: SQL taking a long time

    When you reindex using the management studio, you can see the current index fragmentation. usually, a higher fragmentation percentage is the sign of poor resulting queries.

    Can you provide the query...

    Cheers,

    J-F

  • RE: SQL taking a long time

    Can you provide the full scripts for table and index creation, along with the query that is taking a long time. Also, if you could post the Actual Execution plan...

    Cheers,

    J-F

  • RE: Union all with order by not working

    Happy it helps, thanks for your feedback!

    Cheers,

    J-F

  • RE: Union all with order by not working

    Gianluca Sartori (3/12/2009)


    Try this:

    SELECT *

    FROM (

    select '0' + dbo.date_format(getdate(), 'MMDDYY') AS End_Date

    union all

    select

    '1' +

    CONVERT(varchar, dbo.date_format(mt.end_date, 'MMDDYY')) +

    left(right('0000000'+mt.client_num, 7) + '.' + right('0000000'+mt.matter_num, 7) + ' ...

    Cheers,

    J-F

  • RE: BCP : Only write the file when there is at least 1 row?

    Nice... I didnt think of the global temp table to do that. I think it's a great idea, since I don't think SQL Server should be too much in the...

    Cheers,

    J-F

  • RE: BCP : Only write the file when there is at least 1 row?

    Nice, I did not know you could do that, but that does not help in this scenario. Can you do it using a procedure?

    You are still using a count...

    Cheers,

    J-F

Viewing 15 posts - 331 through 345 (of 442 total)