SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
False error highlighted

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
False error highlighted
Author Message
judahr



Joined: 09 Mar 2007
Posts: 319
Country: United States

Post False error highlighted Reply with quote
v 4.8.29. Last line is highlighted, yet SQL parses it fine:

CREATE TABLE #rand
(
k1 INT IDENTITY,
c1 FLOAT DEFAULT(
(
CASE (CAST(RAND() + .5 AS INT) * -1)
WHEN 0 THEN 1
ELSE -1
END
) * (CONVERT(INT, RAND() * 100000) % 10000) * RAND() * 1000000
)
)



INSERT #rand DEFAULT VALUES
Fri Jan 15, 2010 5:08 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Hi,

The code syntax validation is done by SQL Server. SQL Assistant simply displays the returned errors.

I pasted your code as is to the SQL Analyzer,, and the returned error is
"Msg 208, Level 16, State 1, Invalid object name '#rand'."


This is a valid error returned by SQL Server. At the time of code validation the referenced object doesn't exist in the database, and as a result, the INSERT cannot be validated.
Fri Jan 15, 2010 6:21 pm View user's profile Send private message
judahr



Joined: 09 Mar 2007
Posts: 319
Country: United States

Post Reply with quote
If you include the Create Table statement above it, it returns an error? I run Parse on the entire Create Table to Insert in SSMS and no error occurs. Is the software attempting to parse the input separate from the rest of the window?
Fri Jan 15, 2010 6:28 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
SQL Assistant isn't parsing this text, other then looking for batch separators; it is sending the entire text as is to the SQL Server for execution in NOEXEC mode and the errors are coming from SQL Server. For more info please see http://msdn.microsoft.com/en-us/library/ms188394.aspx
Sat Jan 16, 2010 12:55 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.