cancel
Showing results for 
Search instead for 
Did you mean: 

KX SQL project

Haze
New Contributor

I'm currently trying to complete the KX SQL challenge, and I'm unsure why my defined variable doesn't have the correct sql syntax? Any sort of guidance would be appreciated!

Haze_0-1700666085202.png

Haze_1-1700666105004.png

 

 

 

1 ACCEPTED SOLUTION

gyorokpeter-kx
Contributor
Contributor

The question is asking you to save your SQL code to variable ex1.  What you are doing instead is executing the query and putting the result  into ex1. This is why the second check passes (since the CREATE TABLE was executed) but the first one fails (because the variable doesn't contain the SQL command).

View solution in original post

3 REPLIES 3

megan_mcp
Community Manager Community Manager
Community Manager

Hi @Haze,

Try swapping the end double quotes and the semi colon like so:

...varchar)";

Also, the question only requires you to create the table so the SELECT statement is not necessary.

Let me know if this works,

Megan

gyorokpeter-kx
Contributor
Contributor

The question is asking you to save your SQL code to variable ex1.  What you are doing instead is executing the query and putting the result  into ex1. This is why the second check passes (since the CREATE TABLE was executed) but the first one fails (because the variable doesn't contain the SQL command).

I got it, thanks so much!