Forum Replies Created

Viewing 11 posts - 46 through 56 (of 56 total)

  • RE: sql query

    Please explain again what exactly you need. I don't completely understand

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: How to update order status based on detail information

    This is a little tricky, because you are putting the same data across multiple rows (quantity requested is in each row for the particular headerid and product). Because of...

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: Database Mail

    edward_hall76 (4/24/2013)


    I ran both of these codes and for the top one nothing showed up in the results and for the

    EXEC msdb.dbo.sysmail_stop_sp

    EXEC msdb.dbo.sysmail_start_sp

    SELECT * FROM msdb.dbo.sysmail_allitems;

    it shows...

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: sql query

    To me, it sounds like you want it be name and location. If so, it would look like this:

    select name, location,COUNT(*)

    from employees

    group by name, location

    having count(*)>3

    If...

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: mixed data columns

    frdrckmitchell7 (4/24/2013)


    Hi there

    My column is currently set up as varchar but will change it to the required field if need be.

    Kind regards

    Fred:-)

    Have you changed the data type in the table...

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: mixed data columns

    What are the settings for the column in the table you are trying to pull this data into?

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: Help with "There is insufficient system memory in resource pool 'internal' to run this query"

    What is the job trying to do? I've seen this error when I am trying to select too many records.

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: How do I modify this query to search for the keywords that are only two words apart?

    I would say try using "like" to the best you can and the different options given there. You could use something to the effect of:

    where column like '%word1 %_...

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: Export data to flat file based on field once.

    How often is data written into this table? Is it on a schedule? This might help determine how you would deal with exporting/updating the data.

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: Not all Databases getting backed up

    Having your code would be good here. If it isn't consistently backing up data (it sounds like it does back up the databases, but not on a regular basis),...

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • RE: Format values as Percent

    Don't know if you are still looking for an answer, but this should work for you:

    Select MyColumn FROM

    (

    SELECT right(replicate('0',5) +CAST(CAST(0.10*100 AS numeric(10,2)) AS varchar(5)), 5) + '%' as MyColumn

    Union

    SELECT...

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

Viewing 11 posts - 46 through 56 (of 56 total)