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. larrydavid

    Custom Flat File Log in SSIS 2008

    Hello, I am trying to pend to an existing tab delimited flat file (log file) and am not quite sure how to do this. I know how to create regular log file from within the SSIS package but this is custom for the format and the events. Is it possible to add exception handling to a precedence...
  2. larrydavid

    Rename a group of existing files in foreach loop

    Hi, I have already copied the files into a folder, great. Now I want to rename them. Created a foreach loop, set it to the same folder where the files exist, then added a File System Task where I have an expression to replace part of the filename. Can someone please tell me what I am missing...
  3. larrydavid

    Return distinct record with distinct value if duplicate date range

    Hi Olaf, Actually, using your example above with MAX(vw.EventCategory) is giving me exactly the output I need. Thank you so much for your support and sharing your expertise. Another learning experience. Best Regards, Buster
  4. larrydavid

    If two different values are present for a dup id, use one, else use the other

    Hi Olaf, ACtually I understand how to use the group by clause but in this case I was a bit confused by the implementation, which I have on a subsequent post now. I'm getting close using an inner/outer query using group by and tried a few things using row number(), partition functions. But, it...
  5. larrydavid

    Return distinct record with distinct value if duplicate date range

    Hello, Here's what I have, which is getting me close... SELECT m.MemberID, vw.EventCategory, vw.EventType, vw.EventEffectiveDate, vw.EventTerminationDate FROM dbo.MemberEligibilityEventVW vw JOIN dbo.Member m ON vw.MemberKey = m.MemberKey JOIN ( SELECT...
  6. larrydavid

    If two different values are present for a dup id, use one, else use the other

    Hi Olaf, Thanks for tying to help but this left me more confused then when I asked the question. I was able to get a better guide toward a solution at another forum. Cheers! Larry
  7. larrydavid

    If two different values are present for a dup id, use one, else use the other

    Hello, I have a resultset which is returning records that may have two on one MemberID: Current Output: [MemberID] [Category] [Type] 12345 ABC test 12345 XYZ test 12777 ABC test 12888 FGD test Desired Output: [MemberID] [Category] [Type] 12345 ABC test 12777 ABC test...
  8. larrydavid

    Return One Of Two Duplicate Rows Based on Column Value

    Sorry, I thought it was pretty clear, If there are two rows with TESTNAME, one will have a FLAG value of VALUE_XYZ, the other VALUE_ABC. If these two appear in a result, remove the one with VALUE_ABC. Otherwise, if the one with VALUE_ABC only exists, just display that one. If the one with...
  9. larrydavid

    Return One Of Two Duplicate Rows Based on Column Value

    Hello again, Sorry, I should have mentioned that the results are mixed with other rows, so the output is currently: [PRODUCT] [DATE] [ORDER] [FLAG] TESTNAME1 2008-05-30 354565 VALUE_123 TESTNAME 2008-05-30 123456 VALUE_ABC TESTNAME 2008-05-30 123456 VALUE_XYZ TESTNAME2 2008-05-30...
  10. larrydavid

    Return One Of Two Duplicate Rows Based on Column Value

    Hello, Currently I have output like this: [PRODUCT] [DATE] [ORDER] [FLAG] TESTNAME 2008-05-30 123456 VALUE_ABC TESTNAME 2008-05-30 123456 VALUE_XYZ And need to return one row, but only the one with VALUE_XYZ. I was trying a UNION of...
  11. larrydavid

    Removing Outer Single Quotes for WHERE IN Clause from Join(Parameters)

    Hello, I am passing a multi-valued parameter into a dataset from a TypeBusiness dropdown list: =join(Parameters!prmTypeBusiness.Value,",") Here is the dataset query behind the TypeBusiness dropdown parameter list: SELECT type_bus_code, bus_desc FROM business WHERE (type_bus_code...
  12. larrydavid

    Return Multiple Rows in Table-Valued Function

    Thank you George. This is what I did and it is working, same concept I guess: [CODE] ALTER FUNCTION dbo.fn_listTestTiers ( @dealItemCode varchar(12) ) RETURNS @tmpTable TABLE ( tierId int, tierItem varchar(12), tierQty int, tierAmt money ) AS BEGIN DECLARE @tierId...
  13. larrydavid

    Return Multiple Rows in Table-Valued Function

    Hello, I have a table-valued function in which I'm trying to return multiple rows per item code: ALTER FUNCTION fn_listTestTiers ( @dealItemCode varchar(12) ) RETURNS @TestTiers TABLE ( -- Columns returned by the function: tierId int NOT NULL, tierItem varchar(12) NOT NULL, tierQty...
  14. larrydavid

    Table-Valued Function - Returning Specific Column Values in Stored Procedure

    Hello, I have 6 possible values that can appear for 6 columns in a join table. Is it possible to return specific column values from a table-valued function and map those values to these columns? If so, could someone please provide a quick snippet or link to where I could see a code sample of...
  15. larrydavid

    rank() OVER / PARTITION BY vs CTE for numbered groups

    Thank you all for your valuable feedback and help. Much appreciated! --Larry
  16. larrydavid

    rank() OVER / PARTITION BY vs CTE for numbered groups

    Hi Mr. Brissov and all, Here is sample input: excel_item_id product_offering_id level1 level2 itemcode cat1 199021 31372 HISPANIC PEPPERS PEPPERS 313179 274791319 199022 31372 HISPANIC BEVERAGE JUICES 313180 274791328 199023 31372 HISPANIC PEPPERS PEPPERS 313181 274791319...
  17. larrydavid

    rank() OVER / PARTITION BY vs CTE for numbered groups

    Basically, the solution for this is to order the cat (catalog) sequence sequentially with the next group being renumbered 1, 2, 3, etc. But as you can see here, if the previous value stops at say 12 and the next value only has 1, the following group picks up with 13, 14, 15 and so on. 198879...
  18. larrydavid

    Assign variable to CASE statement with nested variable

    Hello, I am trying to assign a variable in an insert into statement value as such: @Base_ID = (CASE @Category_Type WHEN 'GENERAL' THEN 1 END) I keep getting syntax errors so I know this is wrong. I've been searching for examples and cannot find this so if anyone could tell me what I'm doing...
  19. larrydavid

    Implicit Conversion Problem for String to Double

    Hello, I have a VB.NET function I'm using to pass values, in this case simple addition to test. Here is a small class with the functions: Imports System.Web Imports System.Web.UI Imports System.Web.UI.WebControls Partial Public Class _Default Inherits System.Web.UI.Page Protected Sub...

Part and Inventory Search

Back
Top