GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Database  >  Sybase
Go To First  |  Previous Question  |  Next Question 
 Sybase  |  Question 55 of 64    Print  
how to multiply all values of a single column.

  
Total Answers and Comments: 2 Last Update: August 07, 2008     Asked by: ankur.behal 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 01, 2008 01:10:05   #1  
vishnu7185 Member Since: August 2008   Contribution: 1    

RE: how to multiply all values of a single column.
Can be done Using Cursors

DECLARE @product int

DECLARE crsr CURSOR FOR (all values)

SELECT @product @product * @crsr_value

fetch CURSOR

 
Is this answer useful? Yes | No
August 07, 2008 07:37:42   #2  
samala_naresh Member Since: August 2008   Contribution: 3    

RE: how to multiply all values of a single column.
declare @var int
select @var 1
update set @var @var*< colname >
select @var

 
Is this answer useful? Yes | No

 Related Questions

How many defaults can be placed on one column of a able.If this col had an existing default, what will happen if one more is added?
Read Answers (1) | Asked by : Sudeep Biswas

A column name is given to you. You have to find out which table has that column. Database has 230 tables. For example: empid (column name) For this how do you find out which table has the column (empid) ?
Read Answers (5) | Asked by : Karthi

How to find out the maximum sales of an item for each sales man.The table consists sales_man, item, sales columns, each sales man will have the different sales values for different items.here I have to find out for every sales man, which item he sold maximum
Read Answers (3) | Asked by : Bob

Latest Answer : declare @var intselect @var = 1update set @var = @var*< colname >select @var ...

How we can add a NotNull Column in a table by using alter command (without using default command)? 
Latest Answer : First add the column as NULL. Then populate the column with non-null data. Then modify the column to NOT NULL. You may need to set dboption "select into" to True. ...


 Sponsored Links

 
Related Articles

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Moving All the XML Processing into the Database

Moving All the XML Processing into the Database In the preceding example the database server performs only a part of the XML processing while the rest is still performed by the PHP engine Specifically the database server generates an employees XML document based on the records from the hr employees
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

ODP.NET - Retrieving a Single Row of Information Using OracleDataAdapter

ODP NET Retrieving a Single Row of Information Using OracleDataAdapter In the previous example we worked with a set of rows in the DataTable object Now we shall work with a particular row using the DataTable object The following code accepts an employee number from the user and gives you the details
 

jQuery - Column Highlighting

Learning jQuery Column Highlighting It can be a nice user interface enhancement to visually remind the user of what has been done in the past By highlighting the column that was most recently used for sorting we can focus the user s attention on the part of the table that is most likely to be releva
 

What is Operational Database

Operational Database is the database-of-record, consisting of system-specific reference data and event data belonging to a transaction-update system. It may also contain system control data such as indicators, flags, and counters. The operational database is the source of data for the data warehouse
 

Evolution of database systems

The Evolution of Database systems File Management System Hierarchical database System&nbsp; Network Database System&nbsp; Relational Database System File Management System: The file management system also called as FMS in short is one in which all data is stored on a singl
 


Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape