Viewing 15 posts - 12,766 through 12,780 (of 15,381 total)
ColdCoffee (3/13/2012)
Sean Lange (3/13/2012)
Well sure RonI'm not Ron 😉
DOH!!! I am on a roll today. 😛
March 13, 2012 at 1:26 pm
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...
March 13, 2012 at 1:21 pm
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...
March 13, 2012 at 1:13 pm
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.
March 13, 2012 at 1:08 pm
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...
March 13, 2012 at 12:36 pm
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...
March 13, 2012 at 12:19 pm
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...
March 13, 2012 at 10:53 am
Wow you really are frantic today. Slow down and ask your questions with enough details so somebody else can help you.
March 13, 2012 at 10:21 am
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...
March 13, 2012 at 10:18 am
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 ...
March 13, 2012 at 10:16 am
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.
March 13, 2012 at 9:26 am
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...
March 13, 2012 at 9:18 am
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...
March 13, 2012 at 8:35 am
What exactly are you looking for? What info could you pass in a connection string that would help with auditing?
March 13, 2012 at 8:27 am
Lowell I would be happy to kick the tires and provide some feedback.
March 13, 2012 at 8:13 am
Viewing 15 posts - 12,766 through 12,780 (of 15,381 total)