Viewing 15 posts - 14,236 through 14,250 (of 15,381 total)
And you can have a single stored proc return two result sets. Look into table valued parameters. You have to set it up as type first but then you can...
August 17, 2011 at 8:07 am
You could do it in a single dataset but it is pretty craptastic. You would have to make your temp table allow for nulls in all columns. Include a rowNumber...
August 17, 2011 at 8:06 am
From looking at your sample you might want to look into nested sets. Do a search on google for nested sets and you should find plenty of examples. It is...
August 17, 2011 at 7:57 am
It really sounds like you want two result sets? Maybe you should just create two stored procs? One for each resultset. Would certainly keep it simple. I would suggest that...
August 17, 2011 at 7:08 am
Looks like you did that. You inserted some data into a single table with two different insert statements. If you want to be able to get a hold of that...
August 16, 2011 at 3:22 pm
ahhh missed that. so for one set you want only 3 pieces of information and for the the other set you want 2? Still not really sure what the output...
August 16, 2011 at 3:14 pm
Happy to help. I too have been thrown into those kind of systems. The learning curve is more like a vertical wall. Painful but once you understand and are able...
August 16, 2011 at 3:13 pm
You have two insert statements.
INSERT INTO #Test (OfficeID, PatientCount, PatientCountUnique)
and
INSERT INTO #Test(ItemCount, ItemCountUnique)
They don't insert into the same columns. You will get a table that has 5 columns. 3...
August 16, 2011 at 3:06 pm
tacy.highland (8/16/2011)
Question though, if this column is in Date format and the other fields are smalldatetime and I do a DATEDIFF between the...
August 16, 2011 at 2:01 pm
Maybe we could have sql server make dinner right after it gets done using Outlook? 😛
In all seriousness what exactly are you trying to do?
August 16, 2011 at 1:47 pm
No problem. It is always best to store your data in the correct datatype for the value. Makes life so much easier down the road. Sorry if I sounded snippy...
August 16, 2011 at 1:20 pm
The best (and only way imho) is to forget the date to int thing and put your date in a datetime field. You wouldn't put a character in an int...
August 16, 2011 at 1:00 pm
You could use Jeff Moden's awesome splitter[/url] like this:
declare @Name varchar(50) = 'MOUSE, MICKEY X'
SELECT Item as FirstName, Left(@Name, CHARINDEX(',', @Name) - 1) as LastName
from dbo.DelimitedSplit8K(LTRIM(RIGHT(@Name, CHARINDEX(',', REVERSE(@Name)) - 1...
August 16, 2011 at 12:44 pm
No problem. Feel free to come back anytime for sql help.
August 16, 2011 at 12:13 pm
This really is not a vb.net forum. You should go to an asp.net forum for this kind of help. http://forums.asp.net/%5B/url%5D is a good place to start. I can guarantee you...
August 16, 2011 at 11:53 am
Viewing 15 posts - 14,236 through 14,250 (of 15,381 total)