Viewing 15 posts - 8,956 through 8,970 (of 13,460 total)
i think this is what you want...a LEFT OUTER JOIN will help identify the ID's not int he realtionship table:
SELECT se.* FROM dbo.TB__Employees se
LEFT OUTER JOIN dbo.TB__EmpCourse sec
ON se.EmployeeID...
Lowell
August 9, 2010 at 11:30 am
here's an example using a cvustom function CHARINDEX2, which finds the nth occurrance of a string...in your case a space...
/*
Example:
SELECT dbo.CHARINDEX2('a', 'abbabba', 3)
returns the location of the third occurrence of...
Lowell
August 9, 2010 at 9:09 am
here's an example that chops up the peices for you to concatenate:
/*
--results
Years Months Days Hours Minutes ...
Lowell
August 9, 2010 at 6:31 am
i think the UPDATE FROM syntax would help in this case; i took a wild guess and hoped there was a relationship between a column named entityID?!?! and your two...
Lowell
August 9, 2010 at 6:10 am
if you need the total, you;ll need to declare a variable, and add them together:
declare @TotalRows int
SET @TotalRows = 0
Select top 10 * from Employee
SET @TotalRows = @TotalRows...
Lowell
August 9, 2010 at 6:03 am
For Openquery to filter the results on the Linked server side, I believe the where statement needs to be inside the openquery to avoid the performance issue where the table...
Lowell
August 9, 2010 at 5:58 am
i actually keep the correct link to that script to generate insert statements in my signature on the hopes it gets someone to post their data in the forum:
http://vyaskn.tripod.com/code/generate_inserts_2005.txt
Lowell
August 9, 2010 at 5:44 am
well it's not a fixed ratio; a database with lots of varbinary/image/blob type data will have a less effective compression ratio than one that is mostly just text and numbers.
you...
Lowell
August 6, 2010 at 11:04 am
based on his latest description, i think the issue has nothing to do with formatting...it's the master data is on row 1 of the results, but he wants rows 2/3/etc...
Lowell
August 6, 2010 at 10:13 am
just make it easier on yourself...
create 5 views, one for each group of statements you will need to gather....
yeah the view will have the 12 statements for each synonym, but...
Lowell
August 6, 2010 at 8:27 am
i'm guessing permissions maybe? the job when run under the SQL Agent might not have permissions to some shared resource or not? what is the job doing?
Lowell
August 6, 2010 at 8:07 am
don't forget that the Express edition does not include the SQL Agent;
you should spend the $49 dolalrs and get the Developer Edition, which includes the SQL Agentand so much...
Lowell
August 6, 2010 at 8:02 am
i think synonyms might be a good fit for what you are trying to do.
a synonym can point to an object..table,view,procedure, etc.
so you could make a suite of 12 synonyms...
Lowell
August 6, 2010 at 7:56 am
formatting shouldn't really be done in the SQL if at all possible, but you can still do it.
one easy way is to convert the results to the right CHAR size:
SELECT...
Lowell
August 6, 2010 at 7:48 am
doh i should have tested that: wrapped the datediff evaluation with the convert first, sorry:
select ABS(CONVERT(BIGINT,(DateDiff(minute, getdate(), '1900-01-01'))) * 60),
ABS(CONVERT(BIGINT,(DateDiff(minute,...
Lowell
August 5, 2010 at 9:50 am
Viewing 15 posts - 8,956 through 8,970 (of 13,460 total)