11,344 reputation
11845
bio website
location Munich
age
visits member for 3 years, 3 months
seen 19 mins ago

Jul
3
comment Bulk update of all columns
The "dummy select" is not necessary in Postgres. You can use a values clause wherever you can use a table.
Jul
3
comment Bulk update of all columns
See here: stackoverflow.com/questions/1109061/…
Jul
3
comment Multi-row INSERT rejected?
Which version of SQL Server are you using? I think the "multi-row" insert was only introduced in 2008.
Jul
2
comment What are the valid formats of a PostgreSQL schema name?
If you always quote identifiers both system behave absolutely identical. If you never quote identifiers both systems behave identical as well. Mixing unquoted and quoted identifiers is the worst choice you can make and both manuals rightfully discourage that. In my company using quoted identifiers is considered a bug in the SQL code.
Jul
2
comment What are the valid formats of a PostgreSQL schema name?
Yes, but then the table is named "TBLUSER" and not TBLUSER. Those are two different names. Using quoted identifier is not really recommended, btw. From the Postgres manual "If you want to write portable applications you are advised to always quote a particular name or never quote it" and from the Oracle manual "Oracle does not recommend using quoted identifiers for database object names"
Jul
2
comment What are the valid formats of a PostgreSQL schema name?
If you run create table TBLUSER (...) then there is a table named tbluser. sqlfiddle.com/#!12/05f31/2 It's all about the quoting.
Jul
2
comment What are the valid formats of a PostgreSQL schema name?
"if you run SELECT * FROM TBLUSER when tbluser exists, the effect is the same as running SELECT * FROM tbluser" - and that's precisely what the SQL standard requires. Encoding and collation are irrelevant for object identifiers (at least according to the standard - not according to Microsoft)
Jul
2
comment What are the valid formats of a PostgreSQL schema name?
That seems to be a bug in SQLFiddle. It works as expected with my local 9.2.4 installaion.
Jul
2
comment What are the valid formats of a PostgreSQL schema name?
As long as you do not use quotes, SELECT * from TBLUSER will work just fine. The SQL standard requires quoted identifiers to be case-sensitive. And Oracle works the same way: create table "FooBar" (...) will require a select * from "FooBar" as well. The only way Postgres deviates from the standard is that names are folded to lowercase instead of uppercase. Oracle example: sqlfiddle.com/#!4/e4f71/1 Postgres example: sqlfiddle.com/#!12/e4f71/1
Jul
2
comment What are the valid formats of a PostgreSQL schema name?
Those are "some strange rules" invented by Postgres. It's the SQL standard which defines these requirements.
Jul
2
comment boolean purpose column char(0) or tinyint(1)
tinyint(1) will happily store 42 as well. The (1) does not limit the range of possible values.
Jul
1
comment How do I select items from a table where a single column must contain two (or more) values?
search for "relational division".
Jun
28
comment Does this error message indicate a SQL injection vulnerability?
You haven't shown us any SQL.
Jun
26
comment Minimizing Indexed Reads with Complex Criteria
Is id (the data type) a domain you defined?
Jun
25
comment Wrong return results
It's good that you tried to post sample data - but this is formatted in a way that it's completely unreadable. Please fix this.
Jun
25
comment How to limit select output from sqlplus?
I don't think there is such an option.
Jun
25
comment What will the sql statement “DELETE FROM sales” do?
@facebook-100005613813158: no. If it has been committed it can't be rolled back.
Jun
24
comment How can I write windowing query which sums a column to create discrete buckets?
The SQL standard defines a width_bucket() window function if I'm not mistaken. Does SQL Server have that?
Jun
22
comment Migrating Oracle packages to SqlServer
When migrating the triggers, don't forget that SQL Server doesn't have row level triggers, only statement level triggers.
Jun
21
comment Changing the representation of NULLs in pg_dump plaintext output
Did you check the tools in the Postgres wiki: wiki.postgresql.org/wiki/… some of them can easily export text files where you can configure NULL representaion.