Viewing 15 posts - 8,956 through 8,970 (of 13,469 total)
wow, formatting really makes it readable:
i think this is what you are after.
because they are all inner joins, it doesn't matter whether there are a zillion nested parenthesis or not.
the...
August 10, 2010 at 8:30 am
try this: this(in theory) should show you your username/context when on the remote /linked server, assuming the linked server is a SQL server:
select * from openquery
(YourLinkedServer,'select
user_name() ...
August 10, 2010 at 8:00 am
well the error is telling you you have to explicitly list the column names:
TRUNCATE TABLE [tablename]
SET IDENTITY_INSERT [tablename] ON
INSERT INTO [tablename](COLUMN1,COLUMN2,COLUMN3....)SELECT [ID],
[VENDOR_ID]
,[TAX_ID]
,[PYMT_NO]
,[NAME]
,[ADDR]
....
August 10, 2010 at 7:48 am
well here's an example from visual studio:

the dataset is used to strongly type the column data types, and a query is used to fill the dataset.
the easiest way to add...
August 10, 2010 at 7:38 am
david my knee jerk reaction is the same as yours; i'd be checking whether there is there a primary key or not on the base table.
i've seen query builders...
August 10, 2010 at 7:25 am
ODPOA (8/10/2010)
My task.-Create daily backups of the changes made that day
-Apply those changes to a remote database
backup the database, then restore the backup on the remote server. that is the...
August 10, 2010 at 6:17 am
throwing in my two cents here; if you really want to capture a full trace of everything, you can simply turn on C2 auditing; C2 auditing is actually just another...
August 10, 2010 at 6:14 am
i once worked in a shop where the original sa login was renamed and a new cripped sa login was created as a honey trap for developers who shouldn't be...
August 9, 2010 at 5:40 pm
still requires a LEFT OUTER JOIN to get the specific data: here's just one way to do it:
SELECT se.* FROM dbo.TB__Employees se
LEFT OUTER JOIN (
SELECT
sec.EmployeeID
FROM dbo.TB__EmpCourse...
August 9, 2010 at 12:33 pm
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...
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...
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 ...
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...
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...
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...
August 9, 2010 at 5:58 am
Viewing 15 posts - 8,956 through 8,970 (of 13,469 total)