Viewing 8 posts - 1 through 8 (of 8 total)
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...
February 5, 2024 at 6:28 pm
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...
June 7, 2016 at 12:57 pm
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 ...
January 27, 2016 at 8:24 am
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 ...
January 27, 2016 at 7:49 am
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...
January 26, 2016 at 2:30 pm
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...
December 23, 2015 at 1:49 pm
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...
October 27, 2015 at 8:42 am
Scott I edited my question.
October 26, 2015 at 3:14 pm
Viewing 8 posts - 1 through 8 (of 8 total)