Questions tagged [ansi-sql-92]
The ansi-sql-92 tag has no usage guidance.
35
questions
1841
votes
27
answers
3.4m
views
Insert into ... values ( SELECT ... FROM ... )
I am trying to INSERT INTO a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to remember the correct syntax for the ...
11
votes
5
answers
40k
views
Pattern matching SQL on first 5 characters
I'm thinking about a SQL query that returns me all entries from a column whose first 5 characters match. Any ideas?
I'm thinking about entries where ANY first 5 characters match, not specific ones. E....
6
votes
2
answers
520
views
Does the SQL type TIME WITH TIMEZONE make sense?
While doing the mapping of some database columns into Java classes I stumbled onto this obscure SQL-92 Standard type (implemented by PostgreSQL, H2, and HyperSQL afaik). I haven't ever used it, but I ...
4
votes
1
answer
889
views
Is CURRENT_TIMESTAMP a function in ANSI SQL?
I was using the bigquery function current_timestamp() when i discovered that you can use it without parenthesis if you want. Since it is a function, i would advocate for parenthesis, but what i find ...
4
votes
2
answers
3k
views
ANSI SQL standard for ORACLE MINUS keyword
I have Query which i want to ANSI SQL standard compatible . In this
oracle query MINUS key work is used and i want to ANSI SQL which is
placed for MINUS keyword
SELECT 'F' selected,
UPPER ...
4
votes
2
answers
3k
views
Does Oracle 10g comply with the ANSI SQL-1992 substring function standard?
According to the ANSI SQL-1992 standard, page 132, this is the syntax for the ANSI substring function:
<character substring function> ::=
SUBSTRING <left paren> <character value ...
3
votes
1
answer
2k
views
How to Select value By SuiteQL That I can filter Multiple Select Field
I had one simple table ItemMapping, 2 Field, one Field is single Item List Field SingleSelectField With value "A",
Other for Multiple Item List Field MultiSelectField with Value ("B&...
3
votes
2
answers
4k
views
ANSI 92 Recursive SQL Statement required
I am translating SQL Server SQL Statements into their ANSI generic equivalent at present, and am stuck with a recursive statement using a WITH statement.
For the sake of concentrating on the issue, I'...
3
votes
1
answer
162
views
Which databases support BATCH INSERT syntax?
I know, MySQL supports BATCH INSERT syntax like:
INSERT INTO `table_1` values(1, 2, 3), (3, 4, 5), (5, 6, 7);
Is this syntax included in SQL-92 format? If not, witch data bases support this syntax?
3
votes
2
answers
2k
views
Get message in MQ QUEUE with JMSTIMESTAMP
I have a problem when i try to get message with put date/time beetween two dates (beginDate and endDate). Here is my query receiveSelected("JMSTimestamp BETWEEN " + pBeginDate + "AND " + pEndDate). A ...
2
votes
2
answers
33
views
Select a row by max(year) and group by name, but also include other values in the result set [duplicate]
i have a problem with a specific selection in a table. In would like to find all Persons grouped by Name with the max year. But I need also the other columns, for a later join, in the result set.
...
2
votes
1
answer
613
views
ANSI 92 Date Difference not working in MySQL
I'm, trying to calculate the number of days between two dates using ANSI SQL standard. But I'm missing something as this statement returns NULL in MySQL.
SELECT EXTRACT(DAY FROM DATE('2009-01-25') -...
2
votes
1
answer
57
views
Requesting help on how to group the counts of multiple conditions in one query
I need to count the number of subscribers whose effective dates precede the end dates of months and whose termination dates proceed the first date months within a given timeframe. I then need to group ...
2
votes
1
answer
330
views
Escaping colon in JMS Selector - Apache ActiveMQ Apollo
I am using Apache Apollo -1.1 as my JMS broker.
Within that, I am trying to use a selector on a JMS Header, which contains colon in the value. The JMS header is as follows:
SYMBOL=USDGBP17MAYFUT::...
2
votes
0
answers
502
views
IN and ANY not working as expected in H2 (with examples)
EDIT: This appears to be a bug in H2 version 1.4.190. I have updated my post below. The problem does not happen in version 1.3.176 or 1.4.191.
(Suggestions for optimizing the queries also welcome)
...
2
votes
0
answers
204
views
Mysql dump to SQL-92
I have a http://www.product-open-data.com/download/ POD Database - dump and it's MySQL dump.
What I need for Virtuoso Sponger is SQL-92 dump is there any way to convert it automaticaly to SQL-92.
It ...
1
vote
2
answers
2k
views
Is N'some string here' ANSI SQL?
We know that in order to qualify a string literal as Unicode, we need to prefix it with N in Transact-SQL. My question is if this is part any standard such as ANSI SQL. Will other database platforms ...
1
vote
1
answer
634
views
SWITCH function doesn't work in access sql
With the code below, I'm trying to update table K_tables. The column ColumnType doesn't have zero or null values in it, but after I run this script I get a lot of null valued rows, and the number of ...
1
vote
2
answers
519
views
Oracle Left outer join
SELECT
a,
last_note_user,
c,
d,
iso_src
FROM
X
CROSS JOIN Y
CROSS JOIN Z
LEFT OUTER JOIN W
ON W.last_note_user = Z.userid
AND W.user_ten = Y....
1
vote
2
answers
304
views
How to get the month of a date with two digits in SQL-92?
I have a date format cell in my table, of which I need to extract the month in two digits. This means that 6-4-2021 should return 04. The main problem is that this needs to be in the syntax of SQL-92. ...
1
vote
1
answer
45
views
Search pattern % doesnt work in access
In the table trans I have two such values t_bar and t_pro, and I want to find such values in the table. that start with "t_" So I`m using such query:
select trim(col)
from trans
where trim(col) like "...
1
vote
1
answer
73
views
CHECK constraint evaluation in SQL 92
when is check constraint evaluated as per SQL 92 standards?
create table a (
val INT
);
create table b (
f CHECK ( f in (SELECT val from a))
);
a) Is CHECK with sub-query allowed as per SQL-92 ...
1
vote
2
answers
119
views
replacing TSQL NOT EXISTS in SQL-92
I am have following code which works well in TSQL:
BEGIN
IF NOT EXISTS (select * from tblDCUSTOM where id = 'All Customers')
BEGIN
INSERT INTO tblDCUSTOM
(ID
,Name
,English ...
1
vote
0
answers
37
views
How use arithmetic operators in Orchard Core SQL Query select clause
I have tried to run this SQL-92 query:
select (Rating * 100.0) as ratingCalc from BlogPostStatsPartIndex;
on "Run SQL Query" page in admin but it has failed with error:
"Syntax error, ...
1
vote
2
answers
127
views
a query from SQL/92 doesn't work in later versions
I have a sql query like this:
select tt.product_name, tt.countt
from (select ofr.product_name as product_name, count(*) as countt
from offers ofr
group by ofr.product_name) as tt
where 12 = (select ...
1
vote
1
answer
238
views
How to join table without using JOIN or any alias? SQL Server
I was wondering is it possible to do a join on two tables without using JOIN or any alias for the tables?
For example I usually do:
SELECT *
FROM table1 a
LEFT JOIN table2 b ON a.column = b.column
...
1
vote
2
answers
489
views
Copying an entire, large OpenEdge table
I need to find the fastest way of reading a large OpenEdge table (100 million rows plus), preferably programmatically (in c#) and outside of ETL tools such as SSIS or staging formats such as text file ...
1
vote
3
answers
449
views
Update Table 1 memo field with values from table 2 in a one-to-many relationship
I have 2 tables I would like to update one column in table 1 with values from table 2 where id=id. However table 2 has many rows matching table 1 and all rows of table 2 would need to be updated to 1 ...
1
vote
0
answers
65
views
Apache Derby (JavaDB) concatenation regarding SQL92T (Prepend String to existing dataset)
I am new with JavbDB and need to simply append a string to a existing database cell like this:
public boolean updateChildNodes(String filePath, String parentPath)
throws SQLException {
//...
1
vote
0
answers
146
views
How to pass cyrillic symbols in CMIS query?
I'm using CMIS query language to query information from my Alfresco server. Some of content's properties have Cyrillic names. When I try to insert this names in WHERE clause, I get an error:
[...
1
vote
1
answer
52
views
Cant use insert with subquery
This problem is really weird and I believe related with Access itself.
I`m trying to insert this way (really simplified version, but anyway the error is the same):
INSERT INTO phones(a, b)
select * ...
1
vote
1
answer
130
views
SQL WHERE IN Clause Returning no Rows when comparing with nested functions (Crystal Reports Command with SQL-92 DB)
I am looking to delimit a Crystal Reports variable in my SQL query on behalf of the user so that they can provide input in the format of "customer1, customer2, customer 3" vs. "'customer1', 'customer2'...
1
vote
1
answer
3k
views
Access: How to alter column to counter with existing rows in table?
I know that it can't be easily solved by this statement:
ALTER TABLE BLOCK ALTER COLUMN block_id COUNTER(5000,1) PRIMARY KEY;
-- I get here error saying about wrong column type
Because of 2 reason:...
1
vote
0
answers
233
views
Execute sql 92 query on message queue
I want to retrieve messages sent in a queue between two PutTime. I try with this query:
TextMessage vMessage = (TextMessage)
super.receiveSelected("Root.MQMD.PutDate = '"+pPutDate+"'
...
0
votes
1
answer
22
views
SQL Auto assign a number to duplicating values that resets after a change in the values WITHOUT using ROW_NUMBER or Partition BY?
I would like to create a "count" or "order" field that would auto-increment, but restart after every change in a different field? In the table below, the "Order" field ...