Forum Replies Created

Viewing 15 posts - 346 through 360 (of 413 total)

  • RE: Linked server stored proc never returns

    No errors or results are returned, the query just never times out...

    Thanks for your time - I believe you are on the right track,...

  • RE: Rows into CSV resultset

    I like that one...

    But what if the row order changes?

    SET NOCOUNT ON

    DECLARE @MyTable TABLE

    (

    ColA     INT,

    ColB     VARCHAR(10)

    )

    INSERT INTO @MyTable VALUES (1,'AAAA')

    INSERT INTO @MyTable VALUES...

  • RE: sorting a column

    You could do that of couse... But I was hoping for a solution along the lines of Noel's solution - ordering by something...

  • RE: sorting a column

    You may have a point there

    And even though it may not be useful to the original problem, I think the following is an interesting problem:

    Write...

  • RE: sorting a column

    Stealing ideas of everyone else, I suggest the following:

    SELECT * from #Numbers

    order by

    convert(int, reverse(parsename(reverse(Number),1))),

    convert(int, reverse(parsename(reverse(Number),2))),

    convert(int, reverse(parsename(reverse(Number),3))),

    convert(int, reverse(parsename(reverse(Number),4)))

  • RE: Case and Grouping

    Maybe something like this?

     

    create table CUST

    (CUSTOMER varchar(10), CREDIT_LIMIT int)

    go

    create table ITEMS

    (CUSTOMER varchar(10), DUE_DATE datetime, AMOUNT decimal(6,2))

    go

    insert into CUST

    select

    'CUST01',        1000

    union all select

    'CUST02',        800

    union all select

    'CUST03',        1500

    insert into ITEMS

    select

    'CUST01',       '2005-07-12',    60.00

    union all...

  • RE: Case and Grouping

    You need to join the two tables. If you post the table definitions, I am sure we can help you write a join

    I...

  • RE: Linked server stored proc never returns

    Both my servers have Windows 2000 SP4...

  • RE: alternative for using cursor

    Could you post definitions of all tables involved and a description of what you are trying to achieve? Some sample data would also be helpful.

  • RE: cumulative running total in a query?

    Thanks, Frank...   Although this is a very nice trick that might be useful in some situations, I agree with your remarks.

  • RE: Linked server stored proc never returns

    I have found My computer, right clicked, chosen properties and found the MSDTC tab. But there is nothing about security...

    Thanks for your help...

  • RE: cumulative running total in a query?

    Very nice.... learned a new trick there   (column RunningTot should be nullable in order for your example to run).

     

  • RE: SQL Newbie here... how would u solve for this

    Good to hear - but this question was quite hard for a newbie question

  • RE: SQL Query

    Mike, you are probably right

  • RE: SQL Query

    Are the DRAW_NUMBERs null? And do you need all of them to be null? Then try this:

    select DRAW_ID from [Draw table] where

    DRAW_NUMBER1 is null or

    DRAW_NUMBER2 is null or

    DRAW_NUMBER3 is...

Viewing 15 posts - 346 through 360 (of 413 total)