Viewing 15 posts - 721 through 735 (of 1,048 total)
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...
November 18, 2010 at 6:54 am
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...
November 18, 2010 at 6:45 am
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...
November 17, 2010 at 3:04 pm
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]
November 17, 2010 at 2:56 pm
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.
November 17, 2010 at 11:30 am
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...
November 17, 2010 at 10:55 am
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...
November 17, 2010 at 10:51 am
only4mithunc (11/17/2010)
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...
November 17, 2010 at 10:44 am
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...
November 17, 2010 at 9:50 am
I wonder if that weird character is like _ or % in Tibetian? :w00t::w00t:
Try something like this: where foo like '%[?]%'
November 17, 2010 at 9:44 am
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 =...
November 16, 2010 at 12:11 pm
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...
November 15, 2010 at 10:57 am
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...
November 15, 2010 at 10:51 am
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...
November 11, 2010 at 11:47 am
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...
November 11, 2010 at 8:06 am
Viewing 15 posts - 721 through 735 (of 1,048 total)