Valence version 6.3.20240821.0?
I enter this SQL into the NAB Data Source editor:
with
fakeSubdivisions (subdivcode, subdivname) AS (
VALUES
('001', 'Subdivision 001'),
('002', 'Subdivision 002'),
('003', 'Subdivision 003'),
('004', 'Subdivision 004'),
('005', 'Subdivision 005'),
('006', 'Subdivision 006')
)
SELECT *
FROM fakeSubdivisions
It transforms it into this:
WITH fakesubdivisions(subdivcode, subdivname) AS (
SELECT
'001',
'Subdivision 001',
'002',
'Subdivision 002',
'003',
'Subdivision 003',
'004',
'Subdivision 004',
'005',
'Subdivision 005',
'006',
'Subdivision 006'
)
SELECT
*
FROM
fakesubdivisions
?
There's other ways I can stub out some fake data, but a quick VALUES statement would be quite handy sometimes.
As a side note, if you enter just the VALUES statement without the CTE, the formatter gets stuck trying to add aliases to the columns.
I enter this SQL into the NAB Data Source editor:
with
fakeSubdivisions (subdivcode, subdivname) AS (
VALUES
('001', 'Subdivision 001'),
('002', 'Subdivision 002'),
('003', 'Subdivision 003'),
('004', 'Subdivision 004'),
('005', 'Subdivision 005'),
('006', 'Subdivision 006')
)
SELECT *
FROM fakeSubdivisions
It transforms it into this:
WITH fakesubdivisions(subdivcode, subdivname) AS (
SELECT
'001',
'Subdivision 001',
'002',
'Subdivision 002',
'003',
'Subdivision 003',
'004',
'Subdivision 004',
'005',
'Subdivision 005',
'006',
'Subdivision 006'
)
SELECT
*
FROM
fakesubdivisions
?
There's other ways I can stub out some fake data, but a quick VALUES statement would be quite handy sometimes.
As a side note, if you enter just the VALUES statement without the CTE, the formatter gets stuck trying to add aliases to the columns.

Comment