Forum Replies Created

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

  • Reply To: Table reference issue

    Thank you. I'll have to add the unique constraint. I would remove the composite key, but in this case I'm a bit more wary as it might affect their work...

  • RE: Run a query to update lat/long

    Here is my table:

    DECLARE @Locations table(

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

    [Location_Name] [varchar](64) NULL,

    [Address] [varchar](60) NULL,

    [City] [varchar](40) NULL,

    [State] [char](2) NULL,

    [Zip] [varchar](10) NULL

    [Latitude] [decimal](9, 6) NULL,

    [Longitude] [decimal](9, 6) NULL

    )

    How can I use the...

  • RE: Having my query use less resources.

    Here is some sample data for tbl_Q_Tags_Map:

    TLIDTagIDQID

    15284838

    25291475

    35291480

    45291485

    512284838

    612291475

    712291480

    812291485

    Here's some sample data in tbl_Q. I only used the fields I though would be relevant, and excluded the other two fields :

    QIDStatusIDDateCreated

    28483860 ...

  • RE: Having my query use less resources.

    Here's the other tables

    CREATE TABLE [dbo].[tbl_Q](

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

    [StatusID] [tinyint] NOT NULL,

    [Question] [nvarchar](256) NOT NULL,

    [Answer] [nvarchar](2048) NULL,

    [DateCreated] [smalldatetime] NULL,

    CONSTRAINT [PK_tbl_Q] PRIMARY KEY CLUSTERED

    (

    [QID] ASC

    )WITH (PAD_INDEX ...

  • RE: Having my query use less resources.

    This my token temp table :

    DECLARE @Tokens varchar(512)='5,12'

    DECLARE @TokenTable TABLE

    (

    Tokenint

    )

    INSERT INTO @TokenTable (Token)

    SELECT Token from dbo.fn_SplitString(@Tokens,',');

    If I run the query you suggested, the count comes out to 2 and...

  • RE: Help with trigger implementation

    Thanks for both of your responses. Like I said it's, incomplete. I'm going to have to update it so that to insert records to the front table if they are...

  • RE: Scripting a query that needs all values.

    Scott, the issue I have is with the HAVING clause. The values selected may change so that would not work in all instances. However, your answer has given me an...

  • RE: Scripting a query that needs all values.

    Scott I edited my question.

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