Forum Replies Created

Viewing 15 posts - 5,776 through 5,790 (of 7,429 total)

  • RE: use variable for the name of a table

    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...

  • RE: does the order of the tables in my select ...

    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...

  • RE: Using a variable for the database name in a SP

    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...

  • RE: Using a variable for the database name in a SP

    The only way to replace the DB Name is to use dynamic SQL.

    quote:


    The variable will be based on the current...

  • RE: Performance for loading data

    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...

  • RE: Unwieldly Stored Procedure

    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

    #429514

  • RE: Track DB Object Changes

    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...

  • RE: Unwieldly Stored Procedure

    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...

  • RE: Concatenating column values?

    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...

  • RE: Filegroup dropping problem

    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....

  • RE: Error in EM

    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...

  • RE: SQL 7.0 under W2k: Lost INSERT?

    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...

  • RE: Invalid Pointer

    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...

  • RE: Invalid Pointer

    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...

  • RE: SQL SERVER Driver Error

    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....

Viewing 15 posts - 5,776 through 5,790 (of 7,429 total)