combine multiple rows into one row sql?
601078
You need to create an extremely large varchar variable and then you need to cursor thru your table and find all the Note Times that are 5/2/2006 or whatever note time you want them to be. Then you need to append the note time and the note to the end of your varchar variable.\n\nGoogle Cursors in SQL to see how cursoring thru a table is done.\n\nNOTE: As a software developer I cannot in my professional capacity condone the use of cursors. Personally I think they are a huge waste of performance.
436027
The usual way to do this is to have 2 tables.  One table for your purchases (i.e. the items you are bringing into your inventory) and another table for sales (i.e. the items that are going out of your inventory).  The common link is a part number (i.e. some unique number to identify each item).\n\nYou need to load each item purchased and qty. into the "purchases" table and load each item sold and qty sold into the "sales" table.  If you purchase and sell the same items over and over you can just keep adding rows to your purchases and sales table.\n\nTo see what you have on-hand you make queries that sum up all the purchases by part number and sum up all the sales by part number.  You join these together and include a formula to subtract sales from purchases.  The result is what you have on hand.\n\nDoing it this way gives you a running history of what was purchased and sold.  You never have to change or replace your original data - you just let the system do the math to tell you what's on-hand.
1059707
As much as I know about Excel, I have never seen the ability to do that. Your best bet would be to Merge multiple Cells in 25-50. This is about the only way to get the desired effect but it isn't exactly what you want to do I am guessing.
918322
CREATE TABLE cus_tmp as (SELECT * FROM members WHERE tel_hp LIKE '% - %');\n\nAll you are missing is the ().\n\nEnjoy -
1106469
Use the 'Query Analyzer' in Acess to select each field from each table then go to SQL view to copy and paste the SQL code you need.
318999
You can use blob (Binary Large Object).SQL Server supports it.
25643
I've included some helpful links listing SQL commands.  Note that some may depend on what specific database you're using (Access, MySQL, PostgreSQL), so you should check the reference for that product.
615208
SELECT fromusername, tousername\nFROM table\nGROUP BY tousername, fromusername\nHAVING fromusername = 'name of user'\nAND status = 'open'\n\nAssuming you have a column, named status, that indicates which conversations are active. That will bring in only the unique pairs you describe.\n\nAs described earlier, you could also use DISTINCT:\n\nSELECT DISTINCT tousername, fromusername\nFROM table\nWHERE fromusername = 'name of user'\nAND status = 'open'\n\nThe GROUP BY statement is computationally more efficient, but unless you are dealing with millions of records and thousands of concurrent requests, you shouldn't see a difference in performance.
774525
Edit the query's SQL code ... try changing SELECT to SELECT DISTINCT and see if that gets rid of the dupes.\n\nIf that doesn't do it, then you need to either change what fields are in your query or do some "data laundry" in the table(s) where the query's data comes from.
1132417
Skip calling the stored proc and use a cursor to grab the rows directly and insert them into the second table.\n\nExample cursor:\n--------------------------\nDECLARE @col1_value VARCHAR(100)\nDECLARE @col2_value VARCHAR(100)\n\nDECLARE cc CURSOR FOR\nSELECT col1, col2\nFROM table1\n\nOPEN cc\n\nFETCH NEXT FROM cc INTO @col1_value, @col2_value\n\nWHILE @@FETCH_STATUS=0\nBEGIN\n\nINSERT INTO table2 (column1, column2)\nVALUES @col1_value, @col2_value\n\nEND\n\nCLOSE cc\nDEALLOCATE cc\n--------------------------
901810
Assuming you are using the DATE column type to store your dates, your SQL would be something like this:\n\nSELECT DISTINCT (MONTH(datecolumn) AS mymonth) FROM table ORDER BY mymonth ASC\n\nWhich should return only those months that are in the database.\n\nThen your loop would be:\n\nwhile($row = mysql_fetch_array($rs)) {\necho "<option value=&#92;"$row[mymonth]&#92;"> $row[mymonth] </option>"&#92;n;\n}
978704
You use limit in conjunction with 1 or 2 numbers. If you use 1 number like this:\n\nselect * from myTable limit 5;\n\nthen MySQL will grab the first 5 results from the table. However, if you use if like this:\n\nselect * from myTable limit 5,5;\n\nthen MySQL will grab 5 results, starting from record number 5. So it's\n\nlimit [startPos], [numberOfRecords]\n\nEnjoy -
254134
I believe Access SQL supports the TOP keyword as below.  This will allow you to easily limit the number of records.\n\nSelect TOP field1, field2, field3\nfrom mytable1 m1 left join mytable2 m2\n on m1.field1 = m2.field4\nwhere field1 = 'value'
719576
One could use subqueries to solve this problem. If you are using SQL, u could try the following :- \n\nSELECT col1 from TABLE_A where col1 NOT IN (SELECT col2 from TABLE_B)\n\nNote - make sure col1 and col2 are compatible data types.
1123026
Go to Avery.com. They might have index cards there on 8 1/2 x 11 sheets that are preforarated. If they do, get those and do a data merge using your word processing software. If you have it in a database, you should also be able to do a fairly simple data merge as well. Avery is good because Word matches the templates with the Avery number.
254673
The best way to learn SQL is by using it. The four basic things you need to know are Select, Insert, Update, and Delete. \n\nSELECT [columns to select] FROM [table] [where] [order]\n\nINSERT INTO [table] ([names of fields to insert]) VALUES ([values to insert into respective fields])\n\nUPDATE [table] SET [field name 1]=[value 1], [field name 1]=[value 1] [where]\n\nDELETE FROM [table] [where]\n\n\n[table]-> the table you want to modify\n[field or column name]-> the column in the table you want to modify\n[where]-> tell which rows of the table to modify. Usually looks like "WHERE ID=1" or "WHERE ID like '%1%'" or "WHERE ID IN (1,2,3,4,5)"\n[order]-> the order by clause tells how the values should be ordered. "ORDER BY Create_Date" or "ORDER BY Create_Date DESC"\n\nThat should get you started. Then look at Joins, nesting, etc. Good luck!!
789826
Your probably would have to have SQL, but even that would not be enough. You'd need a log viewer as well.