2,935 Topics
| |
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 … | |
Hello dear daniweb experts, i was searching over the web and couldn't find any good explenation on how to write properly to a Microsoft SQL server database, so i decided to ask the experts here: How to properly write to the sql database: i used this snipped to read: [CODE]//Start … | |
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 | |
| |
Hi there my first post :), i've started a project that transforms a table from SQL to XML, works like a charm.Now i want to transform from a XML file to database: 1)search if there is a database created(i've done that using try catch) if not create a database XMLReader … | |
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 … | |
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 … | |
Iam writing (or trying to write) a simple join query statement in Query Analyzer. As of right now Im getting the error message Ambiguous column name 'categoryID'. My Statement is ; [code=sql]Select categoryID, Max (StockPrice) as maxStockPrice, MIN(StockPrice) as minStockPrice, AVG(StockPrice) as avgStockPrice From Category, InventoryPart Where Category.CategoryID = InventoryPart.CategoryID;[/code] … | |
Hello every one i downloaded [B]"microsoft sql server 2005" [/B]and installed it correctly but i m now confused b'coz i can't find [B]Query Analyser[/B].Can any one help me out of the situation . | |
HI, I have a table which has hundreds column which are boolean value. I need select from the table based on passing parameter which column, (will set this column value = true) How i write a store procedure which accept the column name as parameter, then based on this to … | |
We are using SQL Server 2005, and saving Hindi, English, Japaneese, Chiness languages in nText column. This all we are doing using google analytical. However, we don't know how to know which value is Hindi or Englsh as they are encoded. Please suggest how to write a query to know … | |
I have a question I want to query a datamart with transactional data. I have 3 fields the unique one is the product. I want to get a query where i set a number from the range of how many unique item there is on field three against field 1 … | |
I need to display multiple fields but need to restrict by the last entry for each individual. SELECT SSAN, Location, Date_of_Trip from TblTRIPS Where ...only want to select the most recent trip Need help with this. How can I restrict the select statement to the most recent trip for each … | |
Hi I have a table with two columns (ID,ROW) I need to make the ID COLUMN unique and increase it value by 1 for each row. ----------------------- ID ROW 1 NULL 1 NULL 1 NULL 1 NULL How can I replace the each 1 with sequentially increased value? to be … | |
OK, this may not be possible in SQL, but here goes. I'm writing an app that allows the end user to select a date range and filter by area code, but I want them to be able to select as many area codes as they want. My question is with … | |
It's been a while since I've posted. Things have been going well for my project, but I'm coming back to the issue of setting up a SQL server on my user's computers. Sknake was kind enough to give me the command line switches to get a MSSQL install set up … | |
hi all, i have a database called DB with a table called Menu_reporting that logs when the user selected through calling the server (See below) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USE [DB] GO /****** Object: Table [dbo].[Menu_Reporting] Script Date: 01/31/2010 17:07:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO … |
The End.