Viewing 15 posts - 11,506 through 11,520 (of 13,462 total)
a Federated Table is kind of neat in MYSQL: basically Federated tables are tables with storage in a remote server.
The closest equivilent in SQL would be a view which points...
February 27, 2009 at 10:16 am
well the way to do it is to add a check constriant on the column, and the check contraint uses a user defined function:
CREATE TABLE WHATEVER(
WHATEVERID INT,
DBNAME sysname CHECK(dbo.CheckDBName(DBNAME)...
February 27, 2009 at 7:20 am
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...
February 26, 2009 at 11:45 am
it's just a copy/paste error
change
Group by Select Case
to
Group by Case
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 *, ...
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?
February 26, 2009 at 9:37 am
just use the other CASE syntax:
select case
when a.staff = 6 then 'EM'
...
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...
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...
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?
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...
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.
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...
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...
February 25, 2009 at 9:48 am
Viewing 15 posts - 11,506 through 11,520 (of 13,462 total)