Viewing 15 posts - 1 through 15 (of 47 total)
Did you get an error about ANSI padding? Not sure why but when I did
SET ANSI_PADDING ON
SELECT *
FROM students
WHERE experimentchemical.exist('/ATOM/Source/Identity/Location="SYD"') = 1 it seems to work. Location is...
June 24, 2010 at 9:31 am
I am not sure but I think the answer is no.
I read this in the 70-433 exam prep book
In SQL Server Enterprise Edition, query substitution goes one step further...
June 10, 2010 at 9:00 am
Jumping on the bandwagon: I've read "Microsoft SQL Server 2008 T-SQL Fundamentals" by Itzik. It is one of the best SQL books I've ever read. Even though the title says...
May 27, 2010 at 8:23 am
You are very welcome.
For your question see this website, which has some of the best info on SQL date functions.
http://www.sql-server-helper.com/functions/index.aspx
More specifically, what you would like to do is related to...
March 24, 2010 at 9:46 am
Not sure I understand the problem. Are you looking for savings between Day-14 and Day-7?
select datepart(yyyy,startup_Time) as 'year',
subpolicy_name as 'subpolicy',
max(datename(wk,startup_Time)) as 'week',
sum(savings) as 'weekly_savings'
from #savingstemp
WHERE startup_Time between dateadd(day,datediff(day,0,GetDate())-...
March 23, 2010 at 3:31 pm
You are welcome. Let me know how it turns out.
March 22, 2010 at 8:24 am
You can BCP that to a CSV file and add it to your email as an attachment.
Or, rewrite it with SSIS and it will do everything you wanted.
March 19, 2010 at 12:28 pm
Couldn't you just use a join?select
O.EmpNo as Eno
ISNULL(O.FirstName, 'N/A'),
ISNULL(O.LastName, 'N/A'), --what if they have different last name?
ISNULL(O.processdate, 'N/A'),
ISNULL(O.deadlinedate, 'N/A'),
ISNULL(T.addresss1 , 'N/A')
...
FROM TableOne O INNER JOIN TableTwo...
March 18, 2010 at 10:37 am
Thanks Paul and Gsquared.
I am not sure I am communicating the problem clearly. It is a Insert..Select...Order By and not a Select Into.
I am running the sameselect statment with...
March 18, 2010 at 8:17 am
Thanks for the reply. That makes sense. I am not so much want to "force" a certian order as want to figure out why the same exact query seems to...
March 17, 2010 at 12:13 pm
I think the issue is your inner N table. Since it only goes from 0 to 6, you end the series with @ste+6, which is 3/24/2010 (which happens to be...
March 15, 2010 at 11:24 am
Well, they say only death and taxes are certain, I think we need to add "bad table design will cause problems!" Jeff pointed out earlier that "Also the way the...
March 5, 2010 at 2:22 pm
3rd time a charm? I've CAST the float to decimal first before casting to Varchar.
Create FUNCTION [dbo].[NewFormatFloat3](@dIn float(53),@p int)
RETURNS varchar(100)
AS
begin
declare @ReturnString Varchar(100)
declare @LeftString varchar(50)
select @LeftString=convert(varchar, convert(money, (cast(@dIn...
March 4, 2010 at 4:19 pm
You are welcome.
Note the parameter of the function is Decimal (38,13), so when you pass a float to it, it go through an implicit coversion and the accuracy is lost...
March 4, 2010 at 2:52 pm
You are welcome! Glad it wasn't too hard.
March 4, 2010 at 2:13 pm
Viewing 15 posts - 1 through 15 (of 47 total)