This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 200367 - CC doesn't work with use of DECLARE/SET
Summary: CC doesn't work with use of DECLARE/SET
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 7.0.1
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-25 16:42 UTC by athompson
Modified: 2011-09-19 16:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description athompson 2011-07-25 16:42:39 UTC
For example, if you add these lines:


DECLARE @StartDate datetime, @EndDate datetime
SET @StartDate = '2010-01-01'
SET @EndDate = '2012-01-01'

CC breaks throughout the file.  Connecting to SQL server 2005.


Product Version: NetBeans IDE Dev (Build 201107220600)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-383
System: Mac OS X version 10.7 running on x86_64; MacRoman; en_US (nb)
Userdir: /Users/alvin/.netbeans/dev
Comment 1 Jiri Rechtacek 2011-07-29 15:39:24 UTC
Please, describe in detail your problem. Where (on what caret) are you invoking CC. What is your expectation and what returns IDE. I'm sorry I have lack of information what went wrong. Thanks
Comment 2 athompson 2011-08-01 18:23:14 UTC
For example:


DECLARE @StartDate datetime, @EndDate datetime
SET @StartDate = '2010-01-01'
SET @EndDate = '2012-01-01'

-- cursor after 'FROM' below
SELECT * FROM 


Invoking CC after 'FROM' above should supply a list of table names.  It doesn't.
Comment 3 Jiri Rechtacek 2011-08-03 14:37:44 UTC
Thanks, I see the problem now. I'm finding a way how to fix it.
Comment 4 Jiri Rechtacek 2011-08-05 11:41:53 UTC
core-main/rev/1b194784c122
Comment 5 Quality Engineering 2011-08-06 14:00:19 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/1b194784c122
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #200367: CC does not work with use of DECLARE/SET
Comment 6 athompson 2011-08-22 20:45:47 UTC
CC still brakes if you add this line:

SET @PreviousDay = dateAdd(d, -1, @StartDate)

Maybe it's the parentheses?
Comment 7 Jiri Rechtacek 2011-09-12 21:18:29 UTC
core-main/rev/422c72588a6b fixed this problem too.
Comment 8 Quality Engineering 2011-09-13 16:07:31 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/422c72588a6b
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #200367: CC doesn't work with use of LPAREN/RPAREN
Comment 9 athompson 2011-09-19 16:28:19 UTC
Yup, but if you're not too busy CC doesn't work in the COALESCE function.