Viewing 15 posts - 5,776 through 5,790 (of 7,429 total)
Andy is right. SQL (at least at this point) does not accept variables for DB, Table or Column name replacement. You will have to use EXEC.
"Don't roll your eyes at...
May 21, 2002 at 9:27 am
Generally no as the Query Optimizer Manager will makie decisions on the linking.
SO
SELECT * FROM T1 INNER JOIN T2 ON x=y LEFT JOIN T3 ON y=z
will in most cases...
May 21, 2002 at 6:50 am
Otherwise you will have to do with dynamic sql like so
CREATE PROC theProc
@dbname varchar(255)
AS
SET NOCOUNT ON
DECLARE @SQLStr VARCHAR(2000)
SET @SQLStr = 'select....
from customers
left outer join ' + @dbname + '..Bookings ....'
EXEC...
May 21, 2002 at 6:37 am
The only way to replace the DB Name is to use dynamic SQL.
quote:
The variable will be based on the current...
May 21, 2002 at 4:55 am
1) Internal fragmentation in regards to an intial load is usually limited and not much of an issue. However if the data is going into a table not matching close...
May 21, 2002 at 4:30 am
quote:
I need to apply paging logic to the result set (so it only returns x records at a time)
May 21, 2002 at 4:06 am
I don't know that this is the best way to deal with it. Personally I would start slapping restrictions on DB access and not allow people to alter items without...
May 20, 2002 at 7:55 pm
It won't make the process of changing easier but it will boost performance. Instead of doing 1 long SP create an SP for each process then in the main SP...
May 20, 2002 at 7:50 pm
Also keep in mind that if any one of the columns is null then the concatenated value will be null. If this will be possible and you want to avoid...
May 20, 2002 at 4:28 pm
Alright this will help you look at your tables to see which ones exist on which filegroups.
It uses an undocumented SP sp_objectfilegroup and sp_MSForEachTable to loop thru all the tables....
May 20, 2002 at 4:19 pm
This I beleiev is actually based in part on IE browser Java and Vb Script engines (not sure which one). Try reinstalling IE on the machine and see if fixes.
"Don't...
May 20, 2002 at 12:43 pm
Rollback do occurr by default. You may nee to look a bit at your logic to see if you can combine your triggers and SP into one action.
"Don't roll your...
May 20, 2002 at 11:51 am
What version of SQL and what Service Pack are you running. If 7 SP1 or earlier then try a more current SP. Also issue can be related to the install...
May 20, 2002 at 11:40 am
Emailed to me.
No I do not have package var'
The package uses a simple query that takes data from 2 tables on 1 DB and put it in a table on...
May 20, 2002 at 11:35 am
Indexes will not help if this is your situation. However I would let the DBA look over the query as he may be able to help find a simple solution....
May 20, 2002 at 11:09 am
Viewing 15 posts - 5,776 through 5,790 (of 7,429 total)