Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant use values in cte #416

Closed
magiva opened this issue Jan 11, 2024 · 0 comments · Fixed by #430
Closed

cant use values in cte #416

magiva opened this issue Jan 11, 2024 · 0 comments · Fixed by #430

Comments

@magiva
Copy link

magiva commented Jan 11, 2024

if i do this

    SELECT *
    FROM (VALUES
        ('M', 'B', '6152-000358'),
        ('M', 'B', '6152-000530'),
        ('M', 'B', '6152-000531'),
        ('B', 'C', '97048786'),
        ('C', 'D', '35528661'),
        ('A', 'B', '97680998')
    ) AS source_data (Column1, Column2, Column3)

then it shows table data, all good
if i then wrap it into a cte

WITH source_data_cte AS (
    SELECT *
    FROM (VALUES
        ('M', 'B', '6152-000358'),
        ('M', 'B', '6152-000530'),
        ('M', 'B', '6152-000531'),
        ('B', 'C', '97048786'),
        ('C', 'D', '35528661'),
        ('A', 'B', '97680998')
    ) AS source_data (Column1, Column2, Column3)
)

SELECT * 
FROM source_data_cte;

I have 2 issues

  1. i must specify the column names, i cant use select *
  2. if i use a lot of rows (10k+) in the cte, it crashes the whole xrmtoolbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant