2,736 Topics
|
|
hi guys, i have a situation let say a customer orders 3 items item A worth 300 item B worth 100 item C worth 500 He paid in full for items A,B and he paid a partial payment of 250 for item C now I have a receipt for full … |
|
good day guys, I have an order table and some stuffs, and the user can cancel an order. my question is: 1.] what is the best implementation of canceling an order in a database? Im sure I must create a table for canceled order or something right? 2.]Is it appropriate … |
|
I wrote a query yesterday and it ran fine. Today i inserted a new record and it has broken my query. Can anyone help me figure out why? Query: [CODE] WITH temp_orgChart (KitID, PartID, Quantity, iteration) AS ( SELECT KitID, PartID, Quantity, 0 FROM ItemParts WHERE KitID = 200185 UNION … |
|
plz hepl me ...... table_1 Name_____Date_________Ptype Keadr____22/2/2010____P Anup_____22/2/2010____P Deepak___22/2/2010____A Keadr____23/2/2010____P Anup_____23/2/2010____L Deepak___23/2/2010____A Keadr____24/2/2010____P Anup_____24/2/2010____P Deepak___24/2/2010____P I want To convert this table as Name_____22/2/2010____23/2/2010_____24/2/2010 Kedar____P____________P_____________P Anup_____P____________L_____________P Deepak___A____________A_____________P my query select * from table_1 PIVOT(MAX(Ptype)FOR[Date]IN([22/2/2010],[23/2/2010],[24/2/2010]))AS p i got result Name_____22/2/2010______23/2/2010______24/2/2010 Kedar Anup Deepak didnt get values in 22/2 ,23/2,24/3 col |
|
hy, i have 2 database. DB1 & DB2. i create SP in DB1. in the SP, i want to access table "TBL" in DB2. how can i create that SP?? [CODE] CREATE PROCEDURE test AS BEGIN ?????????? END; [/CODE] Thx, |
|
hi there......... i am using MS SQL i have made a database in MS SQL now i want to export to another computer (pc) ,,,,,, please help me out with this......... thanks |
|
Less than a year after launching its high performance computing strategy, Microsoft finds its [URL= http://www.microsoft.com/hpc/] HPC Server 2008[/URL] near the top of the heap. The Windows Server 2008 derivative placed 23rd on a list of the 500 top-performing supercomputers in the world, as measured by the [URL= http://www.ncsa.uiuc.edu/] National … |
|
Hi , I want to create user defined data types in MS SQL 2008, So when I start MS SQL Server Management Studio -> Database here 'Adventure Work' is not appearing. ( I am referring this -http://www.mssqltips.com/tip.asp?tip=1628) how to enable that?:?: or is their any another way to declare user … |
|
Hello Friends I wanted to make a same change in over 300 SQL scripts. Is there a way to automate this? Thanks |
|
Hi, My project modules are organized in such a way that I have to maintain following Database structure. I've 5 schemas, each containing 20 to 50 tables. Each schema is accosiated with one module of the project. All the tables that are used within more than one modules are kept … |
|
Hi, My project modules are organized in such a way that I have to maintain following Database structure. I've 5 schemas, each containing 20 to 50 tables. Each schema is accosiated with one module of the project. All the tables that are used within more than one modules are kept … |
|
Hi guys; I need your assistance. I am extracting some info from my database and I need difference between two fields of money values. Lets call the fields as Field1,Field2,& Field3. Field1 = Current Balance Field2 = Starting Balance Field3 = Field1 - Field2 From my query, I get Field3 … |
|
Hi,I want to generate unique ID in the database that has the combination of characters and digits. eg. ab111 and next should be ab112 ,ab113 and so on. Can anybody help me? |
|
hello all I have Table1 and table2 table1 design is Name ,varchar amount , decimal table2 design is Name , varchar nominal,decimal how is the statement to find the sum of amount in table1 plus the sum of nominal in table2 ? thank you denny |
|
Hi, MS SQL 2005 I'm trying to write a stored procedure.Weighted average cost related to accounting.An area where the data from one field if the date is 01.01. There is no problem. But history is different from 01/01 with the calculated formula into another value equal to the previous day.If … |
|
I am trying to write my first sproc that inserts values into a table. These values will be entered by the user and stored in a variable . They will then be added to the database. This is what I have come up with so far. I can't seem to … |
|
I have this table publication_en Field Type related varchar(200) public_area int(11) title text detail text file varchar(200) and i am trying to do this INSERT INTO publication_en (related, public_area , title , detail , file) VALUES ('none','1','"helped"','la' "kajakjajk"','J3.pdf') but it doesn't work any idea why it doesn't work ? Thank … |
|
Good Day All I have an Sp and UDF. the UDF cant take #tables. so i want to incorporate the functionality that is being provided by the udf and make it part of the code. the first part of my statement creates a solid table that is being used in … |
|
Many people would probably think this question is stupid, but how can i insert a value that starts with 0 in a Bigint/Numeric/Int field? This would normally not be a problem, just using a varchar field instead, but because of the index speed (this is a very large table with … |
|
Hi everyone, I have a query as - [COLOR="Red"]select DateName(Month,Date), avg(NetAmount) as AverageCustomerBill from salesmaster group by DateName(Month,Date)[/COLOR] which gives result as follow - [COLOR="Green"]April 451.5664 August 432.6227 July 441.1437 June 429.9915 May 423.7198 November 407.4123 October 425.1684 September 416.3678[/COLOR] As u can see here Months are not in proper … |
|
the deal is to create trigger(function?) which would send updated value from one table and add to another example: table1 column:AccountID and 2 column: Money table2: column:AccountID and 2 column: Money i create something like this: [code]CREATE TRIGGER money_from_vault ON table1 FOR UPDATE AS DECLARE @Money Int,@AccountID varchar(10) SELECT @Money … |
|
[CODE]select distinct cust.no, cust.branch, cust.name, cust.surname, term.benefit, term.code,tehi.trcode, tehi.trancode, dmhi.trancode, dmd.benefit from cust as cust inner join term as term on cust.rowno = term.rowno_custterm_cust inner join tehi as tehi on term.rowno =tehi.rowno_termtehi_term inner join dmd as dmd on cust.rowno =dmd.rowno_custdmd_cust inner join dmhi as dmhi on dmd.rowno =dmhi.rowno_dmddmhi_dmd group by … |
|
i have supertype-subtype: supertype: document subtype: clearance, sedula this query: [CODE=mssql] SELECT Document.DocNo, (Person.Givenname + SPACE(1) + Person.Middlename + SPACE(1) + Person.Lastname) AS Name, Person.Address, CASE WHEN DATEADD(YEAR, DATEDIFF (YEAR, Person.DOB, CURRENT_TIMESTAMP), Person.DOB) > CURRENT_TIMESTAMP THEN DATEDIFF(YEAR, Person.DOB, CURRENT_TIMESTAMP) - 1 ELSE DATEDIFF(YEAR, Person.DOB, CURRENT_TIMESTAMP) END AS 'Age', Person.Status, Person.Picture, … |
|
Hi Everyone, I have a query as - [COLOR="Red"]select top 10 bm.name, sum(sd.Amount) as bd from brandmaster bm join lobattributevalue lob on bm.brandid = lob.valueid and bm.lobid = lob.lobid join salesdetail sd on sd.productid = lob.productid where lob.attributeid = 3 group by bm.name order by bd desc[/COLOR] Now In this … |
|
i have a supertype-subtype: supertype: DOCUMENT subtypes: CLEARANCE, TAX CERTIFICATE, RECEIPT, BUSINESS CLEARANCE each clearance subtype may have a TAX CERTIFICATE, how could i join using join? in other words, document>clearance document>tax certificate i want to join document>clearance and document>tax certificate into a SINGLE view help. thanks |
|
|
|
I am trying to help a friend make a database(and ultimately piece of none commercial software) to determine personality type as part of his thesis. For the formula to work properly a couple of the questions need their values inverted(ie if the person answers 1 the recorded number will have … |
|
The End.