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 strongm 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. lyudmila

    IS IT POSSIBLE IN SQL SERVER?

    It worked! Thank you so much, so simple and so briliant! 1)But I don't understand part of syntax, what means "select min(WK_END) WK_END," in subquerry? (select min(WK_END) WK_END, sku, price from Table1 group by sky, price)? 2)Also I have a new chalenge - if PRICE in the fisrt week of analyzed...
  2. lyudmila

    IS IT POSSIBLE IN SQL SERVER?

    Hi all, My table have just few fields. I need to compare price in current week to prior week, determine PRICE DROP and put flag for this record. WK_END SKU PRICE ------------------------------------- 07/18/03 5565317330 1.29 07/25/03 5565317330 1.29 08/01/03 5565317330 1.29...
  3. lyudmila

    import to SQL Server txt file with exponential values

    I have to import to SQL server text file with field in exponential format: |40|10|1|+3.00000000000000E+000|+6.70000000000000E+000|+6.70000000000000E+000| Is any one aware of the best way to that? To import as CHAR and then convert to numeric? Too many fields to convert! Your help greatly...
  4. lyudmila

    Take MAX string to roll up multi records in one

    I have messed up the script I'm using SELECT DISTINCT vndnumber, vendorname=MAX(vendorname) INTO DBO.P_VENDOR FROM DBO.T_VENDOR GROUP BY vndnumber Example: vndnumber vendorname STRING LENGTH ------- ------------------------------------...
  5. lyudmila

    Take MAX string to roll up multi records in one

    Hi, I have a very silly question If I have three records vndnumber vendorname ---------- -------------- 296333 Kraft Inc. 296333 Kraft Inc 296333 Kraft Inter. and I need to group by vndnumber and make one record from these three and I was told to take...
  6. lyudmila

    Search String........

    I would create a new field CODE_new = CASE LEN(ISNULL([A].[Code],'')) WHEN 0 THEN CAST('' AS CHAR(30)) ELSE CASE WHEN PATINDEX('%[1-9]%', [A].[Code]) = 0 THEN CAST('' AS CHAR(30)) ELSE CAST ( CAST ( REPLACE ( CASE WHEN PATINDEX('[0-9]'...
  7. lyudmila

    CONVERT NUMERIC TO DATETIME

    by analyzing data it's more likely: last two digit is year, first 1 or 2 are month and middle two digit are dates, I have padded with leading zero and converted to char so now example values look like these: 112300 042101 052301 071901
  8. lyudmila

    CONVERT NUMERIC TO DATETIME

    Hi, almost fanny, but nothing works! I have a numeirc field and value in this field are (examples): 112300 42101 52301 71901 It's total over 3 million records in this table. How to convert this field to datetime? Thank you
  9. lyudmila

    Datetime conversion

    I may only guess! May be 1/6/2001 will work?
  10. lyudmila

    Datetime conversion

    Is it posissible to convert string '62001' to datetime format? And how?
  11. lyudmila

    Find orphaned records in two related tables

    THANK YOU VERY MUCH! THIS WILL WORK
  12. lyudmila

    Find orphaned records in two related tables

    I have two related tables, Invoice Header and Invoice Detail. They have two key fields: Vendor# and Invoice#. What is the best way to find orphaned records - records in Detail table that have no match in Header table?
  13. lyudmila

    Check records count in a view (T_SQL and Enterprise manager)

    Takes only few seconds to create a view but it takes forever to read from view! Is it common problem or it's a problem on iur server, I did not use view before. Please respond, I need to figure it out! have no time! Thank you!
  14. lyudmila

    Check records count in a view (T_SQL and Enterprise manager)

    How i can check records count in a view (T_SQL and Enterprise manager)
  15. lyudmila

    NESTED CASE STATEMENT

    Thank you, Chris. It works!
  16. lyudmila

    NESTED CASE STATEMENT

    What is wrong with this syntax? select vnd_nbr = ltrim(f1), vnd_name = ltrim(f2), invnbr = ltrim(f3), invdt = f4, case when ltrim(rtrim(f5))='1' then case when ltrim(rtrim(f6))='X' then cast(f7*-1 as numeric(15,2)) else cast('0' as numeric(15,2)) else case when...
  17. lyudmila

    add line count

    I want my output table to be: VCH VEN PTYPE X Y 1571 33 03 264.15 0 4472 708 03 0 -108.26 X value - line record #1 with PTYPE='03' for ven 33 Y value - line record #2 with PTYPE='03' for ven 708
  18. lyudmila

    add line count

    Here is example of my input table VCH VEN PTYPE AMT 1571 33 60 -264.15 1571 33 60 250.82 1571 33 60 7.11 1571 33 60 6.22 1571 33 03 264.15 1571 33 03 -264.15 4472 708 60 -108.26 4472 708 03 108.26 4472 708 03 -108.26 For each ven and vch I have two line with ptype='03' If AMT in line =1 them AMT...
  19. lyudmila

    add line count

    I need to build invoice table based on accounts payable table. Depends on value in some fields, I need to populate invoice amount field. Actualy I have a RPG program printout and I need to translate this program in SQL code. Part of RPG program adds line count to program. If record line for...

Part and Inventory Search

Back
Top