Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)

  • RE: Query help

    HAVE TRIED IT DIDNT WORK?

  • RE: Query help

    thanks for the reply I have not used it before but will try it out

  • RE: password protect

    just wanted to restrict unauthorized access, i just created a login form as an alternative

  • RE: query within a query?

    tblPatient:

    CREATE TABLE [dbo].[tblPatient](

    [PatientID] [int] IDENTITY(1,1) NOT NULL,

    [CentreName] [nvarchar](max) NULL,

    [StudyID] [nchar](7) NULL,

    [RandomNumber] [int] NULL,

    [Title] [int] NULL,

    [Surname] [nvarchar](max) NULL,

    [Forename] [nvarchar](max) NULL,

    [Gender] [nchar](10) NULL,

    [DateOfBirth] [datetime] NULL,

    [Note] [nvarchar](max) NULL,

    [PAddressID] [int] NULL,

    [Telephone1] [nvarchar](max) NULL,

    [Telephone2] [nvarchar](max)...

  • RE: query within a query?

    the first query returns:

    MonthYearCity CCG AttendedCity CCG DNACancelled

    Oct2014010

    Feb2015000

    Jan2015100

    Mar2015210

    May2015010

    The second query returns

    NHSNumber DateOfBirth DateReferralReceived OrganisationCode

    121421421 1981-03-14 2015-03-14 ...

  • RE: query grouping by month

    I get an SQL Execution error I just got rid of returning the course date aswell

    thanks

  • RE: query help display all not only limit

    THANKS

  • RE: query help SUM

    thanks for your help 🙂

  • RE: query help SUM

    Nope at work doing a side project in vba and sql which I have little knowledge in

  • RE: query help SUM

    I tried altering the third line to:

    SUM(CASE WHEN a.AttendanceStatus = 2,3,4,5,6,7 THEN 1 ELSE 0 END) AS [Did not attend]

    and I tried

    replacing the commas with OR

  • RE: query help SUM

    yep did not attend can correspond to 2,3,4,5,6,7

  • RE: query help SUM

    thanks seems to work if i wanted to add attendance status = 2,3,4,5,6,7 to the second line

    SUM(CASE WHEN a.AttendanceStatus = 2 THEN 1 ELSE 0 END) AS [Did...

  • RE: QUERY HELP minus from max allowed

    thanks 🙂

Viewing 13 posts - 1 through 13 (of 13 total)