Forum Replies Created

Viewing 15 posts - 12,361 through 12,375 (of 13,461 total)

  • RE: SQL Syntax for newbie...

    not sure which programming language you are using, but having a recordset/datatable with Userid, RoleId and RoleName might be more flexible;there might be other items you'd want handy in the...

  • RE: SQL Syntax for newbie...

    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...

  • RE: Where is your sessions Current DATEFORMAT hidden

    doh so simple; thanks noeld

  • RE: RBAR to Set Based Solution; for the honour and the glory.

    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

    ...

  • RE: Cursor Errors

    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 =...

  • RE: Newbie: Copy database but not tables

    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...

  • RE: Table size based on the structure of the table (very urgent)

    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...

  • RE: equivalent column in sql server 2005 for cdefault column of syscolumns table

    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.

  • RE: Analyzing a T-Log, problems

    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...

  • RE: Analyzing a T-Log, problems

    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...

  • RE: Analyzing a T-Log, problems

    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...

  • RE: SQL Data-Wiping

    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...

  • RE: insert-update help

    Best (9/27/2007)


    table in which update has to be done --------------------Table a

    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...

  • RE: DateName Query

    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...

  • RE: Help with SELECT involving 2 tables !!!

    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...

Viewing 15 posts - 12,361 through 12,375 (of 13,461 total)