How do you define a blind variable in Oracle?
553332
A bind variable is found in a piece of software that is linked with Oracle software.  A bind variable is a variable that has been passed to the linked software to be uses as part of a SQL expression.  It is usually referenced inside the software with a colon in front - \nupdate apps_users set expired = 'Y' where username = :user_name;
109303
Tom Kyte is a Oracle Guru and has site which you can check for any pl-sql questions - http://asktom.oracle.com/pls/ask/f?p=4950:1:\nAlso he has some books published regarding pl-sql which I have and are highly useful. Oracle has online documentation which is completely searchable and downloadable - http://www.oracle.com/pls/db92/db92.homepage \nThis has lot of details regarding commands with examples.\nFor sample code check this out -\nhttp://www.oracle.com/technology/sample_code/tech/pl_sql/index.html\n\nHope this gets you going. Let me know if you need more help. \n\nGood Luck !!
253055
Off the top of my head, don't hate me if there are errors...\n\nclass MyVar\n{\npublic:\n  int a;\n  MyVar ( MyVar& src )\n  { a = src.a; }\n}\n\n...\nMyVar p;\np.a = 5;\nMyVar q(p);\n// q.a==5 is true
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
911738
There is a site called tahiti.oracle.com.\nThis site gives complete oracle documentation and is sponsored by Oracle.\nI think you will get that information on that site in detail.\nSo, try your luck.
565802
If you use INSERT INTO and do not set a value for the description feild the default "NO DESCRIPTION" that you set will appear in the column.\n\nYes, as the first person said, you can't use INSERT INTO and set the value of description to NULL because you have set the column to not allow NULL
1007349
add a hidden field\n<input type="hidden" name="num_inputs" value="how_many_inputs_you_have">\n\nthen when submitted\n$i = 1;\n$sSql = "INSERT INTO table (name, age) VALUES";\nwhile ($i < $num_inputs) {\nif ($_POST[$name.$i] != "" && $_POST[$age.$i] != "") {\n$sSql .= "('".$_POST[$name.$i]."' , '".$_POST[$age.$i]."')";\n$i++;\n}\n}\nexecute query here\n\n$name.$i would get evaluated to name1, name2 etc, and if statement checks if both of them are empty. operation .= means "stick whats on the right to whatever was in left variable"
180876
no idea how in your language, but....\n\nin SQL server there is an execute() function that will execute the script, maybe there is one in your language:\n\ndeclare @SQL varchar(2000)\ndeclare @mytable varchar(20)\nset @mytable = "TheTable" \nset @SQL = "Select column from " + @mytable \nexecute (@SQL)\n\nis equivalent to: \nSELECT column from TheTable\n\nthis is sometimes refered to as dynamic SQL since it is not known until runtime
769350
Try\n\nselect count(*) from information_schema.columns\nwhere table_name = '<tablename>'\n\nor\n\nselect count(colid) from syscolumns c join sysobjects o on c.id = o.id\nwhere o.name = '<tablename>'\n\nBoth will work
998788
I've code for this somewhere, - I'll try to find it for you.\n\nThe code below is for a custom function, not t-SQL. Hope this helps.\n***\nSET QUOTED_IDENTIFIER ON \nGO\nSET ANSI_NULLS ON \nGO\n\nALTER       function Num2Words(@s varChar(50), @Desc2Num char(8))\n\nreturns varChar(1024)\nas\nbegin\n/*\n   English words for numbers\n   valType is '' or dollars,Money,$, Percent, %\n   this function will take in some type of value, - and return back\n   the number is english script format, such as:\n    $4.22  = Four dollars 22/100 cents\n   given the 2nd parameter of '' or '$' or '%' it will be used\n   to fomat the number in question.\n  \n   if in fact, the number has a $ or a %, then that format will come\n   thru with the number. If the value is not numeric, - then the original\n   value will just be returned.\n*/\ndeclare @a char(1), @b char(1), @c char(1), @i int, @j int, @result varChar(1024), @orlen int\ndeclare @cents int, @negative varChar(9)\n\nif @s is null begin return '0 dollars and no cents' end\nset @Desc2Num = lower(@Desc2Num)\nset @Desc2Num = case rtrim(@Desc2Num)\n when 'money' then ' dollars'\n when 'dollars' then ' dollars'\n when 'dollar' then ' dollars'\n when '$' then ' dollars'\n when 'percent' then ' percent'\n when '%' then ' percent'\n when '' then ' '\n else ' '\n end\n\nset @s = replace(@s,',','')\n\nif charindex('$',@s) > 0\n begin\n  set @Desc2Num = ' dollars'\n  set @s = replace(@s,'$','')\n end\nif charindex('%',@s) > 0\n begin\n  set @Desc2Num = ' percent'\n  set @s = replace(@s,'%','')\n end\nset @s = replace(@s,' ','')\n\nif isnumeric(@s) <> 1 begin return @s end\nset @negative = ''\nif cast(@s as dec(10,2)) < 0\n begin\n  set @negative = 'Negative '\n  set @s = replace(@s,'-','')\n end\n\nif @Desc2Num = ' percent' and cast(@s as dec(10,2)) < 1\n begin\n set @s = cast(cast(@s as dec(10,2)) * 100 as varChar(50))\n set @s = left(@s,len(@s) - 3)\n end\nif @Desc2Num <> ' percent'\n begin\n set @cents = (cast(@s as dec(10,2)) - ROUND(cast(@s as dec(10,2)), 0, 1)) * 100\n set @s = cast(ROUND(cast(@s as dec(10,2)), 0, 1) as varChar(50))\n set @s = left(@s,len(@s) - 3)\n end\n\nset @orlen=len(@s)\nif len(@s) % 3>0\n set @s=' '+@S\nif len(@s) % 3>0\n set @s=' '+@S\nset @i=1 set @result=''\nif len(@s)=1 AND @s='0' \n set @result='zero'\n\nwhile @i<=len(@s)\n begin\n set @j=len(@s)-@i+1\n set @a=substring(@s,@j,1)\n set @b=substring(@s,@j-1,1)\n set @c=substring(@s,@j-2,1)\n if isnumeric(@a)=1\n  begin\n  set @result=case \n   when (@i-1=3) AND (@c+@b+@a<>'000') then 'thousand'\n   when (@i-1=6) AND (@c+@b+@a<>'000')  then 'million'\n   when (@i-1=9) AND (@c+@b+@a<>'000')  then 'billion'\n   when (@i-1=12) AND (@c+@b+@a<>'000')  then 'trillion'\n   when (@i-1=15) AND (@c+@b+@a<>'000')  then 'quadrillion'\n   when (@i-1=18) AND (@c+@b+@a<>'000')  then 'quintillion'\n   when (@i-1=21) AND (@c+@b+@a<>'000')  then 'sextillion'\n   when (@i-1=24) AND (@c+@b+@a<>'000')  then 'septillion'\n   when (@i-1=27) AND (@c+@b+@a<>'000')  then 'octillion'\n   when (@i-1=30)  AND (@c+@b+@a<>'000') then 'nonillion'\n   when (@i-1=33) AND (@c+@b+@a<>'000')  then 'decillion'\n   when (@i-1=36) AND (@c+@b+@a<>'000')  then 'undecillion'\n   when (@i-1=39) AND (@c+@b+@a<>'000')  then 'duodecillion'\n   when (@i-1=42) AND (@c+@b+@a<>'000')  then 'trede
312052
You could use "select * from table_name where char_field_name like '%'".\n\nBut it would be better to remove the where clause, as this will save up some system resource during the SQL execution.
78058
CREATE TRIGGER tu_table \nFOR UPDATE\nAS\nBEGIN\n  \nEND
601218
stmt = connection.createStatement();\n\n// check from User_tables data dictionary table \n//to see if the table exists.\nrset = stmt.executeQuery(" SELECT Table_Name FROM\n                           User_Tables "+ \n                         " WHERE Table_Name='XYZ'");    \n\n// if the resultset of the above query \n//does not have any record, \n//it means table is not existing.\nif (!rset.next())\n{\n          //operation to do if table doesn't exist\n}\nelse\n{\n          //operation to do if table exists\n}
840316
I have used SELECT IF EXISTS in my SQL statement before, but I couldn't find a good example.\n\nSee the souce page below that checks for rs.EOF to see if there are any records returned after a regular SELECT statement.\n\nGood Luck!
1122479
Firstly off 'now()' isn't a function call, it's a string therefore you CANNOT use it for a default value.\n\nYou have to insert a value upon insertion to that table withe the now() string.\n\nLook Carefully about the datatypes of different Time Structures\n==============================\n\n--\n-- Lets use the test Database\n--\nmysql> use test;\nDatabase changed\n\n--\n-- Lets create a Table (temp for this example)\n--\nmysql> create table a (\n    -> x date,\n    -> y timestamp,\n    -> z datetime);\nQuery OK, 0 rows affected (0.02 sec)\n\n--\n-- Lets insert only at column x so rest are default\n--\nmysql> insert into a(x) values(now());\nQuery OK, 1 row affected (0.00 sec)\n\n--\n-- Lets insert only at column y so rest are default\n--\nmysql> insert into a(y) values(now());\nQuery OK, 1 row affected (0.00 sec)\n\n--\n-- Lets insert only at column z so rest are default\n--\nmysql> insert into a(z) values(now());\nQuery OK, 1 row affected (0.00 sec)\n\n--\n-- Lets Select everything in that table\n--\nmysql> select * from a;\n+------------+---------------------+---------------------+\n| x          | y                   | z                   |\n+------------+---------------------+---------------------+\n| 2006-06-15 | 2006-06-15 00:42:17 | NULL                |\n| NULL       | 2006-06-15 00:42:23 | NULL                |\n| NULL       | 2006-06-15 00:42:26 | 2006-06-15 00:42:26 |\n+------------+---------------------+---------------------+\n3 rows in set (0.00 sec)\n==============================\n\nNow notice what happened... TIMESTAMP by default updates the current time...,  The others are null. So change your datatype to be TIMESTAMP if you care so much about the default value.
357099
void\nmain()\n{\n   if (printf("morgan&#92;n")) {\n   }\n}\n\n\nNo semi's -- no problem.
379406
There are many (i am referring to SQL STAR PLUS With Oracle 9i)\n\n1.UserName: scott \nPassword:tiger\n\n2.Username:system\nPassword :manager