Comments
Sort by recent activity
Do you have a custom snippets folder?
Yes. It's a shared folder: \\vmware-host\Shared Folders\Snippets
Most of the time I'm working in a VMware Workstation Virtual machine. The snippets folder is a shared folder in the host machine (not the virtual machine). So in SQL Prompt in the VM, I just use \\vmware-host\Shared Folders\Snippets to reference the shared folder.
Where do the snippets not appear? In the snippets manager or just the suggestions box?
The snippets do not appear in both snippets manager and the suggestions box.
/ comments
Do you have a custom snippets folder?
Yes. It's a shared folder: \\vmware-host\Shared Folders\Snippets
Most of the time I'm working in a VMware Workstation Virtual machine. The snippets folder is...
Hi Jessica,
Thanks for your reply. I set the snippet folder from the SQL Prompt Options. I also checked the registry you mentioned, its value is the save as the one I set from the Option UI. The folder IS a bit special. I'm using SSMS with SQL Prompt in a VMware Workstation virtual machine. I shared a folder from the host computer to the guest as z:\scripts. Then in the guest, I use this folder as my Snippet Folder. When I changed the snippet folder to a normal local folder in the virtual machine, it can persist. Could you give me some suggestions?
Thanks. / comments
Hi Jessica,
Thanks for your reply. I set the snippet folder from the SQL Prompt Options. I also checked the registry you mentioned, its value is the save as the one I set from the Option UI. The fo...
Yes it was checked. When I disable the new formatting, I can format the code correctly and it was formatted to: DECLARE @orders TABLE
(
order_id BIGINT NOT NULL
UNIQUE WITH ( IGNORE_DUP_KEY = ON )
);
When I switch back to new formatting, it still format the code as I mentioned before. / comments
Yes it was checked. When I disable the new formatting, I can format the code correctly and it was formatted to:DECLARE @orders TABLE
(
order_id BIGINT NOT NULL
UNIQU...
Hi harryf,
Thanks for taking time to answer my questions. I tried your formatting files. These three formatting files produce the following output. INSERT INTO dbo.dept
(id, name)
VALUES
(1,
N'Administration'
),
(2, N'Sale'),
(3, N'HR');
INSERT INTO dbo.dept
(id, name)
VALUES
(1,
N'Administration'
),
(2, N'Sale'),
(3, N'HR');
INSERT INTO dbo.dept
(
id, name
)
VALUES
(
1,
N'Administration'
),
(
2, N'Sale'
),
(
3, N'HR'
);
Note they are not exactly the same as I requested. The
1, N'Administration'
are always on separate lines. Why they are on separate lines while others are on the same line?
Regards. / comments
Hi harryf,
Thanks for taking time to answer my questions. I tried your formatting files. These three formatting files produce the following output.INSERT INTO dbo.dept
(id, name)
VALUES
(1,...
I hope it can be formatted to this: INSERT INTO dbo.dept
(id, name)
VALUES
(1, N'Administration'),
(2, N'Sale'),
(3, N'HR');
Or at least this: INSERT INTO dbo.dept
(id, name)
VALUES
(1, N'Administration'),
(2, N'Sale'),
(3, N'HR');
or this: INSERT INTO dbo.dept
(
id, name
)
VALUES
(
1, N'Administration'
),
(
2, N'Sale'
),
(
3, N'HR'
);
I didn't test throughly and I just happen to found this issue. Thanks harryf. / comments
I hope it can be formatted to this:INSERT INTO dbo.dept
(id, name)
VALUES
(1, N'Administration'),
(2, N'Sale'),
(3, N'HR');
Or at least this:INSERT INTO dbo.dept
(id, name)
VALUES...
Tdoctor828 wrote:
My thoughts are the same...
The code are much longer now...
How to fix ?
I have no idea. I hope one of the RedGate support can help me on it. / comments
Tdoctor828 wrote:
My thoughts are the same...
The code are much longer now...
How to fix ?
I have no idea. I hope one of the RedGate support can help me on it.
Thanks James! / comments
Thanks James!
Thanks Aaron, it works like a charm. / comments
Thanks Aaron, it works like a charm.
No David, that's not what I want. Basically "inline execute" converts something like DECLARE @input INT = 10;
DECLARE @output INT;
EXEC sys.sp_executesql
N'SELECT @output = @input',
N'@input INT, @output INT out',
@input = @input,
@output = @output OUT;
To DECLARE @input1 INT;
SET @input1 = @input;
SELECT @output = @input1
What I want is a feature to wrap a piece of code in sp_executesql.
Thanks and happy Thanksgiving! / comments
No David, that's not what I want. Basically "inline execute" converts something likeDECLARE @input INT = 10;
DECLARE @output INT;
EXEC sys.sp_executesql
N'SELECT @output = @input',
N'@inpu...
Yes Dave, I've upvoted. Thanks. / comments
Yes Dave, I've upvoted. Thanks.