Re: [sqlite] Documentation correction

2019-04-16 Thread Don V Nielsen
On the heel of Tom's input is the fragment " then that name always refers
the explicitly declared column". Should that be " then that name always
refers *to* the explicitly declared column"?

On Mon, Apr 15, 2019 at 3:32 PM  wrote:

> Hi, I just wanted to point out a minor discrepancy in the docs below.
>
> https://www.sqlite.org/lang_createtable.html#rowid
>
> where it says:
>
> If a table contains a user defined column named "rowid", "oid" or
> "_rowid_", then that name always refers the explicitly declared column and
> cannot be used to retrieve the integer rowid value.
>
> Shouldn't it say at the end "unless that user defined column is an alias
> for the rowid."
>
> For example, you can retrieve the integer rowid value from a user defined
> column named "rowid" if it defined as the integer primary key:
>
> CREATE TABLE t(rowid integer primary key);
> insert into t values(15);
> select rowid, oid from t;
>
> Results:
> 15|15
>
> Thanks,
> Tom
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Help with sqlite3_value_text

2019-04-16 Thread x
Thanks Keith, that I understand. Thanks also to everyone who contributed to 
this thread. I’ve learned a lot from it.




From: sqlite-users  on behalf of 
Keith Medcalf 
Sent: Monday, April 15, 2019 4:09:02 PM
To: SQLite mailing list
Subject: Re: [sqlite] Help with sqlite3_value_text


sqlite3_value_text and sqlite3_value_bytes will cause the conversion (if 
required) to UTF-8, and then return the data requested.
sqlite3_value_text16 and sqlite3_value_bytes16 will cause the conversion (if 
required) to UTF-16 and then return the data requested.

So if you call sqlite3_value_text AND THEN sqlite3_value_bytes16 your original 
UTF-8 text pointer will be invalid.  (Because the data must be converted to 
UTF-16 so that you can get the bytes count of that, thus the original UTF-8 no 
longer exists).

If you call only "like for like" functions, then the conversion will only be 
carried out the first time it is required and not for the subsequent calls to 
the "other function" that does not require conversion ...

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of x
>Sent: Monday, 15 April, 2019 04:08
>To: SQLite mailing list
>Subject: Re: [sqlite] Help with sqlite3_value_text
>
>>As long as you use _value_bytes after _text you're fine... so if any
>>conversion did take place the value will be right of the last
>returned
>>string type.
>
>JD, Could you explain that to me? I’m not sure why any conversion
>takes place and, on reading the text below, I would’ve thought it
>would be better to call sqlite3_value_bytes first (if it’s called
>“subsequently” the pointer returned by sqlite3_value_text “can be
>invalidated”).
>
>Please pay particular attention to the fact that the pointer returned
>from sqlite3_value_blob(),
>sqlite3_value_text(), or
>sqlite3_value_text16() can
>be invalidated by a subsequent call to
>sqlite3_value_bytes(),
>sqlite3_value_bytes16(),
>sqlite3_value_text(), or
>sqlite3_value_text16().”
>
>
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [EXTERNAL] Intersect and Minus

2019-04-16 Thread Hick Gunter
It would be easier if you were to provide your schema, the text of the query 
and the error message.

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Mohit Mathur
Gesendet: Montag, 15. April 2019 21:31
An: sqlite-users@mailinglists.sqlite.org
Betreff: [EXTERNAL] [sqlite] Intersect and Minus

Hi tech gurus,

I am working on one sqllite query, in which i am doing left outer join between 
two tables and than using intersect and again doing left outer join between two 
other tablescolumns that i am selecting are exactly same in number and 
datatypes.Please let me know why it is throwing error.How intersect works in 
sqllite ,i am well aware of oracle intersectin sqllite is it differnt?

Regards,
Mohit Mathur
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users