Forum Replies Created

Viewing 15 posts - 1 through 15 (of 23 total)

  • RE: database stuck in single user and no spid

    in the end had to get someone to log into server with sys admin user and detach and then re-attach database.

    Thanks for the tip about the management studio. Next time...

  • RE: database stuck in single user and no spid

    Sudhakar Vallamsetty (9/17/2012)


    Try this and see if it fixes ur problem.

    use Master

    Go

    select * from master.sys.sysprocesses

    where spid>50 -- don't want system sessions

    and dbid = DB_ID(name of database in question)

    --Find...

  • RE: search a string that contain 6 or 7 characters but no spaces

    Hi Guys thanks for all of the replies.

    I was thinking around the lines of

    left(Pcode,3) & " " & right(Pcode,len(Pcode)-3)

    i will try out your code later today against a test...

  • RE: search a string that contain 6 or 7 characters but no spaces

    Hi Phil and cadavre

    your posts have gave me exactly what i was looked for.

    Cheers Iain

  • RE: SQL Server 2005 Cluster VS SQL Server 2005 Server

    have you installed sp2 on each node of the cluster. thats what we had to do and it works.

  • RE: update table statement

    Thanks for the advice guys managed to get it working with the following sql

    update ct_user

    set ct_user.nt_name =(select _nt_name from dbo.ct_users1$ where dbo.ct_user.name =dbo.ct_users1$._staffName)

    😛

  • RE: view always returning date time of enquiry instead of time creaed

    heres the full script

    USE [sipr]

    GO

    /****** Object: View [dbo].[view_enrolment_profile_DW] Script Date: 04/27/2010 13:42:46 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    create view [dbo].[view_enrolment_profile_DW]

    as

    selectgetdate() CURR_DATE,

    a.sce_ayrcAC_YEAR,

    sce_dptcSECTOR,

    dpt_nameDEPARTMENT_TITLE,

    a.sce_crsc + ' ' + a.SCE_BLOK+ '...

  • RE: case statement

    Hi Lowell,

    Thanks for the reply. your alternative statement saves so much space and works a treat:w00t:

  • RE: prompt user for values with t-sql

    Thanks guys i'll give that a try and let you know how i get on.

    Oh! How i miss the ease of doing PL/SQL

  • RE: RESTORE DATABASE

    i managed to get it working. The issue was with the management studio not reporting correctly.

  • RE: RESTORE DATABASE

    I tried the restore database statement and got the following message

    Msg 3153, Level 16, State 2, Line 1

    The database is already fully recovered.

    Msg 3013, Level 16, State 1, Line 1

    RESTORE...

  • RE: query of information

    Hi Guys,

    Thanks for the advise. It turns out that there was a data issue and that was causing the wrong number of rows to be returned. A variation...

  • RE: query of information

    Hi Tim,

    Table A has 2213 rows which match the criteria for

    esd_ayrc = '09/10'

    and esd_cald >'01/01/2009'

    However on comparing to table B with the query returns 2137 results.

    This is far too...

  • RE: query of information

    tried the following code

    SELECT distinct * FROM srs_esd JOIN srs_cap ON srs_esd.esd_code srs_cap.cap_stuc

    however the distinct doesn't seem to work

    tried this also

    select distinct *

    from srs_esd

    where srs_esd.esd_code...

  • RE: query of information

    select distinct *

    from srs_esd,srs_cap

    where srs_esd.esd_code not in(select srs_cap.cap_stuc from srs_cap)

    gives multiple copies of the same line. How do i get a distinct value.

Viewing 15 posts - 1 through 15 (of 23 total)