Viewing 15 posts - 1,411 through 1,425 (of 1,923 total)
Dan, as John mentioned, if you are using a WHILE Loop or CURSOR to iterate through your tables, and assuming your table is a heavy-set, then it is absoultely unavoidable...
June 3, 2010 at 10:41 am
Assume all your 3 tables has only one column.
Values in Table RequestForServices:
A1
A2
A3
A4
Values in Table ReferralSourceTypes:
B1
B2
B3
Values in Table SourceOfReferral
A1
A2
So your following query :
SELECT ClientNumber,CaseNumber,ReferralSourceTypes.ReferralSourceType,ReferralSourceTypes.ReferralSourceDesc FROM
RequestForServices,ReferralSourceTypes
will produce a Cartesian Product ...
June 3, 2010 at 10:36 am
Sachin, remove the "( )" from your code ;
Sample code:
create table #temp1
(
a int
)
select * From #temp1
alter table #temp1 add b int , c int ;
select * from #temp1
June 2, 2010 at 10:59 pm
Tim, will your string have only two facility IDs and 2 patient IDs always? Will the format of the string change from row to row..
Please post us sample data...
June 2, 2010 at 8:34 pm
I sense the OP needs 4 columns out of the string, as in, FirstFacilityID ,FirstPatieintID, SecondFacilityID, SecondPatieintID ; these 4 columns will hold only intergers, stripped from the real string..
June 2, 2010 at 8:29 pm
To illustrate what Gail had said , here is a small sample code that will auto-increment a column using IDENTITY column; execute the code in your SQL Express ; follow...
June 2, 2010 at 2:39 am
Ok, i get it.. Here is what you wanted (from what i understoood from your above post)
First lets build a temp table to hold some data that looks similar to...
June 2, 2010 at 2:30 am
Kavali, the request is quite unclear for me.. can you please put some visual samples of your request and its desired results?
for starters, this might help you!
DECLARE @SUB VARCHAR(2)
SELECT @SUB...
June 2, 2010 at 12:32 am
Goodness me, i lost track of this thread and now i saw that this alpha-numbering is a huge swear-word dump-yard.. hmmm,as u said Jeff, it will invite lawsuits.. lets wait...
June 1, 2010 at 10:26 am
sachinrshetty (6/1/2010)
Thank u coldcoffee. I will try with your first logic as it seems to be simple and smaller.With Regards
sachin
More than simple and small, that code is highly-efficient for large...
June 1, 2010 at 3:05 am
hi there, here is one piece that might interest you! This is **NOT** the optimal solution for the problem, but for now, you can have this. The desired output can...
June 1, 2010 at 3:01 am
Viewing 15 posts - 1,411 through 1,425 (of 1,923 total)