Viewing 15 posts - 12,361 through 12,375 (of 13,460 total)
I would return a recordset/datatable of multiple rows instead, if it were me;
something like
]SELECT UserRoles.UserId,UserRoles.RoleId,UserRoles.RoleName from UserRoles where UserRoles.UserID In (SELECT UserId from Users where UserId=12)
Or
SELECT UserRoles.UserId,UserRoles.RoleId,UserRoles.RoleName from...
Lowell
October 1, 2007 at 2:04 pm
doh so simple; thanks noeld
Lowell
October 1, 2007 at 11:04 am
still looking at the problem, but here's the DDL I created for testing:
SET DATEFORMAT dmy
DECLARE @Sample Table(Account varchar(30), Product varchar(30), StartDate datetime,EndDate datetime,Bonus int)
INSERT INTO @Sample
SELECT '20943','A','26/01/2005',NULL,10 UNION
...
Lowell
October 1, 2007 at 8:49 am
select * from master.dbo.sysmessages where error = 16945
select * from master.dbo.sysmessages where error = 16937
select * from master.dbo.sysmessages where error = 16954
error = 16945: The cursor was not declared.
error =...
Lowell
October 1, 2007 at 8:26 am
because you don't want to overwrite the database, it's much more difficult. foreign keys for tables may bite you in the tailfeathers.
this is what I would do:
restore a copy of...
Lowell
October 1, 2007 at 8:21 am
take a look at this thread:
http://www.sqlservercentral.com/Forums/Topic385732-9-1.aspx
it has solutions for the defined size you are looking for, as well as MarcusB's solution for the largest row in the table, and finally...
Lowell
October 1, 2007 at 8:16 am
yep already created view for you. try
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
you'll see it has the definitions for all the columns int he database, including what that default value is.
Lowell
October 1, 2007 at 5:59 am
well WITH TRUNCATE_ONLY would truncate the log, but that's only whent he backup occurs.
if you restored it locally, made sure it was set to Full, and then updated a...
Lowell
September 29, 2007 at 7:34 pm
the server is local or remote from where you installed SQL Log Rescue? i know you have to install the extended stored procedures on each instance you want to use...
Lowell
September 29, 2007 at 7:10 pm
in order to use SQL Log Rescue, the database Recovery Model Option had to be set to "Full" and not "Simple" prior to the UPDATE event occurring. Check the properties...
Lowell
September 29, 2007 at 5:30 pm
usually you want to delete data in certain tables, but not "lookup tables".
the script below will delete/truncate every table in foreign key hierarchy order, but you should add to the...
Lowell
September 28, 2007 at 7:42 am
Best (9/27/2007)
table from where update has to be made----------------Table b
table structure of Table a--------------------contactid,lastname,firstname
table structure of table b-------------------leacode,lastname,firstname
table structure of table...
Lowell
September 27, 2007 at 8:22 pm
in the ORDER BY section of a statement, you can refer to data by the alias that was assigned to it, isntead of the function. will that help you out?
ie...
Lowell
September 27, 2007 at 7:27 pm
What have you tried so far?
This looks a lot like a homework question, so please bear with me;
in order to get information from two tables, you want to use a...
Lowell
September 27, 2007 at 7:16 pm
yep your right...select statements don't produce a loggable item, so there's no way to track who reads a table, unless you set up a profile.
Lowell
September 27, 2007 at 11:45 am
Viewing 15 posts - 12,361 through 12,375 (of 13,460 total)