SQL: Bucketing values?
926728
First you would have to create an extra column to have the range in it:\n\nName IQ Range\n---------------------\nJohn 110 100-130 \nRick 120 100-130 \nMary 140 130-160 \nJean 170 160-220 \nToby 210 160-220 \n\nTo put the data in that new columns you can use UPDATE statements like this:\n\nUPDATE Table SET Range = '100-130' WHERE IQ >= 100 AND IQ < 130\n\nThen you can do a select statement with a group by to get the results you want:\n\nSELECT  Range, Count(*) FROM Table\nGROUP BY Range
1056758
You could add a temporary number column and use autofill to fill it down to the row which contains the last of your name data.\n\nSelect both this column and your name column and sort the name column alphabetically (ascending). Delete the blank rows (which should now be at the top) and then re-sort (ascending) by your temporary number column.\n\nThen delete the temporary number column.
896120
and also u have to give the all the fileds. \nint database there r 3 files, like Name, Age, Date, Table name is "details"\n\ninsert into details values ('Natarajan',23,'29-01-1983');\n\nthis is the correct way. don't mis any field...\n\nif u want to insert only some fileds.\n\ninsert into details(name,age) values('Natarajan',22);\n\nthats it...
61405
Convert the parameters in your "where" clause to the same case, upper or lower.\n\nselect * from tbl \nwhere upper(fielda) = upper(searchparameter)\n\nI've not worked with Access (.mdb) dbs much, but there may also be an Access configuration to disregard Case.  (At least that is an option in MS Sql Server.)
568859
select name, count(rowid) from simple_table\ngroup by name\nhaving count(rowid) > 1\n\nhope it helps!
33262
Yes. Each column should have a condition and mutiple values can be given in IN operator.\n\nFor ex The above one can be written like this\n\nSELECT *\nFROM TABLE_NAME\nWHERE COLUMN1 IN (col1val1,col1val2)\nAND COLUMN2 IN (col2val1,col2val2)\nAND  COLUMN3 IN (col3val1,col3val2,col3val3)
7772
You can.  Use the mapping (x, y, z) -> x.  Of course, that is a many-to-one mapping, and kind of useless.
692198
when writting querires try using the design wizard, you could add the colums of each table and then add your criteria.\n\ne-mail me a bit more in depth of what you want to do and ill try and help you in more detail
923590
If it's a standard .sql file, you should be able to split it. This would break transactions, but depending on the statements in the file this may not be an issue.
426826
This is tricky.  You really need a new field that will tie the correct entry and exit records together.  The only way I can see it is to add a new numeric field (call it entry_exit_id or something).  Then you'd need some code that sorts your data by persons name, entry time.  Then it would loop through each record and assign a unique counter number to each entry/exit pair that goes together.\n\nAfter that - you'd be able to use Group By to group on the name and entry_exit_id. Then you could do the math.
684775
SQL has got a convert(datatype(size,precision),value) method\n eg:convert(decimal(18,2),12345.6789) as no_with_10.2_precisoin\n\nu should be able to use it to convert ur string to small int too. but make sure u validate the entry before sending to sql (avoid a typecaste error)
861304
Add LIMIT 10 to the end of your sql command\n\na few example could include\n\nSELECT  * FROM table LIMIT 0 , 10\n\nor if you want only unique values to show use \n\nSELECT DISTINCT  field FROM table LIMIT 0 , 10\n\nor unique from all\n\nSELECT DISTINCT  *  FROM table LIMIT 0 , 10\n\nPm/IM me on yahoo:  Supermrnice if you would like a very useful tip i use
1184103
select fld*10+sld*20+tld*30 from table where (fld*10+sld*20+tld*30)=230
840445
From what it looks like you want to do, I don't think you even need the GROUP BY clause. You probably want something like:\n\nSELECT t4_key, year, season, month, day\nFROM rw_top40\nWHERE year = 97 AND season = '2 - summer'\nORDER BY t4_key, year, season, month, day;\n\nAnyway, the GROUP BY clause has to come AFTER the WHERE clause, like this:\n\nSELECT t4_key, count(*)\nFROM rw_top40\nWHERE year = 97\nGROUP BY t4_key
501286
Not completely sure I follow the question.  But if you are trying to store parameters, repeating units, etc.. I would recommend a generic "code" table that can house multiple types of values.  You could have a table with a Type, subtype, values and description that could hold all kinds of values.  \n\nType: Construction\nSubType: tool\nValue: hammer\nDesc: tool to pound on things\n\nnext record\nType: Construction\nSubType: measurement\nValue: inches\nDesc: english measurement\n\nnext record\nType: Construction\nSubType: measurement\nValue: centimeters\nDesc: metric measurement\n\nnext record\nType: Query\nSubType: Parameter\nValue: RunDate\nDesc: Time surrounding query execution\n\n\nAnd so on and so on.....\n\nselect * from code_table where Type = 'Construction'\nand SubType = 'measurement'\n\nIt is easy to replicate, extend and edit.\n\nGood Luck in pursuing your answers.
64537
Here you go:\nhttp://sqlzoo.net/
75210
I'm assuming the data is in ONE table, with columns X, Y respectively, with Y having data that is comma delimited.  If so, then:\n\n1) Create a function that splits delimited data into multiple rows:\n\nCREATE FUNCTION fnUtil_Split(@SplitString varchar(8000), @Delimiter varchar(10))\n-- This function simulates the VB split function and returns a table containing all\n-- of the split values.\n-- Code obtained from http://www.odetocode.com/Code/58.aspx\n\nRETURNS @SplitTable TABLE(\n TableVar  varchar(500)\n   )\nAS\nBEGIN\n-- Helper variables\nDECLARE @FC int\nSET @FC = -1\n\n-- Loop until there is no more\nWHILE (Len(@SplitString) > 0) BEGIN\nSET @FC = CHARINDEX(@Delimiter , @SplitString)\n\nIF (@FC = 0) AND (LEN(@SplitString) > 0) BEGIN\nINSERT INTO @SplitTable VALUES (RTRIM(LTRIM(@SplitString)))\nBREAK\nEND\n\nIF (@FC > 1) BEGIN\nINSERT INTO @SplitTable VALUES (RTRIM(LTRIM(LEFT(@SplitString, @FC - 1))))\nSET @SplitString = RTRIM(LTRIM(RIGHT(@SplitString, (LEN(@SplitString) - @FC))))\nEND ELSE SET @SplitString = RTRIM(LTRIM(RIGHT(@SplitString, (LEN(@SplitString) - @FC))))\nEND\n\nRETURN\nEND\n\n2)  Cross join to combine the delimited data of column Y with the data in column X:\n\nSELECT mytable.X, split_table.delimitedData\nFROM mytable \n       cross join (SELECT TableVar AS delimitedData\n                   FROM dbo.fnUtil_Split(mytable.Y, ',')\n                  )AS split_table\n\nThis should combine column X with the "split" data from column Y.