|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2137
|
|
[SA 9.0.166 Pro] - Snippets + caret misplacements |
|
The pipe (|) in a snippet should mark the position the caret should end up when the text is inserted into the editor. I get random misplacements based on where the | is in the snippet. Examples follow:
#1 Snippet:
|
|
-- change tracking initial load
DECLARE @datum_tol SMALLDATETIME = ? --GETDATE()
-- ,@last_sync_version BIGINT = 0
-- ,@min_valid_version BIGINT = CHANGE_TRACKING_MIN_VALID_VERSION(OBJECT_ID('$OBJECT(TABLE)$'))
-- ,@current_version BIGINT = ? -- CHANGE_TRACKING_CURRENT_VERSION()
;
SELECT
d.$COLUMNS(vertical)$
FROM
$OBJECT(TABLE)$| AS d
WHERE 1 = 1
AND (@datum_tol <= d.datum_tol OR d.datum_ig IS NULL OR (d.datum_tol <= @datum_tol AND @datum_tol <= d.datum_ig))
;
|
#1 Result: the caret is where it should be (see |)
|
|
-- change tracking initial load
DECLARE @datum_tol smalldatetime = ? --GETDATE()
-- ,@last_sync_version BIGINT = 0
-- ,@min_valid_version BIGINT = CHANGE_TRACKING_MIN_VALID_VERSION(OBJECT_ID('dbo.adatgyujtok'))
-- ,@current_version BIGINT = ? -- CHANGE_TRACKING_CURRENT_VERSION()
;
SELECT
d.id_adatgyujto
,d.fszg_id
,d.gkt_datum_tol
,d.datum_tol
,d.datum_ig
,d.id_adatgyujto_tipus
,d.adatgyujto_ertek
FROM
dbo.adatgyujtok| AS d
WHERE 1 = 1
AND (@datum_tol <= d.datum_tol OR d.datum_ig IS NULL OR (d.datum_tol <= @datum_tol AND @datum_tol <= d.datum_ig))
;
|
#2 Snippet:
|
|
-- change tracking initial load
DECLARE @datum_tol SMALLDATETIME = ?| --GETDATE()
-- ,@last_sync_version BIGINT = 0
-- ,@min_valid_version BIGINT = CHANGE_TRACKING_MIN_VALID_VERSION(OBJECT_ID('$OBJECT(TABLE)$'))
-- ,@current_version BIGINT = ? -- CHANGE_TRACKING_CURRENT_VERSION()
;
SELECT
d.$COLUMNS(vertical)$
FROM
$OBJECT(TABLE)$ AS d
WHERE 1 = 1
AND (@datum_tol <= d.datum_tol OR d.datum_ig IS NULL OR (d.datum_tol <= @datum_tol AND @datum_tol <= d.datum_ig))
;
|
#2 Result: the caret is put at the end of the line, after the comment
|
|
-- change tracking initial load
DECLARE @datum_tol smalldatetime = ? --GETDATE()|
-- ,@last_sync_version BIGINT = 0
-- ,@min_valid_version BIGINT = CHANGE_TRACKING_MIN_VALID_VERSION(OBJECT_ID('dbo.adatgyujtok'))
-- ,@current_version BIGINT = ? -- CHANGE_TRACKING_CURRENT_VERSION()
;
SELECT
d.id_adatgyujto
,d.fszg_id
,d.gkt_datum_tol
,d.datum_tol
,d.datum_ig
,d.id_adatgyujto_tipus
,d.adatgyujto_ertek
FROM
dbo.adatgyujtok AS d
WHERE 1 = 1
AND (@datum_tol <= d.datum_tol OR d.datum_ig IS NULL OR (d.datum_tol <= @datum_tol AND @datum_tol <= d.datum_ig))
;
|
#3 Snippet:
|
|
-- change tracking initial load
DECLARE @datum_tol SMALLDATETIME = ? --GETDATE()
-- ,@last_sync_version BIGINT = 0
-- ,@min_valid_version BIGINT = CHANGE_TRACKING_MIN_VALID_VERSION(OBJECT_ID('$OBJECT(TABLE)$'))
-- ,@current_version BIGINT = ? -- CHANGE_TRACKING_CURRENT_VERSION()
;
SELECT
d.$COLUMNS(vertical)$
FROM
$OBJECT(TABLE)$ AS |d
WHERE 1 = 1
AND (@datum_tol <= d.datum_tol OR d.datum_ig IS NULL OR (d.datum_tol <= @datum_tol AND @datum_tol <= d.datum_ig))
;
|
#3 Result: the caret got lost somewhere between R and E in WHERE
|
|
-- change tracking initial load
DECLARE @datum_tol smalldatetime = ? --GETDATE()
-- ,@last_sync_version BIGINT = 0
-- ,@min_valid_version BIGINT = CHANGE_TRACKING_MIN_VALID_VERSION(OBJECT_ID('dbo.adatgyujtok'))
-- ,@current_version BIGINT = ? -- CHANGE_TRACKING_CURRENT_VERSION()
;
SELECT
d.id_adatgyujto
,d.fszg_id
,d.gkt_datum_tol
,d.datum_tol
,d.datum_ig
,d.id_adatgyujto_tipus
,d.adatgyujto_ertek
FROM
dbo.adatgyujtok AS d
WHER|E 1 = 1
AND (@datum_tol <= d.datum_tol OR d.datum_ig IS NULL OR (d.datum_tol <= @datum_tol AND @datum_tol <= d.datum_ig))
;
|
|
|
Sat Oct 22, 2016 3:47 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
|
|
|