Viewing 15 posts - 1 through 15 (of 21 total)
I am looking for a Table Valued function to do this functionality, pass comma delimited field, and than it will treturn me an updated one so I can use that...
May 22, 2012 at 11:29 pm
I am wondering Can we make any table valued function to do this ?
where I can make it generic and which can be used with any other table
hi...
May 22, 2012 at 5:41 pm
Cadavre (5/22/2012)
However, your current design can be used if it absolutely has to.
SELECT MRN, additional_procedure, additional_procedure_Location,
STUFF((SELECT ','+
...
May 22, 2012 at 5:14 pm
Hi guys, It was our need to keep data in comma delimited field, how ever
I wrote following query to get those back in comma delimited field, I have done...
May 22, 2012 at 5:09 pm
Currently all fields in Temptable 2 are Null.
Output of Temptable 2 would be after an update statement would be as follows
Address = Newton Australia
Phone = 111111
idnumber = NULL
OfficeNumber...
May 9, 2012 at 1:19 am
Thank you for your reply, I solved the probelm,
1. conditional spilit
2. Used OLEDB command to update bundled
3. Used aggregate to group records, use max and min functions to...
March 24, 2012 at 7:37 am
I still have problem in implementing 2, can you elaborate it in more detail. Stil lI am confused how I am going to create a single record from the...
March 24, 2012 at 4:48 am
Solved the probelm, thank you so much for the guidance you have provided I really learned alot, never used CTE and Outer Apply before
once again thanks
Drop table #table
Drop table #table_with_groupid
--...
March 19, 2012 at 6:10 pm
Thanks for your quick reply; I have done exactly what you are saying that I have added columns, also trying to learn as much as possible.
I really appreciate your...
March 19, 2012 at 3:44 am
Drop table #table
Drop table #table_with_groupid
-- Prepare test data
CREATE TABLE #table
([Admissions_key] bigint NOT NULL PRIMARY KEY,
MRN nvarchar(10) NOT NULL,
hosp_code nvarchar(10) NOT NULL,
adm_datetime datetime NOT NULL,
sep_datetime datetime NOT NULL,
Sequence nvarchar(10) NOT NULL
)
SET...
March 19, 2012 at 1:33 am
SELECT t.*, g.IsGroupCorrect
FROM #table_with_groupid t
LEFT JOIN
(-- Find which group is correct and which is not
SELECT tg.GroupID,
IsGroupCorrect = CASE -- correct is group that have 'First' and...
March 19, 2012 at 1:32 am
use this code please
Drop table #table
Drop table #table_with_groupid
-- Prepare test data
CREATE TABLE #table
([Admissions_key] bigint NOT NULL PRIMARY KEY,
MRN nvarchar(10) NOT NULL,
hosp_code nvarchar(10) NOT NULL,
adm_datetime datetime NOT NULL,
sep_datetime datetime NOT NULL,
Sequence...
March 19, 2012 at 12:36 am
Drop table #table
Drop table #table_with_groupid
-- Prepare test data
CREATE TABLE #table
([Admissions_key] bigint NOT NULL PRIMARY KEY,
MRN nvarchar(10) NOT NULL,
hosp_code nvarchar(10) NOT NULL,
adm_datetime datetime NOT NULL,
sep_datetime datetime NOT NULL,
Sequence nvarchar(10) NOT NULL
)
SET...
March 18, 2012 at 11:02 pm
I just read my post, want to further clarify that from those correct records I would create a single new record and in that single new record I would be...
March 18, 2012 at 7:30 pm
First, I am really very sorry for inconvenience for not properly explaining problem one at a time and not providing proper data.
Thanks a lot, It is really a great...
March 18, 2012 at 7:05 pm
Viewing 15 posts - 1 through 15 (of 21 total)