Viewing 15 posts - 211 through 225 (of 287 total)
I think you can do what you need to do by using the OUTPUT clause from your first insert. That will allow you to capture the new ID and the...
July 23, 2009 at 12:41 pm
Any chance you can post some DDL, DML and expected output so we can run queries against it?
July 22, 2009 at 1:03 pm
Are you using VARCHAR instead of DATETIME to pass parameter around? If so, you are bound to have issues in a muti-cultrual deployment. It may not be the easiest solution,...
July 22, 2009 at 11:24 am
Michael Valentine Jones (7/21/2009)
Lamprey13 (7/21/2009)
If you are looking for something better do a search for "sql fuzzy match" There are...
July 21, 2009 at 4:49 pm
Mark,
I have to chuckle to myself as I just went through this with a co-worker the other day who was ranting about SQL not being able to figure what he...
July 21, 2009 at 4:37 pm
This doesn't address your question directly, but it might help with your understanding of DateTimes
http://www.sql-server-performance.com/articles/dev/datetime_datatype_p1.aspx
http://www.sqlteam.com/article/datediff-function-demystified
July 21, 2009 at 3:55 pm
I'm guessing the issue is that you are dealing with sets.. So as I mentioned in my first suggestion, your derived table has to only select DISTINCT primary keys or...
July 21, 2009 at 3:49 pm
It depends on what you want exactly. Of the three versions listed you will get two different results sets back..DECLARE @Table1 TABLE (VendorID INT, Vac1 INT)
INSERT @Table1
SELECT 1, 1
UNION...
July 21, 2009 at 3:34 pm
Something quick and dirty might be the SOUNDX or DIFFERENCE functions.
If you are looking for something better do a search for "sql fuzzy match" There are bunches of articles on...
July 21, 2009 at 3:17 pm
Slick84 (7/21/2009)
Also, from what I've read and learned and experienced, it would be better to use Inner Joins rather than joining within the WHERE clause.
It all depends on the data...
July 21, 2009 at 2:57 pm
Tough to say. Presumably SQL thinks it is faster to SCAN than to SEEK and then do a bookmark lookup. Perhaps you could try a covering index?
On Instructor try an...
July 16, 2009 at 3:22 pm
Alan (7/16/2009)
If these are both uniqueidentifiers you have to convert them to (var)char prior to matching them.cast(1.id as char(36)) = cast(1.id as char(36))
Why would you think a conversion is needed?
DECLARE...
July 16, 2009 at 2:47 pm
raj acharya (7/16/2009)
SELECT * FROM TEST
WHERE CONVERT(VARCHAR, DAT_TIM ,101) >= CAST (@startdate AS DATETIME )
AND CONVERT(VARCHAR, DAT_TIM ,101) < (CAST (@startdate...
July 16, 2009 at 1:44 pm
Thanks for the information. It's better than just a plain old CODE tag, so I'll use that from now on!
Cheers!
July 16, 2009 at 12:54 pm
Viewing 15 posts - 211 through 225 (of 287 total)