But I still don´t know how to call the equipment table and get champion name and item names for the numbers. What did I do wrong and how can I fix it?
I have a BOM table with all finished item receipes and semi items recipes. create a query where semi item materials are also listed in finished item recipe.
Here's my problem. I have 2 tasks defined in my Control Flow tab:
EXECUTE SQL--------->EXECUTE DTS 2000 PACKAGE
When I attempt to run it, by right-clicking the EXECUTE SQL task, and selecting "Execute Task", it only runs the EXECUTE SQL part (successfully), and does not "kick off" the EXECUTE DTS 2000 PACKAGE, after it is done running (even though it completes successfully, as shown by the green box).
Yes, they are connected by a dark green arrow, as indicated in my diagram above.
Why is this?? Am I missing something here? Need help.
Hello,Basically, I have a table with 2 fieldsId item#1 33332 33333 22224 22225 22226 33337 33338 3333I would like to only select the last identical Item# which in this case would be the id 6,7 and 8Any idea how could I do that?Thanks
I am having trouble finishing the last bit of a report. The report shows orders that customers have placed that contain 0 promo items, All promo items (all items in order are promo items), and a mix of promo and non promo (at least 1 promo item and 1 non-promo item). Ive simplified this a bit for ease of understanding but lets assume we have 2 tables: A Promo table that contains the items on promotion and the dates that promotion is valid, and a Sales table, that contains the order number, order date, and sku ordered.
I've already written code that finds orders that have at least 1 promo item in them, and using that, I can determine what orders have 0 promo items in them. Where I am stuck is taking the orders that have at least 1 promo item in them, and separating them into orders that have only promo items, and those that have both promo and not promo items in them. Also, there are several promos throughout the year (called "Offers") so in my code below, you can see 2 different Offers ("JF" and "MA") with their corresponding dates they are valid. They will never overlap. My results also have to be split out by Offer so management can look at the results of each offer separately. Here is some code:
Code: create table #Promos ( Offer varchar(2) null, SKU int null, StartDt date null, EndDt date null
[Code] ....
So my results should show OrderNo A1111 in the Promo and No Promo group because of SKU 5 not being promotional during the time that order was placed. OrderNo A2222 should be in the Promo Only group because both SKUs on the order were promotional at the time the order was placed.
Not 100% sure how to do this so I would appreciate some directions. I have 2 tables, Systems and Contacts. A system can have 1 to infinite contacts and contact can have 1 to infinite systems. So I use a 3rd table Sys_Con to add the contact needed for each system. Now my question is once I add the System and contact how do I know for sure which ContactID to add in my Sys_Con table? Because while I am doing this operation maybe someone can add an other contact. So is there a way for my store proc Add_Contact to return the contactID needed for my store proc Add_Sys_Con ?
TABLE Sys_Con SystemID int ContactID int
Table Contact ContactID int Identity ContactName ...
What I would like to have is only ONE (1) row PER member with only the FIRST (not max!) entered known data. In the above case, I'd like to have this as result:
How can I get the value of the last Item in a coums?SELECT COLUMN FROM DATABASE ORDER BY COLUMN DESC?something with Fields(0).value?Thank you in advance
I have sql server 2000 that was working fine until today(figures), today I opened EM and under sql server group where used to be all my information now there is NO ITEM, nothing shows(database,Nothing) The server is working as I had no complaints from my user on data not been saved or getting data from but its strange that I can not see all my info like I used to.- If I go into sql query analizer, it ask me to connect to local which I do and I can see all my databases from there but once I close that window ,on my EM nothing shows.
I checked all services andevery one of them seems to be up and runnig
Hi Every Body, I have one table it's called -Access.It contains two columns name of that is Door,Emp_Id. example Door Emp_Id 10 1 10 2 10 3 11 4 12 5 11 1 this is the value in that table....... I want get Which Door number maximum Access from the table..... Thanks & Regards, S.Sajan
Hi Everyone I have an ADP and I need to create a report that will give me the total number of each item. I need the report to show how many [Violation Type], and the total [Loss] per violation. Can anyone help please
I have some problem about parameter to query data. My parameter is available from dataset but it doen not have blank or null value. So when I want to select this...
SELECT * FROM mytable WHERE (@param_person_id IS NULL OR @param_person_id = person_id)
cannot success. This statement means "if @param_person_id has null value, this statement is select every person_id. On the other way, if @param_person_id is not null value, this statement select only specific person_id".
So I want to add blank or null value to my dataset for working with select statement.
I added something by mistake! If I delete it it gives me an `are you sure?` message that makes me think it'll actually delete the file from the hard drive. As I've accidentally added something from SQL Server (I was trying to add a database and got carried away) I don't think that's such a good idea. I've googled and found this:http://msdn2.microsoft.com/en-us/library/1ee8zw5t(VS.80).aspx which helpfully states:----- To remove a solution item In Solution Explorer, select the item you want to remove. On the Edit menu, choose Remove. ----- which would be great, if only the Edit menu had a remove option. Any ideas?
Hi,I want to check that Is there row exists in table or not.Please correct me. Dim conn As SqlConnection Dim comm As SqlCommand Dim reader As SqlDataReader Dim connstring As String connstring = ConfigurationManager.ConnectionStrings("iharyana").ConnectionString conn = New SqlConnection(connstring) comm = New SqlCommand("select * from test where username=@username", conn) comm.Parameters.Add("@username", Data.SqlDbType.VarChar, 20) comm.Parameters("@username").Value = uname conn.Open() reader = comm.ExecuteReader While reader.Read If reader.Item("username").ToString = "" Then Response.Redirect("http://www.iharyana.com") End If End While reader.Close() conn.Close()
just wondering which command I can use to query items status ? in my TABLEA Product(D | Name | Type | Status 1 Apple Fruit 00021234 2 Banana Fruit 00031244 3 Tube Clothe 00012131 4 Tee Clothe 00041111 4 pants Clothe 00041112 4 tank Clothe 00051111 4 Jeans Clothe 00061111 4 Dress Clothe 00051111
in TABLEB ID StatusID Status 1 0001 A 2 0002 B 3 0003 C 4 0004 D 5 0005 E 6 0006 F use this record as a example : ProductID | Name | Type | Status 1 Apple Fruit 00021234
use TableA.Status reference to TableB.StatusID ( compare 0001 , need not to care about the last 4 numbers ) so the status is A
AB is Group 1 C is Group 2 DEF is Group 3 in my TABLEA Product(D | Name | Type | Status 1 Apple Fruit 00021234 2 Banana Fruit 00031244 3 Tube Clothe 00012131 4 Tee Clothe 00041111 4 pants Clothe 00041112 4 tank Clothe 00051111 4 Jeans Clothe 00061111 4 Dress Clothe 00051111
I want the result looks as follow TYPE Group 1 Group 2 Group 3 Fruit 1 1 0 //because Apple Fruit 00021234 → 0002 = B → Group 1 And Banana Fruit 00031244 →0003 =C→Group 2 Clothe 1 0 5
I need to run a query to get the result like that , and then put the result to my DataGrid then show to user... can I just use SQL Query to get the result? I just try to use like sum�Substring ... trying to get the result but I still can't wirte a query to work for this question.. which command I should use for this question? or it must be done in code-behind ? can you please give me help? thank you very much
If you browse to Amazon and drill down through categories until a paged listing appears, you will see in each item of the listing that the description rendered as Book Description, is a cutdown version of the full description, with a ... and "Read More" hyperlink. How is this achieved programatically? I dont know if thre is an efficient way in SQL Server to do this, or whether it would be easier to have a ShortHand field and a Description field, both of which are teh full description when shown in the Details page, but the ShortHand is the field rendered in listings. This seems like a simplistic solution and I am thinking there may be programmatic means of doing the same - has anybody got any experience in this area?
I have a table with Bill_Doc, Bill_Item and Bill_Doc_Count fields. I need to update Bill_Doc_Count with 1 only on the first Bill_Item. Is this possible? I tried min and max but they don't work for me.
I have a sql table containing names of departments. Is there a way after a user has typed a department in a textbox on a web page I can search for it in the sql table and if it isn't there then add it. I am using asp.net for the web page.
Hiya,I want to populate a list view (in a variety of ways), but I would rathernot execute my function once for every record I want to show in the list.What I want to do is pass an array of "keys" into a stored procedure andhave that procedure return one recordset with all of the records in. Sowhat I want to do is something like:CREATE PROCEDURE MySuperProcedure@MyArrayOfIDs (some way of specifying an array of integers),ASSELECT *FROM MyTableWHERE MyArrayOfIDs.ContainsTheInteger ( MyTable.ID )Obviously this syntax is not available. Is there another way of doing this?
I am using SQL Server 2005 Reporting Services. Right now, I have a textbox with 0 or 1 values in my report and I want to show a checkbox: checked for value 1 and uncheck for 0. Is there anyway to add a checkbox in the report?
I have included the create table statements, sample data and a stored procedure.
I have a stored procedure that walks the associations so that I can assemble all the nodes of the tree. I think this is working properly.
I have two requests/needs/problems that I need to solve: (1) I want to create a NEW stored procedure that takes a WhoID and an AssocID. This new stored procedure would show the shortest or closest path between WhoID and AssocID.
For example, if I pass in 6,1 to this new proc I want the stored procedure to return the hierarchy with the closest path between them. Based on the sample data below, the path would be 6 - 8 8 - 2 2 - 3 3 - 1
(2) I might also need a proc that accepts two inputs (again, lets use 6,1) but would show all paths / branches of the tree where person 1 exists. Based on the stored procedure procCTE_Assoc 6, this solution would exclude the "fred and jeff" node but would include the other two nodes because person 1 is within the other two nodes.
Please provide your suggestions, comments, or solutions!
CREATE TABLE dbo.Who( WhoID bigint IDENTITY(1,1) NOT NULL, FName varchar(50) NOT NULL ) GO CREATE TABLE dbo.Assoc( WhoID bigint NOT NULL, AssocID bigint NOT NULL ) ON PRIMARY
SET IDENTITY_INSERT dbo.Who ON GO INSERT INTO Who (WhoID,FName) VALUES (1,'user1') INSERT INTO Who (WhoID,FName) VALUES (2,'user2') INSERT INTO Who (WhoID,FName) VALUES (3,'admin1') INSERT INTO Who (WhoID,FName) VALUES (4,'admin2') INSERT INTO Who (WhoID,FName) VALUES (5,'admin3') INSERT INTO Who (WhoID,FName) VALUES (6,'Keith') INSERT INTO Who (WhoID,FName) VALUES (7,'fred') INSERT INTO Who (WhoID,FName) VALUES (8,'Joe') INSERT INTO Who (WhoID,FName) VALUES (9,'Jack') INSERT INTO Who (WhoID,FName) VALUES (10,'Doug') INSERT INTO Who (WhoID,FName) VALUES (11,'Mark') INSERT INTO Who (WhoID,FName) VALUES (12,'Al') INSERT INTO Who (WhoID,FName) VALUES (13,'Jeff') INSERT INTO Who (WhoID,FName) VALUES (14,'Brandon') INSERT INTO Who (WhoID,FName) VALUES (15,'Ashley') INSERT INTO Who (WhoID,FName) VALUES (16,'Lisa') INSERT INTO Who (WhoID,FName) VALUES (17,'Julie') INSERT INTO Who (WhoID,FName) VALUES (18,'Brian') go SET IDENTITY_INSERT dbo.Who OFF GO INSERT INTO Assoc (WhoID,AssocID) VALUES (1,4) INSERT INTO Assoc (WhoID,AssocID) VALUES (2,1) INSERT INTO Assoc (WhoID,AssocID) VALUES (2,3) INSERT INTO Assoc (WhoID,AssocID) VALUES (6,7) INSERT INTO Assoc (WhoID,AssocID) VALUES (6,8) INSERT INTO Assoc (WhoID,AssocID) VALUES (7,13) INSERT INTO Assoc (WhoID,AssocID) VALUES (8,2) INSERT INTO Assoc (WhoID,AssocID) VALUES (14,8) INSERT INTO Assoc (WhoID,AssocID) VALUES (6,15) INSERT INTO Assoc (WhoID,AssocID) VALUES (15,18) INSERT INTO Assoc (WhoID,AssocID) VALUES (15,17) INSERT INTO Assoc (WhoID,AssocID) VALUES (17,5) INSERT INTO Assoc (WhoID,AssocID) VALUES (5,1)
go create proc dbo.procCTE_Assoc @WhoID bigint AS
WITH GroupsCTE (WhoID, AssocID, FName, FNameAssoc, Lvl, Sort, GroupWithIndent) AS ( -- Anchor Who definition SELECT M.WhoID, MA.AssocID, M.FName, AssocWho.FName, 0 AS Lvl, CONVERT(varchar(2000),AssocWho.FName) AS Sort, CONVERT(varchar(255), AssocWho.FName) FROM Who M INNER JOIN Assoc MA ON M.WhoID = MA.WhoID INNER JOIN Who AssocWho ON AssocWho.WhoID = MA.AssocID WHERE M.WhoID = @WhoID UNION ALL -- Recursive Who definition SELECT g1.WhoID, MA1.AssocID, g1.FName, g2.FName, Lvl + 1, CONVERT(varchar(2000),RTRIM(Sort) + '|' + g2.FName), CONVERT(varchar(255), REPLICATE ('| ' , Lvl+1) + g2.FName) FROM Who g1 INNER JOIN Assoc MA1 ON g1.WhoID = MA1.WhoID INNER JOIN Who g2 ON g2.WhoID = MA1.AssocID INNER JOIN GroupsCTE CTE ON MA1.WhoID = CTE.AssocID )
I have a table of 30,000 records on my handheld which runs windows 4.2 and sql me. When the item I am searching for is at the top of the table, the search finds it easily. When the item is in the middle or lower, it doesnt find it. I am not running out of memory and my database is on the local memory. Here is my code:
String query = "SELECT * FROM Products WHERE Barcode = " + TheReaderData.Text;
I have a report that has a lot of Textbox items that are set visible based on fields in the dataset. I have some other Textboxs that are like labels in that they should always be visible. Some are not showing up however. I checked and indeed there visibility is not conditional. I have checked the ZIndex as well and that does not seem to be amiss either. However I am not at all sure how the ZIndex is supposed to work. If it has a higher number does that represent an ability to overlay an item with a lower number? At any rate the problem still exists. Can someone please tell me what else I might check?
Is there any SQL code which displays one item if there is mutiple entry of same item. For example: in one columan I have many entry of one item, but I want to display only one item and also I want to display other column as well connecting with that item number.
I just installed reporting services standard on windows 2000 sp4; SQL has sp3a. When i first go into the report manager, i get the above error. the current url is: http://ghcacct1/ReportsElite/Pages/Folder.aspx I've looked all over and haven't found any reason why i get this. if there is anyone that can help, i would really appreciate it. thanks, denise