 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
judahr
Joined: 09 Mar 2007 Posts: 319 Country: United States |
|
False error highlighted |
|
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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 |
|
 |
judahr
Joined: 09 Mar 2007 Posts: 319 Country: United States |
|
|
|
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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 |
|
 |
|
|
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
|
|
|