2,736 Topics

Member Avatar for
Member Avatar for princekool

Hi guys; I have a table of books in my DB and each page has a different serial no following each other eg. Page 9 has serial 005065 and 10 has 005066. In my table it only gives me a range of serials as per the book, this is how …

Member Avatar for apegram
0
250
Member Avatar for terdie

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 …

Member Avatar for hbmusic1
0
85
Member Avatar for VIeditorlover

Hi, is there a way how to (in transact sql) catch output from stored procedure which returns set (2 and more) of tables and move through it ??? thanks!

0
98
Member Avatar for terdie

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 …

Member Avatar for ChrisPadgham
0
84
Member Avatar for Geekitygeek

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 …

Member Avatar for Geekitygeek
0
97
Member Avatar for KEDAR01

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

0
58
Member Avatar for am_dumb

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,

Member Avatar for am_dumb
0
87
Member Avatar for lucky_ali0926

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

Member Avatar for samaru
0
89
Member Avatar for EddieC

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 …

Member Avatar for Aamy1980
0
288
Member Avatar for sakhi kul

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 …

Member Avatar for sakhi kul
0
80
Member Avatar for virtualmisc

Hello Friends I wanted to make a same change in over 300 SQL scripts. Is there a way to automate this? Thanks

Member Avatar for samaru
0
86
Member Avatar for NeoKyrgyz

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 …

0
130
Member Avatar for NeoKyrgyz

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 …

0
143
Member Avatar for princekool

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 …

Member Avatar for princekool
0
259
Member Avatar for sumangala

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?

Member Avatar for samaru
0
76
Member Avatar for denny42

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

Member Avatar for denny42
0
88
Member Avatar for koncuk

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 …

0
52
Member Avatar for MSnewbie

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 …

Member Avatar for yosepha
0
116
Member Avatar for xxmp

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 …

Member Avatar for xxmp
0
96
Member Avatar for vuyiswamb

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 …

Member Avatar for vuyiswamb
0
209
Member Avatar for NextCom

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 …

Member Avatar for mail2saion
0
89
Member Avatar for hitro456

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 …

Member Avatar for hitro456
0
149
Member Avatar for Paser

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 …

Member Avatar for Paser
0
121
Member Avatar for Saba9

[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 …

Member Avatar for jbisono
0
101
Member Avatar for scias23

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, …

Member Avatar for jbisono
0
159
Member Avatar for hitro456

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 …

Member Avatar for jbisono
0
104
Member Avatar for scias23

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

Member Avatar for jbisono
0
228
Member Avatar for muthu1802
Member Avatar for muthu1802
-1
86
Member Avatar for kained

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 …

Member Avatar for samaru
0
116
Member Avatar for kalpa23

i m using sql 2000 and i have a table with 3 columns ( credit , debit, total) what i want to do is whenever a value is inserted to the credit column it should add that amount to the total column and whenever there is a debit value it …

Member Avatar for apegram
0
122

The End.