Forum Replies Created

Viewing 15 posts - 4,921 through 4,935 (of 7,429 total)

  • RE: Setting parameters

    You cannot do like this with EXEC. You can however use sp_executesql with output variable. There are several threads on this but I cannot seem to find one right now.

    "Don't...

  • RE: Single Trigger on multiple tables

    Sorry you do have to put a trigger on all three.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • RE: Building SQL with T-SQL

    Actually in Procs you can set default values and work with them.

    Ex.

    CREATE PROC sp_InData

    @FirstName = NULL, Default value of NULL

    @LastName --No default is required.

    AS

    INSERT INTO

    tblUser (FName, LName)

    VALUES (@FirstName, @LastName)

    SELECT *...

  • RE: Shrink tempdb - SQL 7.0

    I tried this once with a SQL 7 server using the 200 EM client tools to shirnk to a specific size. It worked and I saw no issues but that...

  • RE: shrinking LOG on MSDE

    Which version of MSDE, most will work with DBCC SHRINKFILE if I remember correctly.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • RE: Building SQL with T-SQL

    You can still use SP's the key is create a security layer for the incoming code.

    Ex.

    CREATE PROC sp_DynamSQL

    @keywords VARCHAR(8000),

    @col INT

    AS

    SET NOCOUNT ON

    if CHARINDEX('TRUNCATE', @keywords) > 0 OR

    CHARINDEX('DROP', @keywords) > 0...

  • RE: Querying an Excel spreadsheet from within ISQL

    Has to do normally with the account Agent or SQL itself are running under. If LocalSystem then it cannot see remote drives even mapped drives since it cannot login. This...

  • RE: Char to Date conversion

    This is another option that takes into account the rounding on the .365252 however MS SQL datetime for some reason will move 2+ or 1- sec in comparison for some.

    DECLARE...

  • RE: Calling a stored procedure within a cursor loop

    ifmanish the use only remains in effect for the duration of the EXECUTE process. Any code outside this will remain in the same DB context.

    However to save soem developement hassels...

  • RE: Using CASE to make a dynamic Order By

    Or this which is a bit shorter.

    ORDER BY

    CASE @SortBy

    WHEN 'CompetitorID' THEN CompetitorID

    WHEN 'LastName' THEN LastName

    WHEN 'State' THEN State

    END

    However, if you are doing this in a Stored...

  • RE: Report Query

    Using Gregory's example tables.

    Or just a variation which is a bit smaller and more concise.

    SELECT

    c.[name] AS Company,

    COUNT(u.lastname) AS Employees,

    SUM (case WHEN u.smoke = 'Y' THEN 1 else 0 END)...

  • RE: Package??

    Procedure grouping in SQL works like so, but I think I hit this before and found it was a different type of grouping, but hopefully we are talking same here.

    CREATE...

  • RE: Generate sql script of triggers SQL Server 2000

    For some reason this was removed in EM in 7 and 2000 (may want to make a request to MS for this option). Now as for what Andy stated you...

  • RE: Function to spell out numbers

    Here is a script I wrote a while back to convert money to the word value. Depending on what you need to accomplish you will have to alter to fit...

  • RE: can't insert more than 255 characters into a colum

    QA by default only displays 255 charcters max per column. However, you can change this by going to the menu Tools/Options then on the dialog that appears choose the Results...

Viewing 15 posts - 4,921 through 4,935 (of 7,429 total)