Forum Replies Created

Viewing 15 posts - 5,011 through 5,025 (of 15,381 total)

  • RE: Union error due to field types

    Scott Coleman (5/2/2014)


    SELECT OptionCode, OptionDesc,

    OptionLongDesc = CAST(OptionLongDesc AS NVARCHAR(MAX)) , UnitPrice

    FROM tbMasterOption

    WHERE ...

    Did you use the same cast in...

  • RE: Union error due to field types

    DaveK2014 (5/2/2014)


    I am trying to run the query below. Between the %% will be certain text that we are looking for.

    The problem is the union blows up because optionlongdesc is...

  • RE: Help!!!

    saifmahatab (5/2/2014)


    I need help in creating a temporary table where I can log the QueryName, StartTime, Endtime, Duration

    and run the Select query 100 times with to check the time

    Pretty...

  • RE: Time Difference Help

    This can get a little bit tricky when the dates span multiple days. If they are within the same day you can use something like this. It will actually work...

  • RE: Outer Join performance

    robin.pryor (5/2/2014)


    Sean Lange (4/28/2014)


    robin.pryor (4/28/2014)


    Can someone please give me advise on a better way to write the following?

    SELECT a.BoxId, b.field1 as value1, c.field1 as value2, d.field1 as value3, e.field1 as...

  • RE: Joining on views in queries instead of tables

    John Deupree (5/2/2014)


    I’m working on a legacy DB and I notice that several of the procedures do joins on views. Some of these views were created on very wide...

  • RE: Unable to sum column values

    vigneshkumart50 (5/2/2014)


    No I don't get sum for 2 nd column

    What do you mean you don't get sum? What do you get? Help us out here by giving us some details.

    I...

  • RE: Join

    So is your query ok now or do you still need help?

    --edit--

    Seems you were posting at the same time I was. Glad you figured it out.

  • RE: Consolidated Dates Queries

    Steve Jones - SSC Editor (5/1/2014)


    I have seen a few questions about how to get the first, last days of the month, year, etc.

    Can someone write a short consolidated...

  • RE: Create DML trigger for single table for a Database in SQL 2008R2

    This is a difficult situation. The trigger you have created is trying to deal with a situation that I find to be very painful and not very useful in the...

  • RE: Second Last work day of month

    praveen.arokiam (5/2/2014)


    Hi,

    Thanks for the reply. Yes the workday runs through Monday to Friday

    So a minor tweak to what I posted will get you the last Friday of any given month.

    declare...

  • RE: Need help with query rewrite

    shahgols (5/1/2014)


    Yes Sean, you do need more patience, nowhere did I say that I didn't spend any time on this myself. In fact, I have spent 2 days on...

  • RE: Output random dates that falls on a weekday

    JStevenson1 (5/1/2014)


    I have a column called Transaction Date. I'd like to populate a new date that falls within 12 days from the Transaction Date that falls on a weekday.

    TransactionID: TransactionDate:

    ...

  • RE: Need help with query rewrite

    Then...you have been around here long enough to know better than just slapping up a query and asking how to fix it. You have obfuscated the tables and such to...

  • RE: Need help with query rewrite

    shahgols (5/1/2014)


    Hi all,

    We have a very expensive query that I am tring to rewrite, but the rewritten query (even though is much faster) doesn't return the same number of...

Viewing 15 posts - 5,011 through 5,025 (of 15,381 total)