Forum Replies Created

Viewing 15 posts - 12,766 through 12,780 (of 15,381 total)

  • RE: Query Help

    ColdCoffee (3/13/2012)


    Sean Lange (3/13/2012)


    Well sure Ron

    I'm not Ron 😉

    DOH!!! I am on a roll today. 😛

  • RE: Union inside Table value function

    Not totally sure what you are after but is this close?

    CREATE FUNCTION Getrate (@DATE DATETIME)

    RETURNS TABLE

    AS

    create table #Result

    (

    Date datetime,

    Value Decimal(18,10)

    )

    insert #Result

    SELECT

    DATE,Rate

    FROM Current WHERE DATE < @DATE

    if @@ROWCOUNT = 0

    insert #Result

    SELECT

    DATE,Rate

    FROM...

  • RE: Query Help

    I understand what you are saying but honestly that doesn't make sense from a usability point. From your sample data you have lost this row.

    insert into tmpUserDetails values (1,1,'Test1','OD1A','Row1-2')

    It...

  • RE: Clear connections of a database

    Is this in reference to detaching or dropping the database? There is now a checkbox for both of those operations to close any existing connections.

  • RE: Query Help

    Well sure Ron that would work if you want a query that will perform better on larger datasets and is a lot easier to read than the one I came...

  • RE: Query Help

    Nice work posting ddl and sample data plus desired output. That is a skill that all too often get overlooked around here. 😀

    Something like this work?

    select u.Userid, u.Locationid, case when...

  • RE: Problem with update from another table

    Quinn-793124 (3/13/2012)


    Did I miss anything on the etiquette page?

    I was able to creat and load on of the 2 tables.

    Thanks

    Quinn

    No your sample data as you posted will not work. You...

  • RE: How to use row number in excel source?

    Wow you really are frantic today. Slow down and ask your questions with enough details so somebody else can help you.

  • RE: how to create temporary table inside the store proc for getting result

    The above is what the others were asking you to do. You edited is since they asked but it was still totally unreadable. I have made it readable but it...

  • RE: how to create temporary table inside the store proc for getting result

    Here is the original post with what looks like code inside code blocks. Unfortunately it doesn't make any more sense when formatted than it did originally.

    here iam having ...

  • RE: SQL Auditing

    opc.three (3/13/2012)


    Sean, you beat me to it on the Application Name post by 4 minutes! Tsk tsk on the use of sys.sysprocesses here 😉

    True!! :blush: Old habits die hard.

  • RE: SQL Auditing

    You could do something like this...but I think this really belongs in front end code.

    You could add "Application Name" to your connection string and then you can query that.

    Server=(local);Database=xxx;Uid=xxx;Pwd=xxx;Application Name=MyNameHere

    Now...

  • RE: Update a Self Joined Table

    texpic (3/13/2012)


    In that temp table there is a field called "source"

    One record has the value "S," that is the record that needs to be updated (using a self join)

    Perhaps...

  • RE: SQL Auditing

    What exactly are you looking for? What info could you pass in a connection string that would help with auditing?

  • RE: Compare SPs across multiple databases

    Lowell I would be happy to kick the tires and provide some feedback.

Viewing 15 posts - 12,766 through 12,780 (of 15,381 total)