Viewing 15 posts - 7,786 through 7,800 (of 10,144 total)
Chaitanya Patil (6/18/2010)
Have a look at the snap shots, you may get idea what I'm trying to explain...I this snap shot I've taken one particular USER_NUM to show.
Can we use...
June 18, 2010 at 3:50 am
Have a look at the output from the following query.
I reckon you're looking for all rows where [source] = 0, and also all rows where the value of the...
June 18, 2010 at 2:39 am
dbowlin (6/17/2010)
Excelsior!
Fat Freddy's Cat.
Fertility Pills!
June 18, 2010 at 2:06 am
This should give you a few ideas
DROP TABLE #TABLE_A
CREATE TABLE #TABLE_A (DEl_No VARCHAR(6), L_Amt INT, T_Amt INT, A_Name VARCHAR(6))
INSERT INTO #TABLE_A (DEl_No, L_Amt, T_Amt, A_Name)
SELECT '087NT1', 24000, 28699, 'Physic'...
June 17, 2010 at 10:18 am
delwarinc (6/17/2010)
thanks for your reply, please can you show how to do this
Of course!
You will have to write this bit though - Write a query to retrieve the ingredient...
June 17, 2010 at 9:30 am
Unreserved apologies, jvanderberg, for appearing shallow - however the remark passes the logic test. It appears your employers have no intention of raising your salary at the current threat level:...
June 17, 2010 at 8:23 am
jcrawf02 (6/17/2010)
Chris Morris-439714 (6/17/2010)
Before Sing4you whines "Not Yet" and Jason protests "Wasn't me!", this is about football and not pregnancy, right? 😀You mean Hand-Egg?
Jon, you always lower the tone of...
June 17, 2010 at 7:54 am
jvanderberg (6/17/2010)
What do you think I should do?--J
Resign from BP and get a job with TexasOil.
June 17, 2010 at 7:53 am
Before Sing4you whines "Not Yet" and Jason protests "Wasn't me!", this is about football and not pregnancy, right? 😀
June 17, 2010 at 7:40 am
This looks too simplistic to be a real world problem.
Step by step:
Write a query to retrieve the ingredient rows of the recipe which you are cloning.
Hard-code the new RecipeID into...
June 17, 2010 at 7:32 am
-- query 1
SELECT
MyString,
--CHARINDEX('_', MyString),
--SUBSTRING(MyString, CHARINDEX('_', MyString)+1, LEN(MyString)),
--CHARINDEX('_', SUBSTRING(MyString, CHARINDEX('_', MyString)+1, LEN(MyString))),
MySubstring = LEFT(SUBSTRING(MyString, CHARINDEX('_', MyString)+1, LEN(MyString)),
CHARINDEX('_', SUBSTRING(MyString, CHARINDEX('_', MyString)+1, LEN(MyString)))-1)
FROM ( -- sample data
SELECT '00_MECH_UG' AS MyString...
June 17, 2010 at 6:06 am
Hello
There are at least three methods for deriving a running total:
1. Triangular join, as you are attempting here
2. Recursive CTE
3. Quirky update
Method 1 is not recommended as it performs poorly...
June 17, 2010 at 4:47 am
How long does the select part SELECT
a.policy,
a.form,
a.date,
SUM(a.premium/b.premprcnt) AS premium
FROM b
INNER JOIN a
ON b.policy = a.policy
AND b.form = a.form
AND b.date = a.date
AND...
June 17, 2010 at 4:10 am
Here's why I asked - a simple and fast way to get your results:
;WITH Sourcedata AS (
SELECT SubID = ROW_NUMBER() OVER (PARTITION BY ID ORDER BY OLD_VAL),
ID, OLD_VAL, NEW_VAL
FROM...
June 17, 2010 at 2:57 am
Hi Daniel
In your sample data, you have two rows in table #VAL for each row in your update target table. Is this always the case? What's the maximum number of...
June 17, 2010 at 2:31 am
Viewing 15 posts - 7,786 through 7,800 (of 10,144 total)