Viewing 15 posts - 61 through 75 (of 152 total)
(1) Do not use a Cursor Variable
(2) Declare the cursor Global
This allows what you need to do. So, this code should do it:
declare @sql varchar(200)
declare @tablename varchar(200)
set...
July 6, 2005 at 1:12 pm
Remove your "Set working set size" configuration option in your setup - it does not work with AWE memory.
In Enterprise Manager, this option is found in:
Right-Click Server
Properties
Memory tab;
Reserve physical memory...
June 24, 2005 at 10:48 am
Let's start by simplifying where possible. Consider the WHERE clauses (reformatted for clarity):
WHERE (dbo.tblProjectData.StateID IN (1, 2, 3, 4, 5, 7, 13, 14, 15, 16, 17, 18))
AND (dbo.tblProjectData.ProjNoShow...
June 20, 2005 at 12:09 pm
I have an answer. You're going to kick yourself when you realize what happens here... so allow me to explain.
Consider the simplified dataset below:
TableA
ID
1
3
4
6
7
8
TableB
ID Flag
1 ...
June 15, 2005 at 6:41 pm
Try something like this:
Declare @Cols varchar(4096)
Set @Cols = ''
SELECT @Cols = @Cols + COLUMN_NAME + ' '
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Categories'
Select RTrim(@Cols) As Columns
June 15, 2005 at 6:36 pm
Personally, I would create a tiny app that did nothing other than those create/drop statements, and connected via a SQL Server login with the appropriate permissions. But then, I'm...
June 10, 2005 at 5:52 pm
Hey now - don't diss the programmers. After all, I are one as well
June 10, 2005 at 11:09 am
Assumption: "Closest", in your definition, means the closest previous (same day or earlier) record.
Assumption: There will be no duplicate date/Sec_ID records
With this:
SELECT op_id, sec_id, op_val_date, sec_date, Sec_Price
FROM #tblOP...
June 9, 2005 at 4:31 pm
Thanks to you all. Not only did I get a line on some good new books, but it looks like the Archive/History table model will be used for versioning,...
June 9, 2005 at 4:23 pm
Nope - that's why I am looking for outside reinforcing opinions on this table structure. Thanks!
June 8, 2005 at 5:10 pm
>>And what do you mean with two surrogate keys using identity?
Here is what a sample table layout would look like, with generic identifiers:
VersionID int identity
RecordID int <<--- Core of PK
RecordData...
June 8, 2005 at 4:29 pm
Well, the changes I made (splitting the separate SQL Statements into multiple different Execute SQL tasks) fixed the problem entirely. So, this is a new warning:
In DTS Packages, do...
May 16, 2005 at 6:58 pm
I am just now looking at a similar issue, and I was wondering:
Is the first task an ExecuteSQL task, and, if so, does the task contain GO statements separating things...
May 13, 2005 at 11:09 am
Poot. I didn't think through the logic fully.
Ah well, can't win them all.
I should have written:
WHERE @InTblName is Null OR Tblname = @InTblName
March 10, 2005 at 5:42 pm
A couple of possibilities:
SELECT * FROM TblLog WHERE ISNULL(TblName,'-1') = ISNULL(@InTblName, '-1')
This has the built in assumption that '-1' is not legal in the field TblName. If this is...
March 3, 2005 at 12:55 pm
Viewing 15 posts - 61 through 75 (of 152 total)