Forum Replies Created

Viewing 15 posts - 16 through 30 (of 79 total)

  • RE: picking the "best" row out of a set

    If the values for a, b, and c are all positive numbers under ten:

    If it were only so simple!

  • RE: picking the "best" row out of a set

    Yes, (4, 1, 2, 1) is the row the query should return. However, your query does not return any row for pid=4.

  • RE: picking the "best" row out of a set

    Back to the original question...

    Column a is more important than b, and b is more important than c. A row with min(a) and max(b) and min(c) may not exist. Unfortunately,...

  • RE: UPDATE Syntax

    No, that syntax is not available in MS SQL Server 2000.

  • RE: Find breaks and continuous date spans

    Definitely not easy to solve. The following is not the exact solution because it handles overlapping spans in addition to consecutive spans. Note that I modified the query for your...

  • RE: Returning errors to Access from a stored procedure

    "SET NOCOUNT ON" is indispensible in procedures called using ADO. If the client sees a non-error informational message output by the procedure, the client generally will not see an error...

  • RE: Hexidecimal to Decimal

    You would have to use dynamic sql:

    declare @hex varchar(10)

    set @hex = 'FF'

    declare @sql nvarchar(50)

    set @sql = N'select @deci = 0x' + @hex

    declare @deci int

    execute sp_executesql...

  • RE: String or binary data would be truncated.

    I don't get that error. I get an overflow error if the number in the field1 is too big.

    Check other columns in the table. Check defaults, too. I just...

  • RE: a trigger question

    It's probably at the insert/update statement that you need to handle null issue. If you check the SQL that ASP app is generating, it's probably converting the variable or object...

  • RE: a trigger question

    SQL Server translates a blank or empty string to 1/1/1900. See what I mean: select convert(datetime, '')

    I've had problems with UI developers that just pass empty text box values to...

  • RE: Monitoring data changes in SQLServer 8

    Do the polling at the server. Trigger inserts row in queue table. A stored procedure loops until there's a row in the queue table; it uses WAITFOR to pause a...

  • RE: How to identify particular cusor is open or not

    loop through the cursor returned by sp_cursor_list, close and deallocate each open cursor. haven't actually used it; just read in BOL.

  • RE: Using Temp table across Linked Servers

    If you need to avoid creating object on the remote server, you can use sp_executesql.

    exec remote.master.dbo.sp_executesql @sql

    @sql contains statements to create #data,...

  • RE: Limit of 8000

    Your dynamic sql is a series of UNIONs. An alternative is to use a temp table. For each row of the cursor, execute sql to insert to the temp table....

  • RE: Assign each row of select results to sp parameters

    Use a cursor. Loop through the results. Assign column values of each row to different set of variables. Use variables as parameters to sp.

    [Looks like someone else just gave an...

Viewing 15 posts - 16 through 30 (of 79 total)