Forum Replies Created

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

  • RE: comparing ip addresses in sql

    I think the nature of your problem is functional, not T-SQL related. An ip4 address is a set of 4 bytes (i.e. ranging from 0-255). Ip addresses are not defined...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Can I create Email Trigger that compares column value in inserted row with value in another table?

    How do your users enter their data into these tables? Do they create new rows in the tables using T-SQL insert statements? I'm asking because it would seem a responsibility...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: get date of first monday of the given year?

    Are you, by any chance, working on getting the iso week number? Because if you are, have a look at this article[/url] (remember to follow the discussions link, there are...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: How to convert this 'dd-mm-yyyy' to 'yyyy-MM-ddTHH:mm:ss.fff' string format?

    forsqlserver (8/19/2011)


    ...

    Can it possible the date format should change At the time of insertion/updation from hrms database to forefront database on the forefront database table's column,as I have written...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: How to convert this 'dd-mm-yyyy' to 'yyyy-MM-ddTHH:mm:ss.fff' string format?

    Then give us the DDL for the table in HRMS (the source of the information) and we can give you the select statement giving the forefront admin the dates in...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: How to convert this 'dd-mm-yyyy' to 'yyyy-MM-ddTHH:mm:ss.fff' string format?

    forsqlserver (8/18/2011)


    Hi Chris,

    Thanks,

    I have not much idea about trigger.

    Can I set the below scriptlet in a insert ,update trigger.

    if data already exist then update should run otherwise insert should run.

    use...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: using distinct

    Asking for distinct values requires SQL server to do an additional task. Not only does it need to find and return all data matching the specified criteria, it now also...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: t-sql execute faster

    It's a fairly obvious one, but have you tried this?

    alter PROCEDURE [dbo].[brw_Rec]

    @rId numeric(18,0),

    @rId2 numeric(18,0) = NULL

    AS

    BEGIN

    SELECT RID,PA_ID

    FROM...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Cursor only grab first record and repeats it always

    The time difference you notice will be from the fact that the query on your new version is completely different from that on the first version. If you don't change...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Cursor only grab first record and repeats it always

    Using a better pattern for your cursor loops you would have easily spotted this one. I always write my cursor loops (when I do write one ;-)) like this:

    declare cur...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Read XML file

    Oh, and one more that can be very handy during testing:

    declare @xml xml;

    select @xml = convert(xml, x.BulkColumn)

    from openrowset(bulk N'c:\test.xml', single_blob) as x;

    This reads the contents of the...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Read XML file

    Here are a few more tricks related to reading xml.

    On top of Lutz' suggestion to use cross apply to traverse the nested node elements, I can add to also retrieve...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: a=b=c?

    Sadly, we don't enforce putting in comments (development team of 22 people, of which 6 are mostly working with T-SQL). But we have all agreed to doing it and most...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Creating index fail in varbinary column

    It is not good practice to include binary columns in an index. Indexes are meant to be re-arranged easily, having large objects in them makes it hard to re-arrange them.

    On...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Delete Everything (not really)

    Yes, please explain this further as it is not clear what you want: For example, do you want to change the table's definitions to have the column removed from the...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

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