Viewing 15 posts - 4,066 through 4,080 (of 4,087 total)
I would use a CTE with a Row_Number().
WITH Rooms AS (
SELECT
Row_Number() OVER (PARTITION BY HotelRoom.RoomID ORDER BY HotelRoom.RoomID,...
July 29, 2009 at 9:39 pm
In the properties for your Data Flow Task, there is a property called MaximumErrorCount. Set this to the number of errors you want to allow before failing the Data...
July 29, 2009 at 3:49 pm
ps (7/29/2009)
select colA, colB, colC, colD=colA+colB+ colC from mytable where colD=123
I recommend that you TEST your solutions before posting, even for something apparently this simple. It helps no one...
July 29, 2009 at 2:38 pm
Iron Chef SQL (7/29/2009)
I'm trying to figure out why but maybe it's something simple...
July 29, 2009 at 2:28 pm
gyessql (7/29/2009)
If I dont want any fields from table2 then left join doesn't make a difference here, right?
Wrong. If the tables are in a one-to-one relationship then a left...
July 29, 2009 at 2:17 pm
Why don't you use
IF Not Exists (
SELECT ct
FROM ironchef.dbo.war_conferenceregistrations
WHERE eventmeetingsetupid = @eventmeetingsetupid
)
This has the advantage that it will...
July 28, 2009 at 9:36 pm
Providing enough information is key to getting the help you're requesting. Check out this article http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
Drew
July 28, 2009 at 2:03 pm
Carefully reread Jack's response and you'll find the answer to your other question.
Drew
July 28, 2009 at 1:44 pm
Because SQL doesn't process the statements from the top to bottom. Check out this website for more information http://blog.sqlauthority.com/2009/04/06/sql-server-logical-query-processing-phases-order-of-statement-execution/. The WHERE clause is processed before the SELECT clause,...
July 28, 2009 at 12:44 pm
I was thinking something similar, but I would add a Having clause like HAVING Min(IsNull(Column_Name,'') 'creation_date' OR Max(IsNull(Column_Name, '') 'last_modified_date'
You may also want to specify the...
July 28, 2009 at 12:35 pm
Another option SELECT Convert(Datetime, Replace('20Jul 15:46:1', ' ', '2009 '))
Drew
July 28, 2009 at 12:23 pm
First, you really should simplify your code. I struggled through what you were trying to accomplish with your statement. I figured out that this section CONVERT(DATETIME,STR(YEAR(CreateDate))+'-'+STR(MONTH(CreateDate))+'-'+STR(DAY(CreateDate))
+' '+STR(DATEPART(HOUR,CreateDate))+':'+STR(DATEPART(MINUTE,CreateDate))+
':'+STR(DATEPART(SECOND,CreateDate))) serves...
July 28, 2009 at 12:09 pm
Well, you could use a CASE statement or a UDF, but you would need to use it in both your SELECT clause and the WHERE clause. Otherwise you're going...
July 27, 2009 at 7:27 pm
You need to use the IIF(<Logical Expression>, <True Part>, <False Part>).
Also, I think that your false part can be greatly simplified by using the DateAdd() function. Try the following...
July 27, 2009 at 1:33 pm
I did a Google search and quickly came up with a number of web pages that tell you how to do this. There is a third-party transformation, but that...
July 26, 2009 at 6:42 pm
Viewing 15 posts - 4,066 through 4,080 (of 4,087 total)