Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. smn198

    When to stage? Improving poor performance.

    I've got a fairly simple package taking a file, unpivoting it and then sorting it. The problem is, this is taking forever. The file contains about 1.8 million rows and 9 columns (including the pivot) so we end up with 14.4 million rows. It is using stacks of memory (our test and development...
  2. smn198

    Converting a string with multiple lines into multiple rows with 1 line

    Hello! I've just picking up SSIS but I've run into a problem where I want to do some non-standard string manipulation. I've got a data source with 2 columns. ID and data. The data column is a string but has multiple lines within it seperated by return characters. I would like each line of data...
  3. smn198

    Poor performing query with a sebquery in the select

    I didn't explicitly state it be a greater payment id doesn't nessisarily mean that it is a later gift (which is what I'm after). RGA_Activity rga table RecurringGiftID field PaymentID field (fk to WH_Gift.RESystemID) WH_Gift p table RESystemID field Date field For each...
  4. smn198

    Poor performing query with a sebquery in the select

    Hi all, I'm trying to improve the performance of a very slow running query. I'm linking master records to child or payment records via an intermediate table. Diagram: http://tinypic.com/view/?pic=ny7lf9 For each master record there may be many entries (or 0) in the linking table and for each...
  5. smn198

    Concat columns

    Never mind then
  6. smn198

    Concat columns

    Thanks swampBoogie Unfortunately I cannot use functions
  7. smn198

    Concat columns

    Sorry. I didn't specify. I need ANSI SQL. Thanks
  8. smn198

    Concat columns

    Hi All I have the following table: ID NAME ----------------------- 1 Bob 1 Chris 2 Harry 2 Joe 2 Tim 3 Tom 4 John 5 Larry Is there any way at all to return this: ID NAMES ------------------------------------- 1 Bob, Chris 2 Harry...
  9. smn198

    SELECT TOP <variable> FROM ...

    Thanks for the replies. I neglected to mention the SQL is actually going into an application. All I can write are static queries and not Dynamic SQL as what I write is a string to be used as a subquery.
  10. smn198

    SELECT TOP <variable> FROM ...

    I am trying to get around SQL's inability to use TOP with a variable. I am trying to select the TOP X and order by NEWID() to get X random records in a table. Any ideas?!
  11. smn198

    Tricky query

    Hi Glenn Thanks for your reply I want all the columns in the original table returned and just a few of the rows. It may be easier if I just ask for the ones I want to loose. Then I can subtract them from the original query. In that case I want to select 1 row for each variation of ID, Type...
  12. smn198

    Tricky query

    I've got a little stuck! I as the solution I have doesn't work properly and it is sloooooooooow! I have a table setup with the following data: ID Type Value Date 1 1 Yes 1 1 No 1 2 No 01/01/2004 1 2 Yes 01/01/2005 1 2 Yes 01/01/2005 2...
  13. smn198

    Case in select statement

    Thanks very much everyone. Have sorted it out. It was actaully being filtered by something in Crystal.
  14. smn198

    Case in select statement

    This has an unexpected side effect. When the Last1stPaymentReminderDate is set to null by the case statement, that row is excluded from the results. How do I keep them?
  15. smn198

    Case in select statement

    Thanks, I must be too tired...
  16. smn198

    Conditional Join

    *Closed*
  17. smn198

    Setting null in a function

    Thanks Both. lbass, that solved the display problem. I guess it is not possible to assign or leave as null :S
  18. smn198

    Setting null in a function

    Hi Ian That nearly works although now I get the date 1/1/1900 instead of a blank. I know I could suppress this but I would prefer if it were just blank. Is it possible to assign null? Shouldn't it be null if it is unassigned? Thanks Steve
  19. smn198

    Case in select statement

    Thanks for that but no luck... This is what I have in my select statement now: SELECT MAX("GiftPayment"."DTE") AS LastPaymentDate, CASE WHEN MAX("Reminder1st"."ATTRIBUTEDATE") < MAX("GiftPayment"."DTE") THEN NULL ELSE MAX("Reminder1st"."ATTRIBUTEDATE") AS...
  20. smn198

    Setting null in a function

    I have two functions, 1stReminder and 2ndReminder. What I expect to happen is as follows: o 1stReminder - Will return the Last1stReminderDate if it is greater than the LastPaymentDate or the LastPaymentDate is null. o 2ndReminder - Will return the Last2ndReminderDate it is greater than...

Part and Inventory Search

Back
Top