Forum Replies Created

Viewing 15 posts - 526 through 540 (of 1,217 total)

  • RE: using "IF EXISTS tablebName"

    Well... it is a bit strange to use test on existence before select, but it is very often used with DDL (IF EXISTS ... DROP TABLE and then CREATE TABLE with the same...

  • RE: T-SQL required

    No, sorry, I have .

    I didn't realize that you mean the temp table creation as part of the solution - supposed that the temp table...

  • RE: T-SQL required

    John,

    I agree with your comments about data structure, but I'm afraid the query won't work... You join on i1.InvID = i2.InvID + 1 ... what if the previous...

  • RE: Help in query

    Well, of course... if we are talking about such possibilities, you could also do it this way :

    SELECT 'Red, Green, Blue'   

    Problem is that...

  • RE: Help in query

    No, you can't, as far as I know.

    Generally, such transformations are often easier done on the client side, not on the server with SQL. You didn't mention what do you need it...

  • RE: Help in query

    Right, on a temptable you can go about it this way... but even here you can make the code shorter :

    DECLARE @result varchar(8000)

    SELECT @result=ISNULL(@result+ ',','') + c.Color

    FROM #temp c

    ORDER BY [id]

    SELECT @result

  • RE: Help in query

    I'm not sure why do you need to do things like that, but here you goi... If you use permanent table Colors (instead of temporary) with the same structure and...

  • RE: Help with date difference query

    It seems to me that there is some confusion about what the 24 hours should be... Paul, could you explain that once again?

    "where the first createdate on the communications list...

  • RE: Another Date Difference Question

    Well, it is a bit sparse :-). Table name and some column names would make the job easier.

    But if you get the idea Sergiy posted, you should be able to...

  • RE: How to return data without deliminators?

    Hi,

    If you need to extract values from a comma delimited list, read this - some nice methods and evaluation of performance there.

    http://www.sommarskog.se/arrays-in-sql.html

  • RE: Best Way For Primary Key

    What Sergiy is trying to say is that it SHOULD NOT be a table, but a view.

    You are asking us to tell you which of two bad methods is better......

  • RE: Dynamic Sp creation

    Sorry for inaccurate formulation, Robert; of course you're right that semicolon can be used. What I meant is that it will not help in this particular case because of CREATE PROCEDURE.

    BTW,...

  • RE: Query for selecting distinct user

    You should not rely on queries from Access, especially if they were created in the graphical interface. You can probably take them as a starting point, but always design your...

  • RE: Query for selecting distinct user

    This really works? If yes then it is something I didn't know about (which is of course possible).

    FROM re7.dbo.CONSTITUENT

    INNER JOIN (RE7.dbo.Member INNER JOIN re7.dbo.MembershipTransaction ON re7.dbo.Member.ID = re7.dbo.MembershipTransaction.MembershipID)

    ON...

  • RE: UPDATE

    If you need to update all rows, without any WHERE clause, then my guess is that updating everything at once should work best. If there is a where clause and...

Viewing 15 posts - 526 through 540 (of 1,217 total)