Viewing 15 posts - 376 through 390 (of 422 total)
Try this. No loops or recursion.
SELECT
b.BranchID
,(CASE
WHEN b1.Grp1_Inherited = 1 THEN
...
October 15, 2012 at 11:37 am
Another option (scripts to create tables, indexes, and sample data attached):
SELECT
a.AraziID
,a.MantagheID
,a.EndUserID
,a.MahaleTakhrib
,a.MasahatArazi
,a.AraziImage
...
October 8, 2012 at 2:06 pm
Thanks for the corrections/comments everyone. If I get the time I will study them and update my notes on temp tables. Most of that was pulled together from multiple sources...
October 4, 2012 at 10:00 am
When you create your temp table you can define primary keys and indexes as well. This may improve performance.
Here's a copy of some notes I put together for my...
October 3, 2012 at 9:30 am
Another option using a table valued function. In this example I use an outer join but if you only want the code '82' values an inner join would work as...
October 2, 2012 at 11:09 am
This will do it:
IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL
DROP TABLE #TempTable
CREATE TABLE #TempTable
(
[ReportHistoryID] [int] IDENTITY(1,1) NOT NULL
,[Report_id] [int]...
September 26, 2012 at 7:36 pm
GilaMonster (9/26/2012)
While the string manipulation's in the select, that derived column is used in the where, so it's absolutely the same as having the string...
September 26, 2012 at 8:39 am
Jeff Moden (9/24/2012)
emoore 99634 (9/24/2012)
True, but others reading through a forum might be looking for ideas on how to tackle problems like this.+1
+2
So I will chime in that I too...
September 25, 2012 at 10:28 am
Here's another option that moves the string manipulation and identification of NULLs to the SELECT statement instead of using it in a JOIN or WHERE clause where the 'SARG-ability' of...
September 25, 2012 at 9:58 am
If your question was more than just theoretical, another way you could get the NOT 'a' values including NULLs would be to create a temporary column. I have no idea...
September 25, 2012 at 9:26 am
Here's a solution that seems to be what you are trying to do...joining one table to another table where the source table has a delimited list of key values in...
September 17, 2012 at 10:17 am
The point above about not using VARCHAR for date values is a good one. However, I recently had a situation where the application was not doing a good job of...
September 7, 2012 at 10:02 am
Leaving off the day value from my first posting above and casting the result as a TIME datatype works for me. In every scenario I tried even if the end...
September 6, 2012 at 3:12 pm
ScottPletcher (9/6/2012)
return an INT value, which at a precision level of 7 gets overflowed.
The INT can't overflow returning billionths of a second -- the max possible value is 99,999,999, which...
September 6, 2012 at 1:37 pm
Viewing 15 posts - 376 through 390 (of 422 total)