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 strongm 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: mimi2
  • Order by date
  1. mimi2

    How to display Row values in a single column ?

    I had to use cursors and it is sloooooowwwww! Does any one have an idea ? thanks a lot.
  2. mimi2

    content addition to a text column

    something like this: declare @story varhar(800) set @story = (select story from story_table where story_id = 1) update story_table set story= @story + 'blah blah blah' where story_id in (1,2,3)
  3. mimi2

    Group and Case question

    Hello. what is missing in my statement? i need to count the number of Ns and Ys in my table. select CASE WHEN (P.ID =1 OR P.ID=4 OR P.ID=22 OR P.ID=2) THEN 'N' ELSE 'Y' END AS SUB, count(SUB) from MAIN P group by SUB
  4. mimi2

    How to display Row values in a single column ?

    Hi, I have this table: id value 1 neg 1 plus 3 neg 2 pos 1 nil 2 nil i would like to transform it to: id value 1 neg,plus,nil 2 pos,nil 3 neg The order is very important. I am looking for a solution without a cursor if possible. I looked at this poste...
  5. mimi2

    Interpretting HTML in a query

    could you try this: USE pubs GO SELECT substring (title_id,CHARINDEX('<DIV>', notes),CHARINDEX('</DIV>', notes)- CHARINDEX('<DIV>', notes) ) FROM titles WHERE title_id = 'TC3218' i took it from books on line: -- Use the optional start_location parameter to start searching -- for wonderful...
  6. mimi2

    select

    is this ok ? PRINT Convert(Char(20), getdate(), 120) PRINT Convert(Char(20), getdate(), 111)
  7. mimi2

    Running Totals

    My mistake. I added other fields in the group by part. It is working now (that i group by user only) thanks a lot again
  8. mimi2

    Running Totals

    ...incorrect and user2 100%. this piece of code gives either a 0% or a 100% (per row): AVG( CASE WHEN answer = user_answer THEN 1.0 ELSE 0.0 END ) * 100 AS percentage_correct, I am hoping to have one percentage per user (and not per row).Meaning number of incorrect answers / total answers for...
  9. mimi2

    Running Totals

    Hello, This is the first time I am trying to run sUb-totals and i am having some difficulty to do it. the table i created is like this: user answer user_answer --------------------------- usr1 AG AG usr1 AG AS usr2 AG AS usr2 HS AS i am trying to count...
  10. mimi2

    IF question

    thanks a lot. the trim trick made it work
  11. mimi2

    IF question

    Hello, i know it is simple, but i can't get it to work!!!! I have a file like this: XX XX 1 XX YY 15 i need to count the number of correct and incorrect answers. for that purpose, i am addind two columns &quot;correct&quot; and &quot;incorrect&quot; for instance, for the first lign...
  12. mimi2

    difference between Prevasive and SQL 2000

    Hello, Could you tell me what is the difference between an SQL 7 / 2000 database and a Prevasive database. Are the queries the same ? Do I have to learn a new langage ? Thanks a lot
  13. mimi2

    Problem running query from front-end.

    I think you should write something like this first: FROM Companies INNER JOIN Customers ON Customers.CustomerID = Companies.CompanyID INNER JOIN Banks ON Banks.BankID = Companies.BankID INNER JOIN Receipts Companies.CompanyID ON BANK.BankID= Receipts.BankID
  14. mimi2

    Insert rows from another table

    from the object browser in query analyzer, you can drag all columns at once and drop them where you want. you dont have to type them one by one
  15. mimi2

    Insert rows from another table

    i used something like this in the past: insert into table2 (id,name) select id, name from table1 where id in (select id from table1 where id not in (select id from table2) )
  16. mimi2

    Insert rows from another table

    INSERT INTO table?? (number ,date) SELECT p.number ,m.date FROM test p INNER join test_m m on m.test_id = p.test_id WHERE (id = @id ) ORDER BY p.number, m.date
  17. mimi2

    how to improve my query

    that was perfect. thanks
  18. mimi2

    how to improve my query

    if possible , i would like to use the following part only once for both queries: SELECT distinct client_id from main m inner join client p on m.client_id = p.client_id where (location_id = @location_id) AND year ( date_done) = @year_of_request then differentiate according to the age_id (a...

Part and Inventory Search

Back
Top