Viewing 13 posts - 1 through 13 (of 13 total)
Hi,
Using the suggestions by Louis i made changes in my code and my db structure. this is what i came up with after some thinking.
i now have 3 Tables [below]
mtt_threads
SET...
September 29, 2010 at 2:20 am
Louis thanks for the response. This works very well.
September 29, 2010 at 1:57 am
John Thanks for the reply however i could not get this to work.
here is some dummy data
IDmsgFrommsgTomsgReadmsgDatemsgSubjectmsgContentthreadID
1DB50748B-C86E-42F7-AA31-3D48DEBB1BFE431D7BA3-2D31-4422-B8DE-91D6F922A53E02010-09-27 02:02:19.820Sub 1Msg 11
2DB50748B-C86E-42F7-AA31-3D48DEBB1BFE431D7BA3-2D31-4422-B8DE-91D6F922A53E02010-09-27 02:08:15.693Sub 2Msg 22
3DB50748B-C86E-42F7-AA31-3D48DEBB1BFE431D7BA3-2D31-4422-B8DE-91D6F922A53E02010-09-27 02:09:07.780Sub 3Msg 33
4431D7BA3-2D31-4422-B8DE-91D6F922A53EDB50748B-C86E-42F7-AA31-3D48DEBB1BFE02010-09-27 02:54:45.150Sub 1Msg 41
5431D7BA3-2D31-4422-B8DE-91D6F922A53EDB50748B-C86E-42F7-AA31-3D48DEBB1BFE02010-09-27 02:55:25.920Sub...
September 28, 2010 at 4:41 am
Thanks.. 🙂
i tried this and it works just fine.
May 6, 2010 at 8:32 am
i really need to apologize this time..
im writing this in a .net and i had it in a Class library that was returning the output as 0 - passed and...
May 3, 2010 at 2:13 am
i tested this, it work fine but it returns the TagID and appeneds a '-1' to it always.
mister.magoo (5/3/2010)
SET NOCOUNT ON
SELECT @NewTagID=ID FROM mt_tags WHERE tag=@tag and type=@type
IF @NewTagId IS...
May 3, 2010 at 1:50 am
thanks a lot will test this right away. 🙂
May 3, 2010 at 1:25 am
Sergiy.. thanks for this, this returns the value of the new TagId if inserted and the TagId of the already existing Tag.
however if it exists i get the TagID and...
May 3, 2010 at 1:21 am
Tag is not unique.
I am just using it so that distinguish for which type of article the tag was added.
Thanks
May 3, 2010 at 1:18 am
USE [mtdb]
GO
/****** Object: Table [dbo].[mt_tags] Script Date: 05/03/2010 12:46:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[mt_tags](
[ID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[tag] [varchar](100) NOT NULL,
[type]...
May 3, 2010 at 1:16 am
i apologize for that...
the script does contain the TYPE being defined.. i just forgot to write it here.. thanks though. 🙂
mister.magoo (5/3/2010)
Your table creation script does not...
May 3, 2010 at 1:10 am
Thanks bro.
i'll test it and get back to you asap.
May 3, 2010 at 1:09 am
Here is the table.
CREATE TABLE [dbo].[mt_tags] (
[ID] [numeric] (18,0) IDENTITY (1,1) NOT NULL,
[tag] [varchar](100) NOT NULL
)...
May 2, 2010 at 7:00 pm
Viewing 13 posts - 1 through 13 (of 13 total)