Forum Replies Created

Viewing 15 posts - 11,551 through 11,565 (of 15,381 total)

  • RE: Build string from table data

    I don't see any need for dynamic sql here. What about just using IN?

    where ITEMMAST.STYLE in (Select STYLE from TEST)

  • RE: Triggering an email.

    Lynn Pettis (6/20/2012)


    Sean Lange (6/20/2012)


    I got it Lynn. Should have the solution in just a couple minutes. ๐Ÿ˜€

    That's fine, but I helped with the code so I am just curious...

  • RE: Triggering an email.

    OK so I posted some of your last post for reference. I commented out a number of lines and replaced from there to the end of your code.

    --DECLARE @TABLE ...

  • RE: Triggering an email.

    I got it Lynn. Should have the solution in just a couple minutes. ๐Ÿ˜€

  • RE: Please help needed in PIVOT

    The path to your answer starts by reading the first link in my signature.

    In other words we need ddl, sample data and desired output. You did not post near enough...

  • RE: Dynamic SQL and Contains Clause.

    isuckatsql (6/20/2012)


    Sean,

    The query returns 9 rows, with around 10 fields.

    What is frustrating is that the more i follow the correct "rules", the more headaches i get ๐Ÿ™

    Regards

    Ian

    Have you updated your...

  • RE: Tally OH! An Improved SQL 8K โ€œCSV Splitterโ€ Function

    Nadrek (6/20/2012)


    Sean Lange (6/20/2012)


    I too have struggled with this occasionally. I use this splitter in a lot of very unconventional ways. For example say I want to find all anchor...

  • RE: Need Help with CURDATE Query

    And now you have two explanations to the same thing. ๐Ÿ˜€ There I go trying to explain other people's work again...

  • RE: Need Help with CURDATE Query

    dustinprevatt (6/20/2012)


    It worked!

    Could anyone go into detail about what this actually means ?

    postdate>= dateadd(dd, datediff(dd, 0, getdate()), 0) and postdate < dateadd(dd, datediff(dd, 0, getdate()) + 1, 0)

    I'm glad...

  • RE: Dynamic SQL and Contains Clause.

    isuckatsql (6/20/2012)


    Sean,

    The Joins were slower than the subqueries, and actually adding the recentwages and recentjobtitle fields back to the profiles table, gained 30% in performance! That is just something i...

  • RE: Need Help with CURDATE Query

    dustinprevatt (6/20/2012)


    Is getdate the same as curdate?

    If so how would i use the example in the link to show the beggining of the current day thru the end of the...

  • RE: SQL Query

    Try adding an order by to your select top 1 query. Without an order by there is no way to know which row will be returned.

  • RE: Select a date in YYYYMM format?

    Dates are a datatype. Formatting is for display. You can't change the format of a datetime. You can however get a string representation in just about any format you want.

  • RE: Need Help with CURDATE Query

    dustinprevatt (6/20/2012)


    Here is the query I am working with.

    select *

    from table where cast (postdate AS int(128)) between ({fn Curdate()}) and ({fn Curdate()}) + ({fn minute(1439)})

    I originally had this

    select *

    from table...

  • RE: Dynamic SQL and Contains Clause.

    isuckatsql (6/20/2012)


    I dont know what they do, other than make the query faster!

    I have had a few DBA's and Microsoft Enterprise support work with me on this query, and was...

Viewing 15 posts - 11,551 through 11,565 (of 15,381 total)