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...
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...
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...
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
------- ------------------------------------...
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...
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]'...
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
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
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?
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!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.