Forum Replies Created

Viewing 15 posts - 16 through 30 (of 33 total)

  • RE: How to find the nth record based on specific condition

    Not very elegant, I am still learning - but it works.

    The first row is FeederStatus 0 as your initial post required, you can change it to start from 1 by...

    http://sqlvince.blogspot.com/[/url]

  • RE: Comparing columns in two tables for unequal values

    mapperhd (9/30/2011)


    Hi,

    We have a double data entry process and want to compare the entries of one record in Table A to the duplicated entries in Table B (identical to TableA)....

    http://sqlvince.blogspot.com/[/url]

  • RE: copy data from one table to another table on different server

    amanmeet.mehta 46966 (9/30/2011)


    We need to copy data from one table to another table but the other table is on a different server.

    Please let me know in case any one has...

    http://sqlvince.blogspot.com/[/url]

  • RE: inserting data into views

    You can only insert data using a view if its referencing just one table, otherwise its ambiguous exactly where you want to insert the data.

    http://sqlvince.blogspot.com/[/url]

  • RE: CTE

    A CTE allows you to encapsulate a result set of a query and run queries against it. The result set within a CTE is temporary and exists only in the...

    http://sqlvince.blogspot.com/[/url]

  • RE: Best approach to import text file?

    Jeff Moden (10/1/2011)


    BCP with a format file that uses the end of line characters as delimiters (as well as some others).

    In actuality, that's not the "best" way... the absolute best...

    http://sqlvince.blogspot.com/[/url]

  • RE: SQL Table Index Question

    mjbkm (9/28/2011)


    vince_sql (9/28/2011)


    Sounds like the fill factor is high so it becomes fragmented quickly when you do insert, updates and deletes.

    Have you tried lowering the 'fill factor'?

    OK - what is...

    http://sqlvince.blogspot.com/[/url]

  • RE: SQL Table Index Question

    Sounds like the fill factor is high so it becomes fragmented quickly when you do insert, updates and deletes.

    Have you tried lowering the 'fill factor'?

    http://sqlvince.blogspot.com/[/url]

  • RE: Group by on join

    You can partition by department name and dense rank by salary desc like so:

    select dense_rank() over(partition by d.dept_name order by d.salary desc) as 'rank', e.eid, e.employee_name, d.dept_name, d.salary

    from employee...

    http://sqlvince.blogspot.com/[/url]

  • RE: stored procedure and pass through

    Have you tried casting it as char and passing that to the stp?

    http://sqlvince.blogspot.com/[/url]

  • RE: Syntax problem: WITH XMLNAMESPACES in subquery

    Afaik you must have a select statement immediately after a CTE.

    http://sqlvince.blogspot.com/[/url]

  • RE: Can not access databases after NAS update

    So you can see the DB in the drop down list, but you cant right click on it and see which files its pointing to?

    Have you restarted sql server service...

    http://sqlvince.blogspot.com/[/url]

  • RE: Can not access databases after NAS update

    Delete it and re-attach?

    http://sqlvince.blogspot.com/[/url]

  • RE: Issue with the collation

    I can't think of a way to do it without using dynamic SQL:

    declare @sql varchar(4000)

    declare @coll varchar(128)

    -- change the select to get your required collation names

    set @coll = (select top(1)...

    http://sqlvince.blogspot.com/[/url]

  • RE: Access to Database table

    In SSMS:

    Create the user with no extra roles.

    As admin, right click on the User -> User Mapping.

    Tick the database you want to map their username to, make sure only public...

    http://sqlvince.blogspot.com/[/url]

Viewing 15 posts - 16 through 30 (of 33 total)