I'm not sure if this is what you are looking for, but this artical has a section on 'Changing the port number'
http://www.tivohelp.com/archive/tivohelp.swiki.net/31.html
Hope this helps.
Jarret
sqlI'm not sure if this is what you are looking for, but this artical has a section on 'Changing the port number'
http://www.tivohelp.com/archive/tivohelp.swiki.net/31.html
Hope this helps.
Jarret
sqlquote:
> How to audit changes made by SQL users on table
> structure. Some changes include data type, column name,
> and number of columns.
> Thanks for suggestion.
Thanks for any thoughts,Well, I don't like the sounds of it ;-) , but this is how you would do it in your sproc:
DECLARE @.LoopCount int
SELECT @.LoopCount = 1WHILE @.LoopCount <= @.CardCount
BEGIN
INSERT INTO...
SET @.LoopCount = @.LoopCount + 1
END
Note that Transact-SQL does not have a FOR...NEXT loop construct. You need to make do with a WHILE loop.
Terri|||Thank you, I will give it a try. I know this sounds bad, but it is for a merge to membership cards and I need to do it this way to use Microsoft Word for the process.
Thanks again.|||I have been working with the example and have run into an issue. I thought you might have an idea. I think the problem is that the first loop does the INTO temp_Cards then the next loop fails because the temp_Cards table already exists.
sql
CREATE PROCEDURE dbo.eP_CardProcess2 (@.Start datetime,@.End datetime,@.LoopCount int)
AS SELECT @.LoopCount =1WHILE @.LoopCount <= (Select dbo.tblPledges.Number_Of_Cards From dbo.tblPledges Where (dbo.tblPledges.StartDate BETWEEN @.Start AND @.End) AND (dbo.tblPledges.Print_Card = 1) AND (dbo.tblPledges.Cards_Printed=0))
BEGIN
SELECT dbo.tblPledges.Number_Of_Cards,dbo.tblPledges.Card_Start_Date,dbo.tblPledges.Card_End_Date,dbo.tblPledges.Alternate_Card_Name,dbo.tblGivers.Email,dbo.tblPledges.RenewalDate INTO #temp_Cards
FROM dbo.tblPledges INNER JOIN dbo.tblClient ON dbo.tblPledges.Client_ID = dbo.tblClient.Client_ID WHERE (dbo.tblPledges.StartDate BETWEEN @.Start AND @.End) AND (dbo.tblPledges.Print_Card = 1) AND (dbo.tblPledges.Cards_Printed=0)
SET @.LoopCount = @.LoopCount + 1
END
Hi All,
Please suggest me is there any performance/other differences between the below two queries.
-query1
select T1.name,T1.Number, T2.Dept, T2.Desig
From T1 Inner Join T2 on T1.EID = T2.EID
-query2
select T1.name,T1.Number, T2.Dept, T2.Desig
From T1 Inner Join (Select Dept, Desig From T2) As T2 on T1.EID = T2.EID
Thanks
Senthil
There is no performance difference for your quires.
Both are executed in same way..
Suppose, if your query2, subquery has any distinct or group by clause then the query1 may perform better than query2.
|||Thanks Sekaran!I am trying to extract from some strings like the following strings the number and order them by that number:
Box 1
Box 2
Box 3
Box 20
Box 21
...(and so on)
The problem I am having is that I already extracted the number using
Substring([field],[starting position],[lenght])
but the output seems to be in a string format, so the order is not in an ascending order.
Thanks for any suggestions.
You need to cast the result as a number. It looks like your number is always an integer so the following should do it:
(DT_I4)Substring([field],[starting position],[lenght])
-Jamie
|||I tried it but I am getting an SQL Execution Error message,
I am doing this on the Query Builder using Visual Studio 2005.net
|||
If you're getting an error message its useful to post it up here!
-Jamie
|||Sorry, I am behind a very restrictive firewall at work, doesnt let me get inthere!Why should I post it somewhere else, anyways?
|||
mendez_edd wrote:
Sorry, I am behind a very restrictive firewall at work, doesnt let me get inthere!
It doesn't let you get to where? Can you replicate the error in BIDS?
mendez_edd wrote:
Why should I post it somewhere else, anyways?
Posting the error message helps people deduce what is causing the error!
-Jamie
|||Where are you doing this? Jamie’s solution was for a SSIS expression as you might use in the Derived Column Transform. Your did mention a SQL exception, but since this is a SSIS forum, we are kind of thinking you may want a SSIS solution.
To sort like a number, convert the value to a number, so strip off the text as Jamie suggested, or pad the numeric part with spaces ans sort as a string–
Box 1
Box 2
Box 21
Box 22
(Note the extra space for single digit numbers.)
Regardless of your firewall you can post to this forum, so could you not type the error message text you get into a post?