Viewing 15 posts - 1 through 15 (of 23 total)
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[allowances]') AND type in (N'U'))
DROP TABLE [dbo].[allowances]
GO
CREATE TABLE [dbo].[allowances](
[allid] [int] NULL,
[name] [nchar](10) NULL,
[amount] [int] NULL
) ON [PRIMARY]
GO
insert into allowances values(1,'a',10)
insert...
June 3, 2015 at 5:50 am
Thanks for all the responses..
I get the data from 3 different tables. I used case when to get the result as needed. It works fine as expected.
My query is :
select...
March 23, 2015 at 11:45 pm
I want the output in such a way that
if the name has codeid for order - 1,2 and 3, i need the codeid for order-1 in the first column, the...
March 23, 2015 at 5:41 am
CodeIDTypeIDNameOrderGroupId
9776210000061111DTaP/IPV/Hib11
9776310000061141DTaP/IPV/Hib21
9776410000061161DTaP/IPV/Hib31
1540611000006110 6DTaP/IPV pre-school booster41
9776610000061178dTaP/IPV 51
4052810000001182PCV 12
4053010000001172PCV ...
March 23, 2015 at 5:31 am
Thanks to all for the support.. esp to Mark Cowne.. You really helped me!
February 3, 2015 at 11:00 pm
create table tblxmldata
(id int, xmltext xml)
insert into tblxmldata values(1,'<associatedText><value type="PO">GTT taken</value></associatedText><associatedText><value type="PO">Check sugar today please</value></associatedText>')
insert into tblxmldata values(2,'<associatedText><value type="PO">Check BP today please</value></associatedText>')
I want the output as
1 ...
February 3, 2015 at 11:19 am
Thanks again
What will be the query if I need the id too in the output
1 GTT taken,Check sugar today please
February 3, 2015 at 8:04 am
Thank for the quick response
One more help please
Can I get it in a single column as comma separated as
GTT taken,Check sugar today please
February 3, 2015 at 7:49 am
i tried this
AssociatedText.value('(/associatedText/node())[1]', 'nvarchar(max)') as AssociatedText
If i have more than one value, this wont work. Please help
February 3, 2015 at 7:30 am
Hi Sean Lange,
It was a mistake. The datatype is xml. Please help
February 3, 2015 at 7:28 am
Thanks all for your valuable comments.
I will surely consider all your comments when I frame my next question.
Sorry to all who felt that its a bad question
and
Thanks to...
November 27, 2014 at 4:43 am
Could you please reword the question and let me know where I went wrong in wording the question.
Thanks for your time
November 26, 2014 at 2:05 am
Excellent Question! Thanks for sharing!
The SWITCH TO method to update identity column is new to me. Thanks for that too.
November 19, 2014 at 5:11 am
Viewing 15 posts - 1 through 15 (of 23 total)