Forum Replies Created

Viewing 15 posts - 11,521 through 11,535 (of 13,469 total)

  • RE: Query Help

    you'll want to use the Row_Number() function featuring the Partition parameters:

    CREATE TABLE Proj

    (ProjId INT

    ,ProjDt...

  • RE: query to eliminate the many to many related data

    yep i think you got it;

    do you also need to find users with zero roles, or roles with zero users?

  • RE: query to eliminate the many to many related data

    i think it should be fairly simple, right? didn't test it, but this is my first guess:

    SELECT

    UserRole.UserID,

    UserRole.RoleID

    FROM UserRole

    LEFT OUTER JOIN (SELECT UserId, COUNT(RoleID) AS...

  • RE: entities

    clearly you've copied and pasted your homework straight from the book.

    we don't do homework, but if you show us what you've done so far, we can offer suggestions.

  • RE: Any way to hide column names from result set?

    e wants to hide the column names in his presentation layer; he's going to get column names regardless, right?

    also i think his columns are char and not varchar, so he...

  • RE: Formatting money for a report...

    ok, you'd have to tweak this to become a function i guess, but this seems to work.

    you'll have to have a Numbers or Tally table to use this, but it...

  • RE: Converting text to varchar

    glad we could help.

  • RE: Converting text to varchar

    well, if it's displayed as html, CRLF do not show up!

    html does not respect whitespace... you need {BR} markups to do that!

    (replace curly braces with LT/GT..forum doesn't like real HTML...

  • RE: Converting text to varchar

    the carriage returns are still there...are you looking at the data in SSMS in grid mode? grid mode hides CrLf.

    in SSMS, hit Control T, then re-run your query.

    your data should...

  • RE: Decision-Making Statement

    SQL has a case statement so you can say exactly that...when somestring then ...

    only caveat is all the values returned by the case statement must be the same data type.

    but...

  • RE: Issues with DCBB CHECKIDNT

    what result are you getting?

    create table #test(

    testid int identity(1,1) not null primary key,

    stuff varchar(30) )

    insert into #test

    select 'one' union all

    select 'two' union all

    select 'three' union all

    select 'four'

    select * from...

  • RE: Issues with DCBB CHECKIDNT

    yeah, you are mistaken. the reseed value assigns the next value, not next+1.

  • RE: Issues with DCBB CHECKIDNT

    your command reset the Id to zero...if you want, you could DBCC CHECKIDENT('sometablename', RESEED,-999); and the identi would start at -999, and work it's way towards zero and beyond

    I assume...

  • RE: Production security for developers - 'emergency' updates

    We had a similar situation...Developers were givien full access because an important project needed to be updated to production as soon as the developers finished a module.

    the problem was, because...

  • RE: Find the dependents on a column of primary table

    there is no built in, easy way.

    the procedure sp_fkeys [YourTableName] will report all the tables that have a FK relationship with your table, but there is no way to get...

Viewing 15 posts - 11,521 through 11,535 (of 13,469 total)