All column names in my view are underlined in red in SSMS - sql-server-2008

I created the view View_DefectDaysOutstanding3. when I select to see the data, it gives the data, but why in the select statement all the fields are underlined in red as error?
SELECT TOP 1000 [ID]
,[Severity]
,[AvgDaysOutstanding]
,[ReportMonth]
,[ReportYearMonth]
,[#OfBugs]
,[projid]
,[folderid]
FROM [SoftwarePlanner].[dbo].[View_DefectDaysOutstanding3]
order by ReportYearMonth

Have you refreshed your Intellisense cache?
Keyboard shortcut:
Ctrl + Shift + R
Or, using the menu: Edit -> IntelliSense -> Refresh Local Cache

Go to Edit > IntelliSense > select "Refresh Local Cache".
You need to refresh your cache after you create new tables/add columns/ new views etc

Related

MYSQL DB - New tables are created randomly

My DB has increased in size very much, above 10GB.
I see these tables:
emcxmp_wp_posts
zjrqwg_wp_posts
qtlmkn_wp_posts
shcjpe_wp_posts
stzbcj_wp_posts
tymbkf_wp_posts
ursnzw_wp_posts
vkhjml_wp_posts
oyjfup_wp_posts
voxfcz_wp_posts
xlhpaz_wp_posts
ybazlk_wp_posts
yjmify_wp_posts
ymsaun_wp_posts
yojkzl_wp_posts
yqlfun_wp_posts
wouevx_wp_posts
msyfsp_wp_posts
kqbjhz_wp_posts
kqjsio_wp_posts
lnfjsf_wp_posts
asvpky_wp_posts
bltyyt_wp_posts
cyuhqr_wp_posts
eudjso_wp_posts
And more, what happened and why these were created?
This is the intended behaviour of the plugin WP Reset Pro.
It creates snapshots with names as yours:
naming template for snapshot tables is {6_char_random_hex}{table_prefix_for_your_site}{original_table_name}
To delete snapshots, use the appropriate function:
If you do not need a specific snapshot on your WordPress site, you can quickly delete it:
Open Tools -> WP Reset -> Snapshots
Scroll down to the "User Created Snapshots" card
Select a snapshot & open the "Action" menu
Click "Delete snapshot"
Confirm that you want to delete it by clicking the red button

BusinessObjects - Changing Syntax in Generating Query

When I make a query in BusinessObjects and when two tables are inner-joined, the BO generates the following script:
SELECT
attr_1,... attr_N
FROM Table_1, Table_2
WHERE Table_1.key = Table_2.key
Is it possible to set BusinessObjets to generate queries in the following format:
SELECT
attr_1,..., attr_N
FROM Table_1
INNER JOIN
Table_2
ON Table_1.key = Table_2.key
When I want to check the query, it is much more easy to read the syntax in the second example.
Btw, I tried to modify some parameters. However, it didn't work.
Any suggestion on how to do it quickly and easily?
Assuming you're on XI3...
In Designer, go to File -> Parameters. Then click the Parameter tab. In there you should see a parameter named "ANSI92"; change its value to Yes and click Replace.
In BI4 IDT, first open the universe's Data Foundation. Then click on the .dfx file in the Data Foundation pane to select it:
This will bring up the Data Foundation settings in the lower right corner of the window. Click the Properties tab, then the Parameters button:
In the dialog that comes up, you can change the ANSI92 option:

SQuirrel - Prevent multiple result tabs

I am using SQuirrel SQL Client Version 3.5 and everytime I modify and run a query it opens up a new result tab. I would prefer that it re-use the existing result tab (replacing the contents) Is there a way to do this?
Another way to do this (without having to set the sticky flag everytime) is to set the maximum limit of SQL Result Tabs to 1 in the Global New Session Properties.
You'll find it here: File --> New Session Properties --> SQL Tab
Right click on a result tab and select sticky. This prevents new result tabs from opening.

Why am I getting [BLOB - 1B] in mysql rows? [duplicate]

I was wondering why in phpMyAdmin I see something like this:
**Edit Inline Edit Copy Delete [BLOB - 7B] [BLOB - 32B] [BLOB - 13B] [BLOB - 16B]**
Why can't I see the actual text? When I click [BLOB-/nx/], I just get prompted to download a .BIN file.
I tried adding:
$cfg['ShowBlob'] = true;
To phpMYAdmin/config.inc.php, but it didn't work. I have also tried adding to the URL &display_blob=true.
I am trying to do this on localhost with XAMPP by the way.
My version of phpMyAdmin is 3.4.5, if it's needed.
phpMyAdmin has an "+option" link on top of each result set. Click it, and you will see the option to display blob contents.
I should add: some phpMyAdmin versions have a bug where the "+option" link does not show up on the first load of the results, you need to click [ Refresh ] to make it appear.
In PHPMyAdmin, there is a +Options above the results table. To show the blob contents:
Click +Options
Then click Show Blob contents and press Go to save.
Then, in order to enable the Blob columns to be editable:
Go to Settings > Main Panel > Edit Mode
In the row Protect Binary Columns, click on the right dropdown menu and select no.
Press Apply to save.

"collapse all' or "toggle outline" in SQL Server Management Studio 2008

A new feature in SQL Server Management Studio 2008 is 'outlining' (the ability to collapse regions). It is awesome. However, by default all regions are expanded. I can't seem to find a way to 'collapse all' (also called 'toggle outline' in Visual Studio). Is anyone aware of a way to do this? I've been tasked with reviewing a 3,000 line stored procedure, and collapsing regions one-by-one is cumbersome.
This isn't a shortcut key, but there is a menu option in the Query Editor to do this.
Open your query and then go to Edit > Outlining > Toggle All Outlining.
This will toggle (i.e. expand/collapse) all nodes in the query.
It appears this feature does not exist. It has been recommended to Microsoft. I suggest voting it up;
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=368542
As a work-around, I'm using Notepad++ to edit locally. Its region identification isn't as good, but it's better than nothing.
A workaround is to use BEGIN and END.
BEGIN -- comment on/explain the region/outlined section
/*
TSQL goes here
*/
END
You will then be able to collapse the BEGIN.
In ssms 2017 -> There is an option in Tools > Options {see image}
The below illustrates #Triynko update to #Shawns answer
There is a free 3rd party add-in for SSMS called, SSMS Tools Pack. It provides several useful features, which includes collapsable regions and debug sections. By default, the regions are collapsed when you first open a .sql script.
http://www.ssmstoolspack.com/Features?f=9
For example:
--#region You can place comments here which are visible when the region is collapsed.
if object_id('MyTable') is null
begin
create table MyTable
(
constraint [pk_mytable] primary key clustered ( mytable_id ),
mytable_id int not null
);
end;
--#endregion
If you open a .sql script in Visual Studio then you can collapse the code in there.
In my condition it was "Maximun Script Size" default is 1MB, mine was above 1Mb changed it to 5MB it works
Path is
Tools >> Options >> Text Editor >> TransactSQL >> Intellisense >> Maximum Script Size
An option that I found helpful...
Edit.ToggleAllOutlining
In SSMS 2019 -> Tools > Options > Environment > Keyboard, then click on command Edit.ToggleAllOutlining and Assign your new shortcut keys.
Screenshot of Option
Screenshot of Caution
I used Ctrl+K, Ctrl+T.
Then put a GO in the beginning of Query and GO after any region I wanted collapsed. I tried BEGIN END, but it collapsed entire Query.
Try it out with the following:
/*
Toggle using Tools > Options > Environment > Keyboard
Search for "Toggle"
Select Edit.TogleAllOutlining
Enter Global Shortcut key. Do not use common keys like ctrl-A, ctrl-c, ctrl-v, etc...
Pay attention to "Shortcut currently used by: (dropdown values)"
I used ctrl-k, ctrl-t
*/
GO
--Do something
Declare #Something varchar(max)
GO
/*First Region*/
select 'parent - this will be toggled'
select 'sub query - toggled with parent'
GO
/*Second Region*/
select 'parent - this will be toggled too'
select 'sub query - toggled with parent'
GO
Ctrl+M,Ctrl+A is the default in SSMS 17.X.
You can change this by going to Tools > Options > Environment > Keyboard, then click on command Edit.CollapseAllOutlining and Assign your new shortcut keys.
CTRL + M then CTRL + L
collapse / decollapse all in visual studio 2022
This feature was implemented in SQL Server Management Studio 2012 and is available for editions beyond also using CTRL + M etc - https://msdn.microsoft.com/en-us/library/ms174205(v=sql.110).aspx