Viewing 15 posts - 11,506 through 11,520 (of 13,460 total)
i missed that multple result part:
to insert from a EXEC(storedproc), you have to know the columns that will be returned by the stored procedure...there's no wayt around that, so if...
Lowell
February 26, 2009 at 11:45 am
it's just a copy/paste error
change
Group by Select Case
to
Group by Case
Lowell
February 26, 2009 at 10:44 am
two ways, but you HAVE to know which column in my_table determines the order for the ORDER BY:
I'm just assuming there is a TABLEID
SELECT * FROM (
select *, ...
Lowell
February 26, 2009 at 10:32 am
maybe the table was imported under a different schema/user, so you only have read rights to that schema?
Lowell
February 26, 2009 at 9:37 am
just use the other CASE syntax:
select case
when a.staff = 6 then 'EM'
...
Lowell
February 26, 2009 at 9:15 am
sure it's fairly easy; adding a user has three things you need to do:
1. Add a login.
2. Add a user to that login
3.decide what rights they get.
Here is a script...
Lowell
February 26, 2009 at 5:14 am
you'll want to use the Row_Number() function featuring the Partition parameters:
CREATE TABLE Proj
(ProjId INT
,ProjDt...
Lowell
February 25, 2009 at 9:01 pm
yep i think you got it;
do you also need to find users with zero roles, or roles with zero users?
Lowell
February 25, 2009 at 7:48 pm
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...
Lowell
February 25, 2009 at 6:48 pm
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.
Lowell
February 25, 2009 at 5:54 pm
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...
Lowell
February 25, 2009 at 4:53 pm
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...
Lowell
February 25, 2009 at 9:48 am
glad we could help.
Lowell
February 24, 2009 at 9:50 pm
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...
Lowell
February 24, 2009 at 6:56 pm
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...
Lowell
February 24, 2009 at 6:46 pm
Viewing 15 posts - 11,506 through 11,520 (of 13,460 total)