Forum Replies Created

Viewing 15 posts - 721 through 735 (of 1,048 total)

  • RE: HAS_ACCESS help

    I'm not sure what you mean by this: "now I want to call the server and get the user database returned as one that the login has access to."

    Are...

  • RE: Multiple Active Recordset

    You did not say which API you are using but MARS is only available with SQL Native Client or the .net provider SQLClient. Assuming you are using one of...

  • RE: HAS_ACCESS help

    You are selecting from tables in master, does the user have db_datareader in master?

    If not, create a stored procedure to return the databases and give that user execute permission on...

  • RE: Multi part identifier could not be bound error

    try it like this:

    select distinct

    Rpt.fullname as [Member Name]

    ,Rpt.memid as [Member ID]

    ,e.orgeffdate as [Org Effec]

    ,e.effdate as Effective from RptAgeGrpVw rpt

    inner join enrollkeys e on rpt.memid = e.memid

    order by [Member Name]

  • RE: Repeate values

    look at aggregating the result set with min() and grouping on the name.

    You can also create a CTE and query against that for your results.

  • RE: column value balancing (copy previous value <> NULL)

    This looks like a homework assignment. 😉

    Hint: it can be done in a single update statement with CASE.

    Actually... I may have slightly mis-read your post, Nonetheless, it can still...

  • RE: Simple query, iteratively - RBAR argh...

    This can be done as a set based operation. It is not trivial but this looks like a homework problem so I think you should try to work it out...

  • RE: Space used by NULL value in different data type columns

    only4mithunc (11/17/2010)


    And one more confirmation:

    1) If the column is char(10), the max length of the string we can store is 10 bytes and each value (whether its length is...

  • RE: Space used by NULL value in different data type columns

    each row will use 4 bytes. If it is a nullable column it will have a bit associated with it to indicate that it is null or non-null.

    There is a...

  • RE: wrong select result using like on nvarchar column

    I wonder if that weird character is like _ or % in Tibetian? :w00t::w00t:

    Try something like this: where foo like '%[?]%'

  • RE: How to code to list columns' name for one table separate by ','?

    here is the method I use:

    select Case when ROW_NUMBER() over (order by column_id) > 1 then ';' else '' end+C.name

    from sys.sysobjects O

    join sys.columns C on O.id = C.[object_id]

    where O.type =...

  • RE: Bulk import of data spanning tables?

    I like your solution. That is how I would handle it... load the data into a staging table first. Check for new sources and insert them as necessary, then insert...

  • RE: CHARINDEX in WHERE clause?

    It is a concept that should be avoided whenever possible, and certainly shouldn't be a part of a design where high performance is required. It is better to use LIKE...

  • RE: Alternative encryption solutions to builtin SQL 2008 enterprise?

    It uses the same .NET encryption API that SQL Server does (part of the operating system). Its just that SQL server has its own undocumented preamble for randomization that makes...

  • RE: dec to hex

    actually there is such a builtin function: master.sys.fn_varbintohexsubstring()

    I believe it will work fine for you... you would first cast your integer or decimal data to varbinary then hand it to...

Viewing 15 posts - 721 through 735 (of 1,048 total)