2,736 Topics

Member Avatar for
Member Avatar for geek_till_itMHZ

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

Member Avatar for princekool
0
156
Member Avatar for dipankar.

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 .

Member Avatar for dipankar.
0
137
Member Avatar for yuhe

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 …

Member Avatar for samaru
0
79
Member Avatar for pawangargmit

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 …

Member Avatar for kvprajapati
0
132
Member Avatar for appleglaze28

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 …

Member Avatar for kvprajapati
0
36
Member Avatar for teetime3

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 …

Member Avatar for kvprajapati
0
62
Member Avatar for Helium

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 …

Member Avatar for apegram
0
152
Member Avatar for H4voc

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 …

Member Avatar for apegram
0
67
Member Avatar for lebanese007

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 …

Member Avatar for JuhaW
0
103
Member Avatar for RahulV

Hi, What all are the ways to synchronize two SQL databases? If there is a way to do it via query or code, what is that query/code? Please help. Thank you.

Member Avatar for kvprajapati
0
98
Member Avatar for moggy4

Hi All i am quite new to mssql db and would like to find someone to help me with some errors i keep getting i have uploaded my new db and when i try to open my website i get the following errors [code] <!-- Web.Config Configuration File --> <configuration> …

Member Avatar for kadempalli
0
164
Member Avatar for Brick

I have a database column defined as int that contains a negative number representing a date in mmddyy format (without the leading zero) so -10209 = 01/02/2009 -122508 = 12/25/2008 How can I convert the data to a datetime so I can compare it to another date in a where …

Member Avatar for Brick
0
151
Member Avatar for mcdt2424

Hi guys, In my application users can search for events that fall with in a particular date range, which works fine. The problem I am having is getting records when I ask for the current months events using the query below. select * From Events Where FromDate >='1/1/2010' And ToDate …

Member Avatar for mcdt2424
0
76
Member Avatar for prabha_friend

Hello Friends… Before going into why I am writing this, first I want to confess one thing. I am not a very experienced professional like some of you reading this post. I am just a beginner in learning Ms-Office. As a sincere amateur, I so far explored most of the …

0
53
Member Avatar for RahulV

Hi Friends, Can there be a query that will SELECT fields of a table and group a column (say "CustomerID") and show all its rows along with its subtotals and then its Grandtotal in the result returned? For Example, CustID Items Cost ExtraCharges --------------------------------------------------------------------------------------- A1 Cofee 15.00 2.00 A1 Tea …

Member Avatar for padtes
0
838
Member Avatar for samuel_1991

Hi I have a ASP.Net code below that need to query with MS SQL database. [code] "select SUM(ShopCartItem.Price-OfferedPrice) As Discount from ShopCartItem " & _ "Inner Join Product " & _ "On ShopCartItem.ProductID = Product.ProductID " & _ "Where(ShopCartItem.ShopCartID = @ShopCartID) And ShopCartItem.ProductID != @ProductID" [/code] The MS SQL query …

Member Avatar for samuel_1991
0
173
Member Avatar for Troy382438

[CODE]See current output starting at page DROP TABLE EMPLOYEE; DROP TABLE JOB_TITLE; Create Table EMPLOYEE ( EMP_ID int NOT NULL, LAST_NAME varchar(20) NOT NULL, FIRST_NAME varchar(20) NOT NULL, EMP_ADDRESS varchar(25) NOT NULL, EMP_CITY varchar(25) NOT NULL, EMP_STATE char(2) NOT NULL, AREA_CODE int NOT NULL, PHONE_NUM int NOT NULL, HIRE_DATE datetime …

Member Avatar for ChrisPadgham
0
201
Member Avatar for firoz.raj

what type of indexes exists in Sql Server ?which one is the fastest and why can we only have one of those per table ?

Member Avatar for sknake
0
79
Member Avatar for arunkumars

Hi, I need to create procedure which takes 1 variable as input. The datas are frm diff tables, I have done it using joins, Now, i need to call them thru just select statements.. is it possible, if yes, wats the way to do so...

Member Avatar for ChrisPadgham
0
86
Member Avatar for vankysrox

i m creating sms service in web application i complete ma code but now i m facing problem to send sms via way2sms bcoz i know its IP Address but not Port no , i wanna know is it necessary to use waytosms port no or can i use some …

Member Avatar for sknake
-1
60
Member Avatar for gani

hi, i am using this datetime data type in one of my mssql tables... i just want date & not time........ can any one help me with a patch of code....... thanks in advance

Member Avatar for Nilesh Warude
0
79
Member Avatar for igirl

I have two tables but I'm thinking it should be one. one is: [B]Courses [/B] columns are: [B]CourseID, Title, Description, Objectives, Price, Length, Prerequisites[/B] the other is: [B]CourseDetails[/B] columns are: [B]CourseID (where this is checked against the Courses table, must exist in the Courses table), CategoryID, TypeID, SubTypeID, Type[/B] First …

Member Avatar for igirl
0
106
Member Avatar for suizhun

I am trying to calculate the ending inventory cost using weighted average. I have figured out a column for the cost per item (CostperItem), and a column for item on hand(QuantityAvailable). Now I want to multiple those two columns together and get a new column for the result. how can …

Member Avatar for apegram
0
126
Member Avatar for cVz

Hi there, I am trying to write a stored procedure that will basically loop through the database, get allthe tables in the database and then for each table in the database it will take an entry of that database and just insert it into that same table again... i am …

0
62
Member Avatar for gabrielhuebsch

Since there is no system function for calculating the median value in a data set I was going to make a function to do the trick. I would like this function to be available to me in all my databases without having to redefine it for each. Is there a …

Member Avatar for sknake
0
117
Member Avatar for samuel_1991

Hi, I have a 3 tables needed to be inner join before I got a full details of a transaction history (What item, shipment details, quantity, who bought it etc). The involved tables are ShopCart,ShopCartItem and OrderData ShopCart: [code] CREATE TABLE dbo.ShopCart ( ShopCartID int IDENTITY (1,1), ShopperID int NOT …

Member Avatar for samuel_1991
0
13K
Member Avatar for tqmd1

Dear SIR, I am using sqlserver2005. Table1 has a column named bill_no and its type is text Now I want to change its type "Numeric" When I do this the it displays this error message --------------------------- Microsoft SQL Server Management Studio --------------------------- Conversion from 'text' to 'numeric' is not supported …

Member Avatar for sknake
0
147
Member Avatar for _taz_

Hi, A while back you guys helped me make a query that returns all clients that have not made a payment in 90 days. this works good. I now want to exclude those who have never made a payment. I tried to add in [CODE]Exists (Select Receipts.DateReceived from Receipts)[/CODE] but …

Member Avatar for _taz_
0
134
Member Avatar for vuyiswamb

Good Day All i have the Following sp [CODE]SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[sp_Timetable_View] @selectionType varchar(30), -- either Venues, Staff, Subjects, Curricula etc... @selectedItems ntext, @selectedTerms ntext AS /*This Part of the code was Representing the Sp Get_Staff_Cycles_For_TimeTable due to temp table scope , i …

Member Avatar for sknake
0
161
Member Avatar for deepas

I have a store procedure in which i need to get values from another procedure, so i called it and tried to insert in table variable. but i got the "An INSERT EXEC statement cannot be nested." error message. anyone please give solution as i've already spent 2 days searching …

Member Avatar for sknake
0
79

The End.