Viewing 15 posts - 7,951 through 7,965 (of 9,641 total)
I did not look at your code, but as Grant has pointed out, assigning the variables in a single select would work best.
I also think you could eliminate the check...
August 13, 2008 at 8:51 am
Remove Carriage Returns and Line Feeds from the data. You can do it in SQL by converting the TEXT fields to varchar or in the Report (which is where...
August 13, 2008 at 8:46 am
Glad I could help. That is the difference between SEEKS and SCANS. This is also why you should TEST different code.
August 13, 2008 at 8:44 am
This should do what you want:
[font="Courier New"]UPDATE stgCustpmt
SET TranCmt = 'OldPmtNo: ' + CAST(CustPmtNo AS VARCHAR(20)) + ' Cmt: ' + TranCmt[/font]
August 13, 2008 at 8:42 am
From BOL (bolding added by me):
Permissions
Requires CREATE ASSEMBLY permission.
If PERMISSION_SET = EXTERNAL_ACCESS is specified, the SQL Server login must have EXTERNAL ACCESS ASSEMBLY permission on the server. If PERMISSION_SET...
August 13, 2008 at 8:38 am
I've never tried it, but I would assume that you could. At the very least you could duplicate the query in SSIS to get the data you want.
August 13, 2008 at 8:33 am
I don't know that there is a performance difference as I have not tested it, but as far as readability and maintainability I believe the WHILE LOOP is better than...
August 13, 2008 at 8:31 am
I would go along with Grant on this one. If you are doing a lot of calculations or string manipulation then an SP may not be the right place...
August 13, 2008 at 8:24 am
Nope. You need an Alter Table for every Alter Column. It would be a nice feature to have though.
August 13, 2008 at 8:18 am
In the case of your query the IN is like OR'ing which will likely cause an table scan because you have 2 indexes to check. In the other options...
August 13, 2008 at 7:57 am
When you create a non-clustered index the Clustered Index Key is added to the non-clustered index. That is what the CI pointer is. A pointer to the row...
August 13, 2008 at 5:19 am
That's interesting because the error is because you are not finding the '@' in an email address so the -1 is causing you to get an negative for the length...
August 13, 2008 at 5:16 am
I'm not sure that anything I have done would be considered snooping. Probably the worst thing I have done is check to see who had more vacation time for...
August 12, 2008 at 7:59 pm
The error occurs because the table DOES exist and SQL Server is checking dependencies. If you were to create the procedure before the table you would be fine, until...
August 12, 2008 at 3:27 pm
Sorry the real term is computed column. Here is a link about them: http://www.sqlservercentral.com/articles/T-SQL/61764/
Here is some code that demonstrates how they work:
[font="Courier New"]CREATE TABLE #temp
(
first_name VARCHAR(10),
...
August 12, 2008 at 2:16 pm
Viewing 15 posts - 7,951 through 7,965 (of 9,641 total)