|
creating a dynamic table using cursor
I have a table which list the purchases made from different vendors in different months... the table structure is as follows
vendorname
month
purchase
i want to have the result displayed in a table whose column heading would be
vendorname
1stMnthPurchase
2ndMnthPurchase
3rdMnthPurchase
and so on....
however i ...
Tue, 11 May 2004 04:46:07 -0700
|
require purchase details over diff months
I have a table which lists all vendors and purchases done over different months
i want to have a report using segate crystal report which gives me the total purchase of each month for each vendor from the first month of the financial year till the current month.
e.g my table contains...vendorname, month and gross ...
Tue, 11 May 2004 03:11:03 -0700
|
Third largest salary
Dear Sir
I want to retrive data that will return 3rd largest salary
paid employee from employee table using sql query.
thanks ...
Tue, 11 May 2004 02:00:31 -0700
|
getting sum of units sold in preceeding weeks
i have a table where daywise i have details of units sold..i want to have a query which takes today (getdate()) and then calculates the no.ofunits sold in 7 preceeding days as week1, 8-14 preceeding days as week2, and so on for 3 preceding months (approx 12 preceeding weeks)..
can anyone plz suggest how i go about ...
Mon, 10 May 2004 21:31:04 -0700
|
Row data to delimited list
I'm curious if anyone knows of a way to make this
conversion without using a cursor:
* recordset
id name
-- ----
1 apples
2 oranges
3 pears
* desired string
apples; oranges; pears
Thanks.
...
Fri, 7 May 2004 07:31:56 -0700
|
Codepage mismatch I think
I am running SQL server 7 on an NT 4 server here in the UK
which has a table containing French and Italian wine
names. Most of the characters with accents are recognised
fine but not the letter c with an acute (/) accent on it
(the database records are populated by typing it out in
Word and pasting it int ...
Fri, 7 May 2004 04:31:34 -0700
|
Trucate Command
Hello, I have a table with 200,000,000 records and need
only 20,000 or 6 months of historical data. Ive created a
temp_tbl and I'm inserting the 6 months worth of data that
I need. Can I use the truncate command???. Can I use it
to bring the temp_table data back to the original table
with out reprocus ...
Thu, 6 May 2004 12:04:58 -0700
|
=> Unorthodox DB Updates - Trigger order
Hello,
Unfortunately I am attempting to do something a bit weird, in an endeavour to retreive a unique number
from a table that I've just stuck onto my SupplierOrders table as a kind of join between my database and
the company non-normalised database. These are the instruction of my manager, very strange.
My firs ...
Thu, 6 May 2004 09:26:01 -0700
|