Viewing 15 posts - 511 through 525 (of 594 total)
I think the invalid object name error would be generated because either a) you have to properly qualify the temp table's name, or b) the temp table is not created...
February 20, 2003 at 9:26 am
This should get you started:
DECLARE @Year INT
DECLARE @Month TINYINT
SET @Year = 2003
SET @Month = 1
SELECT * FROM TransTable
WHERE DatePart(yy, TransDate) = @Year
AND DatePart(mm, TransDate) = @Month
SELECT * FROM TransTable
WHERE DatePart(yy,...
February 20, 2003 at 7:59 am
In my second post, I got col IN (SELECT) to work fine. You just have to ensure that the variable is of the same basic type as the column...
February 20, 2003 at 7:48 am
Just list the columns you do want to display in the SELECT clause.
February 20, 2003 at 7:32 am
OK, understood. I know this is probably the last thing you want to hear, but, is there any way to possibly break the process into smaller chunks that can...
February 20, 2003 at 7:11 am
Is there a reason you can't use an IF BEGIN END block of code? Why not put this into a stored procedure:
CREATE PROCEDURE DoSomething
@list VARCHAR(1000) = NULL
AS
IF...
February 20, 2003 at 6:48 am
Supposing a table, Module, with a smallint field: ModuleCode, the following code works fine when var is set = NULL or to a smallint number:
DECLARE @var smallint
SET @var = 15
SELECT...
February 19, 2003 at 1:08 pm
quote:
It appears the VARCHAR field table takes up less space but will this equal better performance?
February 19, 2003 at 11:27 am
If the client exposes an FTP server, use FTP to transfer the file from the client. Execute a batch script using a scheduled job in NT/2000. Also, you...
February 18, 2003 at 7:28 am
My best advice is to look at the execution plans for each query and try to identify if indexes are being used properly on each of the join columns. ...
February 17, 2003 at 11:23 am
From Books On Line, you can find that the CONVERT function has a style argument. When converting from a money or smallmoney to a character datatype, pass in the...
February 17, 2003 at 8:51 am
I don't believe so, because I believe the UID is partly generated from the NIC on each server, so since they all should have different NIC addresses, they should never...
February 14, 2003 at 11:20 am
Good points you make, but I think you missed my point.
If you make the field name "ID", then referencing TableName.ID makes perfect sense, even in joins, where it would be...
February 14, 2003 at 9:21 am
Viewing 15 posts - 511 through 525 (of 594 total)