Forum Replies Created

Viewing 15 posts - 8,956 through 8,970 (of 13,469 total)

  • RE: convert access query to sql server

    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...

  • RE: Do linked and remote server use Windows authentication?

    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() ...

  • RE: Setting IDENTITY_INSERT not working...

    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]

    ....

  • RE: Update Transformed to WHERE Clause on All Columns

    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...

  • RE: Update Transformed to WHERE Clause on All Columns

    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...

  • RE: SQL Trace

    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...

  • RE: SQL Trace

    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...

  • RE: Wierd situation. sa [SysAdmin] cannot grant SysAdmin rights to other logins.

    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...

  • RE: Inverse of my Query Results?

    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...

  • RE: Inverse of my Query Results?

    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...

  • RE: substring

    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...

  • RE: date time diff

    here's an example that chops up the peices for you to concatenate:

    /*

    --results

    Years Months Days Hours Minutes ...

  • RE: Select Update

    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...

  • RE: Tracing SQL statements and number of records affected

    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...

  • RE: Apply WHERE criteria to a view based on a linked server

    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...

Viewing 15 posts - 8,956 through 8,970 (of 13,469 total)