Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: dalec
  • Order by date
  1. dalec

    Count in SP different from hand written (same criteria)

    Thank you very much George. I didnt know that, and for something that seemed simple to do, it has been quite a challenge. -Dale
  2. dalec

    Count in SP different from hand written (same criteria)

    That makes sense. Thank you! I was beginning to thank that I was going to have to do a loop thru the data to make it work. I'm not used to making multiple joins and that was exactly what I needed that you pointed out. Thank you so much george!!
  3. dalec

    Count in SP different from hand written (same criteria)

    Been working on this for a couple of days, and I switched things around. Now I have it work (I think), but it's in the reverse, it displays only the viewed messages. SELECT Messages_Admin.Subject, Messages_Admin.Message, Messages_Admin.CreatedDate, Messages_Admin.Createdby...
  4. dalec

    Count in SP different from hand written (same criteria)

    PS: there is also a org_ID field in table 1 which is only for segregating organizations but doesnt effect my output I just didnt include it in the example (incase you look at the code in my first question).
  5. dalec

    Count in SP different from hand written (same criteria)

    Table 1 Subject nvarchar(50) Message nvarchar(Max) CreatedBy nvarchar(50) CreatedDate datetime Msg_ID int (identity) Table 2 User nvachar(50) Msg_ID int Viewed bit VDate datetime Table 1 Data Subject: Hello World Message: What a great snowy day in Dallas Createby: Dalec CreatedDate...
  6. dalec

    Count in SP different from hand written (same criteria)

    Ok, I think I've made myself nutty. I just can't get the results I want and my mind has officially turned to clay. What I have is a table that has a simple text field to store messages then I have a second table with user names that have viewed the message. The first table has a msgID and once...
  7. dalec

    Count in SP different from hand written (same criteria)

    That link will help, I'm going to write it from scratch, I think what you posted will be great to base it by. thank you.
  8. dalec

    Count in SP different from hand written (same criteria)

    Thank you George, I'll take a look and change this, I notice other issues, that isnt working like I want.
  9. dalec

    Count in SP different from hand written (same criteria)

    Strange issue. I have a sql statement that returns a set of rows for a datagrid (which works correctly). I have the same criteria to get a count of rows in a stored procedure. My problem is when I get the count from the stored procedure it always returns the number of records, but, the sql...
  10. dalec

    Search query one way to return data another

    That save correctly, thank you! I didnt know what to do.
  11. dalec

    Search query one way to return data another

    Thanks for that, don't know how I did that? Now I get a incorrect syntax near '>' Current Code: PROCEDURE Main_InvSch @NameSch nvarchar(70) as SELECT * from Main_inventory inner join ( select category from Main_Inventory where [descrip] = charindex(@NameSch...
  12. dalec

    Search query one way to return data another

    You know what, it might matter that it is SQL 2000
  13. dalec

    Search query one way to return data another

    Here is what I ended up with: PROCEDURE Main_InvSch @NameSch nvarchar(70) as SELECT * from Main_inventory inner join { select category from Main_Inventory where header = 1 and description = charindex(@NameSch, [descrip]) > 0 } as CategoryQuery on...
  14. dalec

    Search query one way to return data another

    Thank you, I'll play around with this in the SP. I've always used standard query's and was really hoping for SQL to do the work on this one. This really helps. Thank you for the great explanation too. Dale
  15. dalec

    Search query one way to return data another

    thank you Ryan Could you explain this a little. I'm getting most of it, looking in the entire table, sub query on header = 0 and with a search on category where the category = the category of a temp table? Sorry if I'm missing something, I've just not done query's like this. thanks in advance.
  16. dalec

    Search query one way to return data another

    Yes, The data structure is like this: Description nvchar 50 Qty Cost Category int ID Identity Header Bit When an item is entered it can also be a Category Header (this is probably where my biggest hurdle is, since I used the same data base to store both header and...
  17. dalec

    Search query one way to return data another

    Except the items are in the same database with the categories. I just use a bit field to tell if it's header (category) or not.
  18. dalec

    Search query one way to return data another

    Thank in advance! I have a query where I'm searching an inventory database. This database has items grouped by categories (headers). What I'm trying to do is search only the descriptions from the categories (no problem), but, what I need returned is the items also under the categories searched...
  19. dalec

    Simple Search for a Simple Guy

    After about three weeks with this, I just want to say to anyone out there, make sure if you change your code (vb.net 2008) make sure you refresh any stored procedures your referencing from the datasets and tableadapters to stored procedures your using, because this was a nightmare, I just needed...
  20. dalec

    Simple Search for a Simple Guy

    OK, now I don't believe it. I went to the data desinger and tested the stored procedure from there, it worked like it was suppose to. Now when I run the application, it's working. No real code or sp changes, just started working after I tested it there (maybe that needed a refresh)???? thanks...

Part and Inventory Search

Back
Top