473,508 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

T-SQL Challenging Product

21 New Member
I need some advice:
I have the following table:

Id - Desc -- Level -- Parent -- Value
1 -- aaaa ------ 1 -------- 0 -- --- -- null ---- >> 1.5 * 4 = 6
2 -- doz ----- -- 2 -------- 1 --- ---- - 44
3 -- bb ------ -- 3 ------ -- 2 ---- ----- 1.5
4 -- cc ------ -- 3 ------ -- 2 ---- ----- 4
5 -- bbbb --- -- 1 -------- 0 -- -- --- null ---- >> 5 * 2 = 10
6 -- roz ----- -- 2 -------- 5 --- ---- -- 77
7 -- bb ------ -- 3 -------- 6 ---- ----- - 5
8 -- cc --- --- -- 3 ------ -- 6 ---- ----- 2

I want to insert the product ( bb * cc) into aaaa (id =1)
as shown in itallic.

Can you suggest an efficient wayt to do that?

Thank you for your help.
Jul 6 '07 #1
1 878
SkinHead
39 New Member
Not sure what you want to do.

Do you mean UPDATE the row ID=1, DESC='aaaa' ?

Do you want to INSERT a new row ?

When you say "insert the product ( bb * cc) into aaaa (id =1)" - Is this something to do with the rows having DESC='bb' and DESC='cc'

Maybe it's me being incredibly thick, but a little more explanation would be good
Jul 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5462
by: Steve | last post by:
Hi; I'm brand spanking new to sqlserver ( nice so far ). I need to make a simple data change across a list of tables. Basically replace an old date with a new date. However, the people I am...
2
11930
by: Steve | last post by:
Hi; I have been writing a lot of short tsql scripts to fix a lot of tiny database issues. I was wondering if a could make an array of strings in tsql that I could process in a loop, something...
18
4571
by: mountain man | last post by:
Greetings to all database professionals and laymen, Let us make a bold assumption that we have developed a software tool for the SQL Server environment which simply acts as an interface between...
6
2356
by: dada | last post by:
here is a structure of tables in a database CUSTOMERS (CustID*, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax) EMPLOYEES (EmployeeID*,...
2
18691
by: dynoweb | last post by:
I have several *.sql files with schema/data changes to be applied to our current database. Is there a way to create a TSQL script that could be run from the SQL Query Analyzer that would...
1
1722
by: TOM GUGGER | last post by:
OMNI GROUP tgugger@aimexec.com T-SQL/ CONTRACT TO PERM/ ATLANTA
3
2527
by: David Lozzi | last post by:
Howdy, ISSUE 1: See issue 2 below. I have a distance calculator on my site which works great. However, the users need to sort by distance, which make sense. I'm not sure how to do it other than...
16
5059
by: David Lozzi | last post by:
Hello, I have some code that adds a new user. The new user has a checkboxlist of items which they can be associated with. I would like to send this list of items to TSQL along with the new user...
2
1338
by: Wayne | last post by:
This is a copy of a message I previously posted in a Microsoft Access Newsgroup, but it was suggested to me that my problem is ASP related and not Access, and hence I'm posting in this newsgroup now...
0
7124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7385
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3195
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.