Viewing 15 posts - 3,691 through 3,705 (of 3,956 total)
In truth, I didn't try to go through all of your requirements in detail to see which were being fulfilled. You only stated at the end that the extra...
April 26, 2012 at 5:16 am
If by removed you mean deleted, I don't see how that could happen.
Perhaps you could post some SQL to illustrate your case. I work much better when I'm seeing...
April 26, 2012 at 5:13 am
You just need to number the programs accepted and pick the first one, like this:
WITH CTE AS (
selectapplicantIdx, iptIdx, kursusIdx, tQuotaIdx
,ROW_NUMBER() OVER (PARTITION BY applicantIdx ORDER BY applicantIdx) As PgmNo
from
(
selectap.applicantIdx,...
April 26, 2012 at 4:17 am
Cadavre,
I didn't realize that if you DECLAREd the local variables within the scope of the dynamic SQL, they would still be in scope upon return to the calling session.
That is...
April 26, 2012 at 2:55 am
Vinu,
I'm going to jump in on your question to Lynn because I think you've got it all wrong.
I never approach a problem looking for an alternative to a CURSOR. ...
April 26, 2012 at 1:30 am
Yup BKK=Bangkok! More taxis than tuk-tuks now.
You mentioned you were following my posts. What are you, a stalker or something?
Merely jesting my friend. I'll take that as...
April 26, 2012 at 1:23 am
I'm no Jedi either, merely an intrepid Padawan!
I live in Thailand. That fish is a 45kg Mekong Catfish I caught last Sept. We have a fishing pond here...
April 26, 2012 at 12:53 am
You called my bluff and I realize I have to fold.
The issue I didn't think about when I said that, is that you need to DECLARE each of the local...
April 26, 2012 at 12:40 am
I love this thread! Just found it and have a way to go in reading it all though. All these people grousing about other posters not giving them...
April 26, 2012 at 12:33 am
Here's a pretty contrived reply! 🙂
You still gotta know in advance how many names you've got otherwise dynamic SQL is the only approach.
DECLARE @Table TABLE(Name varchar(30) )
DECLARE @name1 VARCHAR(30), @name2...
April 26, 2012 at 12:05 am
Vinus - Glad you like my signature!
No you don't need a loop or even dynamic SQL to do this one.
DECLARE @Table TABLE(Name varchar(30) )
DECLARE @var VARCHAR(MAX)
--Sample Data
Insert Into @Table
Select 'Jack'...
April 25, 2012 at 11:55 pm
Here is yet another alternative:
DECLARE @PERSON TABLE (
person_id int identity(1,1)
,last_name nvarchar(50)
,first_name nvarchar(50)
,middle_name nvarchar(50))
DECLARE @STUDENT TABLE (
id int identity(1,1)
,person_id int
,student_number nvarchar(20) )
INSERT INTO @PERSON VALUES ('Hanks', 'Tom', NULL)
INSERT INTO @PERSON VALUES...
April 25, 2012 at 9:41 pm
Jeff - What is it about you that attracts spam so well? Your cologne perhaps?
April 25, 2012 at 7:44 pm
I'll focus on converting a weekly forecast to a monthly forecast. The normal method for doing this is 4-4-5 (first 2 months of a quarter absorb 4 weeks each...
April 25, 2012 at 7:37 pm
Viewing 15 posts - 3,691 through 3,705 (of 3,956 total)