Less Than 2 Items
May 4, 2006t1
order
item
how can i get the order that has less than 2 items?
t1
order
item
how can i get the order that has less than 2 items?
Hi: I'm try to create a stored procedure where I sum the amounts in an invoice and then store that summed amount in the Invoice record. My attempts at this have been me with the error "The multi-part identifier "items.TAX" could not be bound"Any help at correcting my procedure would be greatly appreciate. Regards,Roger Swetnam ALTER PROCEDURE [dbo].[UpdateInvoiceSummary] @Invoice_ID intAS DECLARE @Amount intBEGIN SELECT Invoice_ID, SUM(Rate * Quantity) AS Amount, SUM(PST) AS TAX FROM InvoiceItems AS items GROUP BY Invoice_ID HAVING (Invoice_ID = @Invoice_ID) Update Invoices SET Amount = items.Amount WHERE Invoice_ID =@Invoice_IDEND
View 3 Replies View RelatedI am struggling to come up with a set-based solution for this problem (i.e. that doesn't involve loops/cursors) ..A table contains items (identified by an ItemCode) and the set they belong to (identified by a SetId). Here is some sample data:
SetIdItemCode
1A
1B
24
28
26
310
312
410
[code]....
You can see that there are some sets that have the same members:
- 1 and 10
- 2 and 11
- 7, 8 & 9
What I want to do is identify the sets that have the same members, by giving them the same ID in another column called UniqueSetId.
I'm having an issue creating a report that can group & sum similar items together (I know in some ways, the requirement doesn't make sense, but it's what the client wants).
I have a table of items (i.e. products). In some cases, items can be components of another item (called "Kits"). In this scenario, we consider the kit itself, the "parent item" and the components within the kit are called "child items". In our Items table, we have a field called "Parent_Item_Id". Records for Child Items contain the Item Id of the parent. So a sample of my database would be the following:
ItemId | Parent_Item_Id | Name | QuantityAvailable
----------------------------------------
1 | NULL | Kit A | 10
2 | 1 | Item 1 | 2
3 | 1 | Item 2 | 3
4 | NULL | Kit B | 4
5 | 4 | Item 3 | 21
6 | NULL | Item 4 | 100
Item's 2 & 3 are child items of "Kit A", Item 5 is a child item of "Kit B" and Item 6 is just a stand alone item.
So, in my report, the client wants to see the SUM of both the kit & its components in a single line, grouped by the parent item. So an example of the report would be the following:
Name | Available Qty
--------------------------
Kit A | 15
Kit B | 25
Item 4 | 100
How I can setup my report to group properly?
I cannot find an easy way to DELETE items which are > 1 time in my table (i am working with MS SQL 2000)
idserialisOk
-------------------
2AAA1
3BBB0
5dfds0
6CCC1
7fdfd 0
8AAA0
9CCC0
I want to DELETE each Row IN
SELECT doublons.serial, Count(doublons.serial) AS 2Times
FROM doublons
GROUP BY doublons.serial
HAVING Count(doublons.serial)>1
and WHERE isOK = 0
in my exemple , after deleting, my table must look like
idserialisOk
-------------------
8AAA1
9CCC1
3BBB0
5dfds0
7fdfd0
thank you for helping
Hi,
I'm trying to include the COUNT(*) value of a sub-query in the results of a parent query. My SQL code is:
SELECT appt.ref, (Case When noteCount > 0 Then 1 Else 0 End) AS notes FROM touchAppointments appt, (SELECT COUNT(*) as noteCount FROM touchNotes WHERE appointment=touchAppointments.ref) note WHERE appt.practitioner=1
This comes up with an error basically saying that 'touchAppointments' isn't valid in the subquery. How can I get this statement to work and return the number of notes that relate to the relevant appointment?
Cheers.
Hey everyone,
I'm working on a document management system that will allow the users to tag docs. Would it better in terms of performance and general maintenance to have all the tags comma de-limited in a column of the doc record, or have each tag in a row of an associated table?
Thanks in advance!
how can run a query that would not list duplicate e.g.
item 1 section 1
item 2 section 1
item 3 section 1
item 4 section 1
item 5 section 2
item 6 section 2
item 7 section 3
the output would be
section 1
section 2
section 3
how to find which items from a list (without using table ) are not in a specific table
('443',
'470',
'878',
'567',
'430'
)
problem is the following query gives what is in the table
select distinct areacode
from area_code
where areacode
in
('443',
'470',
'878',
'567',
'430'
)
tried using count to see 0 but only get 1 .... N
don't want to create a table everytime ... for dynamic list
TIA
Hello Experts. You may have more luck at this than me.
I am interested in finding the quantity of items that were ordered alone. I have an orderid field and a product field. So the count of the orderid has to equal one and the have them grouped by product.
Example of how data looks like
I am looking for transactions like orderid 3 and 5.
OrderID
Product
1
hotdog
1
burger
1
taco
2
burrito
2
snack
2
chips
3
burger
4
hotdog
4
burger
4
taco
5
burrito
6
snack
6
chips
When i run
SELECT product, count(orderid)
From Table
Where BusinessDateID = 20060725
group by product
having (count(orderid)=1)
I only get back items that were only sold once.
I am looking for a result that looks like this
Product
Ordered alone
hotdog
2
burger
3
taco
4
burrito
32
snack
12
chips
76
Hi , I am trying to write a report generator by simply using a form and then a gridview that query's the database based on what the user selects on the form. Anyways, I update the SQL parameters similar to below code. I just want to know how i can tell the parameter to get ALL values from the parameter instead of a specific value. For example if the user wanted to see ALL the records for CustomerName what would i set the parameter default value to? I tried the asterisk but that did not work. Please guide me....Thanks! MattSqlDataSource1.SelectParameters["CustomerName"].DefaultValue = "some value";<asp:SqlDataSource ... > <SelectParameters> <asp:Parameter Name="CustomerName" /> </SelectParameters></asp:SqlDataSource>
View 1 Replies View RelatedI need to create a stored procedure that takes a list of product
numbers(541, 456, CE6050,...) and selects only the customers that have
all product numbers in the list. I have a product table that has the
following schema:
rowid numeric(18,0),productNumber numeric(5,0),customerNumber numeric(5,0)
and a customer table:
customerNumber numeric(5,0),address varchar(50),contact varchar(50)
So a customer can have more than one product, but I need a select
statement that takes the product numbers and selects them against the
product table and returns only the customerNumbers that have the entire
list of product numbers. I have tried doing a join on the product list and productNumber, then join with the customer table on customerNumber, but that gets any entires found in the list not the entries that have all the product numbers. Thanks in advance for any help.
...such as stored procedures, tables etc.
Initially this started as a case of "doh, I should just be using one database here, not two", and I was simply wanting to copy database tables. In VS2K5 I tried as there is a right click menu option of copy when a table is selected but this doesn't work for me with any database object of any kind. So fast forward to the present...I now am attempting to deploy an app to a hosting service, 1&1.com. I am allowed only one database in my current package, which should be fine for now. So I had to combine the ASPNETDB along with 2 other databases. It took a bit of time, but I got everything done, I thought, and posted to the servers. While debugging I get an error saying a stored procedure can not be found. And it indeed is not.This really confuses me as I made the changes in VS2k5, shut down and restarted to make sure I didn't miss anything, then used SQL Server Man. Studio to make a .bak file to upload to my hosting service. It never occurred to me to verify the changes I made in VS2k5 were actually on the database when viewed there. Well, they aren't, and I have no idea why. That would be issue #1 I suppose.So after giving the background info here, what I am looking for help with is how to get the changes I am making in VS2k5 to also be present when viewed from SQL Server Man. Studio as the only means of posting a db to my hosting provider is by using a .bak file.Also, why is it a project template I download has a .mdf file I am not able to even see in SQL Server Man. Studio? I guess if I had this answer the issue would be resolved.TIARegards,Joe
Hi,I am getting a mysterious error message, and it doesnt say which line it referres to, just gives me a stack trace.Could somone decipher it for me?:System.Data.SqlClient.SqlException: Incorrect syntax near 'items'. [SqlException (0x80131904): Incorrect syntax near 'items'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +180 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2411 System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) +190 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +380 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +115 System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +395 System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) +405 System.Web.UI.WebControls.SqlDataSource.Insert() +13 detailproview.Button2_Command(Object sender, CommandEventArgs e) +41 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +75 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +155 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4886 My page code is:private bool ExecuteUpdate(int quantity){ SqlConnection con = new SqlConnection(); con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"; con.Open(); SqlCommand command = new SqlCommand(); command.Connection = con; TextBox TextBox1 = (TextBox)FormView1.FindControl("TextBox1"); Label labname = (Label)FormView1.FindControl("Label3"); Label labid = (Label)FormView1.FindControl("Label13"); command.CommandText = "UPDATE Items SET Quantityavailable = @qty WHERE productID=@productID"; command.Parameters.Add("@qty", TextBox1.Text); command.Parameters.Add("@productID", labid.Text); command.ExecuteNonQuery(); con.Close(); return true;} private bool ExecuteInsert(String quantity) { SqlConnection con = new SqlConnection(); con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"; con.Open(); SqlCommand command = new SqlCommand(); command.Connection = con; TextBox TextBox1 = (TextBox)FormView1.FindControl("TextBox1"); Label labname = (Label)FormView1.FindControl("Label3"); Label labid = (Label)FormView1.FindControl("Label13"); command.CommandText = "INSERT INTO Transactions (Usersname)VALUES (@User)"+ "INSERT INTO Transactions (Itemid)VALUES (@productID)"+ "INSERT INTO Transactions (itemname)VALUES (@Itemsname)"+ "INSERT INTO Transactions (Date)VALUES (+DateTime.Now.ToString() +)"+ "INSERT INTO Transactions (Qty)VALUES (@qty)"+ command.Parameters.Add("@User", System.Web.HttpContext.Current.User.Identity.Name); command.Parameters.Add("@Itemsname", labname.Text); command.Parameters.Add("@productID", labid.Text); command.Parameters.Add("@qty", TextBox1.Text); command.ExecuteNonQuery(); con.Close(); return true; }protected void Button2_Click(object sender, EventArgs e){ TextBox TextBox1 = FormView1.FindControl("TextBox1") as TextBox; ExecuteUpdate(Int32.Parse(TextBox1.Text) );}protected void Button2_Command(object sender, CommandEventArgs e) { if (e.CommandName == "Update") { SqlDataSource1.Insert(); } }}. Thanks!Jon
View 7 Replies View RelatedI want to select the latest photos that were posted on my site from my photos table:id name usercode createdate1 holiday 5 1/1/20082 holiday2 5 1/1/20083 my car 5 1/1/20084 new home 7 1/1/20085 starry night 8 1/1/20086 me again 6 10/10/2007But in case one user has posted like 400 photos I dont want to show 400 photos of the same user as that would mess up latest photos. So I want to show the latest photos but always with a maximum of 3 for the same user...So in the above data example pictures with id 1,2,3,4,5 would be shownHow can I achieve this with SQL (and as always: without temp tables :))Thanks!
View 7 Replies View Relatedhi I Cant delete items in my grid view.. here is my code
"
DeleteCommand="DELETE FROM [aspnet_Membership] WHERE [UserId = @UserId]" SelectCommand="SELECT First, Last, Email, CreateDate, IsApproved, IsLockedOut FROM aspnet_Membership">
when i run it.. and clicked the delete button.. this appears:
Server Error in '/mapuaResearch' Application.
--------------------------------------------------------------------------------
An expression of non-boolean type specified in a context where a condition is expected, near 'UserId = @UserId'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: An expression of non-boolean type specified in a context where a condition is expected, near 'UserId = @UserId'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): An expression of non-boolean type specified in a context where a condition is expected, near 'UserId = @UserId'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +95
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +82
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +346
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +3430
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +186
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1139
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +334
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +407
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +149
System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +493
System.Web.UI.WebControls.SqlDataSourceView.ExecuteDelete(IDictionary keys, IDictionary oldValues) +922
System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary oldValues, DataSourceViewOperationCallback callback) +176
System.Web.UI.WebControls.GridView.HandleDelete(GridViewRow row, Int32 rowIndex) +914
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +1067
System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +215
System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3839
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
PLEASE HELP ME!!!!! TNX
I have a database with multiple items each day. I'm looking to extract monthly information from this data. So I'm thinking that I would like to have a drop down list with each available month in the list. How would I extract which months (for multiple years) have data from a datatype = smalldatetime?
I'm using c#
Thanks!
I need to create an ordered list of items using a select statement in a stored procedure. All itemsare obtained from a table but the first item in the list has a different value from the others.
View 10 Replies View RelatedHello,
Inside a column I have this result:
Record 1: Sales;Admins
Record 2: ;Sales;Admins
Record 3: Sales;
Record 4: Admins;
You can see the delimiter ";", it can be everywhere.
Now I want to delete "Sales".
Therefor I have to search where the "Sales" is. (records)
After that I want to delete the "Sales".
If I delete it the record may not have 2 or more delimiters after each other, like here:
Record 1: ;Admins (good, better is to remove the delimiter also)
Record 2: ;;Admins (bad)
Record 3: ;(good, better is to remove the delimiter also)
Record 4: Admins;
Can somebody help me how to build this query?
Thanks!
We are having blocking issues on our server. Recently, I noticed that we no longer have any thing under Current Activity. When I click the plus sign beside it, it shows no items - that is, no process info, locks/process ID, or the locks/object. Does anybody know why and how I can reset it?? Thanks for your help.
View 3 Replies View RelatedHi
I had replication set up and working but had to unbind the Pub/Sub and re add. Now on the ditribution task in Executive I am getting the following error
The last distributor job id and the last subscriber job id do not match. No jobs were available with a job id > 2147.
This is SQL Server 6.5 by the way.
Does anyone know what has caused this and what the solution is?
Steve
I am trying to get a count of how many times a badge is entered in each hour it appears. In other words, I would like to find out how many times badge 3333 comes up in each hour of the day, the same with badge 4532.
The task at hand is to find out productivity for items processed per hour per badge number. I know I will need to take the hour out of timedate using datepart, but the results do not look right. Would anyone have any ideas on this? Thanks!
the table I have looks like this:
IDBadgeOrdNumberTimeDate
6112133333781267941/10/05 9:19
6112084532781275591/10/05 9:21
6111973333781265611/10/05 9:29
6111903333781261671/10/05 9:30
6111774532781253021/10/05 9:38
6111693333781257811/10/05 9:40
I just started having this problem. When I log into SQL2000 enterprise manager and click on my database, the main directory tree shows up. When I click on the Database tree to display all of the different databases on the SQL server, the text 'No Items' shows up. I can not get to any databases, but I am connected to the SQL server. Does anyone have a solution for this problem?????
I have tried re-inatalling and all of the service packs.
Thanks !!
Ive got this monster which will give me a parent categoryName and the number of records linked to a child of that category, I want to use it for a directory where the list of categories has the number of records in brackets next to them. Note: a A listing will show up in each category count it is associated with
Like
Accommodation (10)
Real Estate(30)
Automotive(2)
Education(1)....
Select trade_category.iCategory_Name,Listing_category.iPa rentID,count(Listing_category.iCategoryID) as num
from Listing_category,trade_category Where Listing_category.iParentID = trade_category.iCategoryID Group by
Listing_category.iParentID,trade_category.iCategor y_Name
Union ALL
Select Freecategory.sName,Listing_category.iParentID,coun t(Listing_category.iCategoryID) as num
from Listing_category,Freecategory Where Listing_category.iParentID = Freecategory.iFreeID Group by
Listing_category.iParentID,Freecategory.sName
Which Produces
Real Estate12401 12
Extreme Sports3 4
I would Like to get the same query to produce a list of all the empty records too.
so
ID Count
Accommodation 6112 0
Real Estate 12401 12
retail 12402 0
Extreme Sports3 4
Cycling 5 0
Looking for a little assistance with a big problem.
I lost some data from a query that went wrong. I still have the logfile though, is there anyway of retrieving the data from the log file (.LDF) so that I can undo what someone did?
I located some 3rd party software but they are big bucks and the demos won't allow you to do it..
Thanks in advance,
Jay
In my enterprise mngr under Microsoft sql Servers
Sql Server Group
I see (No Items)
My network guy doesnt no much about this and i know nothing (all my experience is with db on my local hd.
Please let me know as much as possible.
Thanks
I am using SQL Server 2000. I am logging on local machine. When I open "SQL Server Enterprise Manager," I only see following:
Console Root --> Microsoft SQL Servers --> SQL Server Group --> (No items)
The server is running properly and applications are able to access the database. Also, I can run "Query Analyzer" and view all databases.
Please help to resolve the issue to view items in SQL Server Group.
Thanks,
Suraj.
Hi,
I have a view of all quotes on our system which contains the quote number and the value of each item in the quote. I am trying to group the quotes so each entry only appears once. (NOt worried about the value field as there is a subtotal field that can be used in its place). An example would be......
QuoteNo Subtotal
quote001 54.52
quote002 10.35
quote002 10.35
quote003 25.01
quote004 31.23
quote004 31.23
quote004 31.23
I am trying to get it like this.....
QuoteNo Subtotal
quote001 54.52
quote002 10.35
quote003 25.10
quote004 31.23
Can anyone help?
Thanks,
AMB
I was thinking last night of restructuring the way "Related Items" are pulled from the database for one of our sites. Basically at the moment it is upto the client to flag two products as related. I'm thinking of using a new method of tagging the products and then finding related products based on the tags assigned -the general code for this is below but what I want to know is, is using "IN" the most efficient way of doing this?
TIA
Tim
DECLARE @ItemId int
SET @ItemId = 1
SELECT
COUNT(i.ItemId) AS MatchingTags,
i.ItemId,
i.ItemName
FROM
tst_Items i LEFT JOIN txt_x_Items_Tags x
ON i.ItemId = x.ItemId
WHERE
x.TagId IN (
SELECT
t.TagId
FROM
tst_Tags t LEFT JOIN txt_x_Items_Tags x
ON t.TagId = x.TagId
WHERE
x.ItemId = @ItemId
)
GROUP BY
i.ItemId,
i.ItemName
HAVING
i.ItemId <> @ItemId
ORDER BY
MatchingTags DESC
The testing data:
CREATE TABLE [dbo].[tst_Items](
[ItemId] [int] NOT NULL,
[ItemName] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[tst_Tags](
[TagId] [int] NOT NULL,
[TagName] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[txt_x_Items_Tags](
[ItemId] [int] NOT NULL,
[TagId] [int] NOT NULL
) ON [PRIMARY]
GO
INSERT INTO tst_Items VALUES (1, 'Test Item 1')
INSERT INTO tst_Items VALUES (2, 'Test Item 2')
INSERT INTO tst_Items VALUES (3, 'Test Item 3')
INSERT INTO tst_Items VALUES (4, 'Test Item 4')
INSERT INTO tst_Tags VALUES (1, 'Tag 1')
INSERT INTO tst_Tags VALUES (2, 'Tag 2')
INSERT INTO tst_Tags VALUES (3, 'Tag 3')
INSERT INTO tst_Tags VALUES (4, 'Tag 4')
INSERT INTO txt_x_Items_Tags VALUES (1, 1)
INSERT INTO txt_x_Items_Tags VALUES (1, 2)
INSERT INTO txt_x_Items_Tags VALUES (1, 3)
INSERT INTO txt_x_Items_Tags VALUES (2, 1)
INSERT INTO txt_x_Items_Tags VALUES (2, 3)
INSERT INTO txt_x_Items_Tags VALUES (3, 1)
INSERT INTO txt_x_Items_Tags VALUES (3, 2)
INSERT INTO txt_x_Items_Tags VALUES (1, 4)
INSERT INTO txt_x_Items_Tags VALUES (4, 4)
GO
----------------------------
I've finally started blogging (all be it badly!)
Check it out:
http://blogs.thesitedoctor.co.uk/tim/
Hi
I am bringing back a large amount of data, with many entries based around several different people.
Is there any way of say
Display the first (or one) row for each new entry in the column
i.e.
NOT
Dave 1 Uk
Dave 2 Usa
Dave 5 France
George 3 UK
George 6 Ghana
Phil 2 Japan
Phil 7 America
BUT
Dave 1 UK
George 3 Uk
Phil 2 Japan
This will help me check each person with having to scroll past the hundred or so entries for each person.
cheers
Hi,
Wondering if I might get some advice on the following. Thanks!
For this result set:
--Number--Name-----Cat----Message-------MssgTime
--001-----Product1-Retail-this is Good--1/10/08 10:00AM
--001-----Product1-Retail-this is OK----1/10/08 10:01AM
--001-----Product1-Retail-this is Bad---1/10/08 10:03AM
--002-----Product2-Wholsl-this is blah--1/10/08 11:01AM
--002-----Product2-Wholsl-this is Sad---1/10/08 10:03AM
--003-----Product3-Commrc-this is it----1/10/08 11:01AM
--003-----Product3-Commrc-this is yuk---1/10/08 11:30AM
What query would get me this:
--001-----Product1-Retail-this is Bad---1/10/08 10:03AM
--002-----Product2-Wholsl-this is blah--1/10/08 11:01AM
--003-----Product3-Commrc-this is yuk---1/10/08 11:30AM
In other words the row with the latest message for each product
Hi,
I have the following table Descriptions:-
Item No. -- Supp1-- Supp2-- Supp3 .... Supp10
I want to have a list of items for each supplier on the tables showing the following:-
Header is the Supplier No.
Details of each item Item No
Thanks for your help
I have an environment that has 18 separate SQL server machines. Whenconnected to the LAN I can connect to each and expand the databases tab noproblem. When I try the same over a VPN I find that three of my servers willconnect but on expanding the databases I get a long pause then 'No items'.I've checked around and found some references to the same problem (SQLserver mag site) but no resolutions. I'm running XP pro and my SQL is sp3.The three servers in question have only TCP and named pipes in the net lib,they are all on Win2K one is on sp3, one on sp2 and one is 'out of the box'.The VPN has ports 1433 and 1434 udp and tcp allowed.Does anyone have any suggestions as to what is causing this, its got to besomething simple but I've been looking at this so long now I cant see thewood for the trees.Help appreciated.
View 1 Replies View Related