Viewing 15 posts - 26,431 through 26,445 (of 26,490 total)
Or you could do this:
select
cust.custID,
cust.CustName
from
dbo.customer cust
inner join dbo.payment pay
on (cust.CustID = pay.CustID)
where
pay.DatePayment > '2004-08-01'
and (cust.CustID like '10%' or cust.CustID like '20%')
and pay.DatePayment...
August 15, 2006 at 1:16 pm
Not sure which alias to use for column disposition, but try moving "disposition in ('ER''ER/CF','WD/ER') into the join statement.
hth,
Lynn ![]()
August 14, 2006 at 2:56 pm
The transaction log file is only truncated by a transaction log backup. When SQL Server truncates the log file (and it may not shrink the actual size of the file),...
August 14, 2006 at 2:20 pm
Yes you can. Only one of them can be installed as the default instance. The other has to be installed as a named instance.
hth ![]()
You have:
--if (@ogt_code = 'Golf Course' and @ret_value >1) --I added this to try to fix
--select...
August 8, 2006 at 7:37 pm
Shouldn't the select in the if statement look like this:
select @ret_value = @ret_vale + 1
I would prefer to use a set statement where you are using select to set @ret_value:
set...
August 8, 2006 at 2:48 pm
If you are looking at dynamic sql and accessing variable, look at using the extend stored procedure sp_executesql. You can find information about that procedure in BOL and I believe...
August 8, 2006 at 2:42 pm
Here is how I do it for one of our databases:
RESTORE DATABASE [H88TRN] -- Restore of full backup
FROM DISK = N'F:\sql_backups\H88PRD\H88PRD_20060804.bak'
WITH FILE = 1,
MOVE N'H88PRD_data' TO N'F:\sql_DBs\User_DBs\H88TRN\H88TRN_Data.mdf',
MOVE N'H88PRD_log' ...
August 8, 2006 at 2:34 pm
I have a default instance of SQL 2000 and a named instance of SQL 2005 on my box as well. I have no problem selecting the named instance of SQL...
July 24, 2006 at 12:19 pm
Another way:
select * into TableB from TableA where 1 = 2
Be sure TableB does not exist. Also this will not copy indexes, constraints, etc.
July 21, 2006 at 7:03 am
If it is running 6 minutes, you may still want to do some more work. I would suggest looking at your current indexes and perhaps running SQL Profiler to see...
July 20, 2006 at 9:07 am
Actually, I've used this to do some Test-Driven Development in SQL Server. It has all been manual at this time, but it's let me capture updates without destroying the underlying...
July 19, 2006 at 7:05 am
I stand corrected on stax68's code. My misperception was on where the criteria select was being completed. I have done some testing and I am posting those results here for...
July 18, 2006 at 6:52 pm
Viewing 15 posts - 26,431 through 26,445 (of 26,490 total)