I have a column called body, which contains body content for our CMS. The data looks like:
...{cloak:id=1.1.1}...{cloak}...{cloak:id=1.1.2}...{cloak}...{cloak:id=1.1.3}...{cloak}...
A moderately tweaked for readability example:
## h5. A formal process for approving and testing all external network connections and changes to the firewall and…
select
(Case Remark01
When 'l1' then type1
when 'l2' then type2
end) AS [?] --Remark .....want to switch name in here
from mytable
Example ....
select
(Case level
When 'l1' then type1 ('l1' mean check constant string)
when 'l2' then type2(('l2' mean check constant string))
end) AS (Case when 'l1' then [type01] Else [type02])
from mytable
…
Based on the following table
Area S1 S2 S3 S4
--------------------
A1 5 10 20 0
A2 11 19 15 20
A3 0 0 0 20
I want to generate an output that will give the number of columns not having "0".
So the output would be
Area S1 S2 S3 S4 Count
-------------------------
A1 5 10 20 0 3
A2 11 19 15 20 4
A3 0 0 0 …
Based on following table (I have kept spaces between the rows for clarity)
Path
-----------
\node1\node2\node3
\node1\node2\node3\node5
\node1\node6\node3
\node1\node4\node3
\node1\node4\node3\node7
\node1\node4\node3\node8
\node1\node4\node3\node9
\node1\node4\node3\node9\node10
I want to get all the paths containing leaf node. So for…
I just want an update trigger like this postgresql version... It seems to me there is no NEW. and OLD. in MSSQL?
CREATE OR REPLACE FUNCTION "public"."ts_create" () RETURNS trigger AS
DECLARE
BEGIN
NEW.ctime := now();
RETURN NEW;
END;
Googled already, but nothing to be found unfortunately... Ideas?
On April 14, 2010, Microsoft Press (blog | twitter) released my latest book, co-authored with Ross Mistry (twitter), as a free ebook download - Introducing Microsoft SQL Server 2008 R2. As the title implies, this ebook is an introduction to the latest SQL Server release. Although you'll find a comprehensive review of the product's features…
In SQL Server 2008 and SQL Server 2008 R2, the number of partitions on tables and indexes is limited to 1,000. This paper discusses how SQL Server 2008 SP2 and SQL Server 2008 R2 SP1 address this limitation by providing an option to increase the limit to 15,000 partitions. It describes how support for 15,000 partitions can be enabled and…
I had the privilege of presenting to the Adelaide SQL Server User Group in Australia last evening, and I covered the Data Access Component (DAC) and the Utility Control Point (UCP) from SQL Server 2008 R2. Here are some links from that presentation:
Whitepaper: http://msdn.microsoft.com/en-us/library/ff381683.aspx
Tutorials:…
I had the privilege of presenting to the Adelaide SQL Server User Group in Australia last evening, and I covered the Data Access Component (DAC) and the Utility Control Point (UCP) from SQL Server 2008 R2. Here are some links from that presentation:
Whitepaper: http://msdn.microsoft.com/en-us/library/ff381683.aspx
Tutorials:…
We have a lot going on in San Francisco this fall. One of the most personal exciting bits, for what will be my 4th or 5th Open World, is that this will be my FIRST as a member of Team Oracle. I’ve presented once before, but most years it was just me pressing flesh at the vendor booths. After 3-4 days of standing and talking, you’re…
In my previous post, “Automating Deployments with SQL Compare command line” I looked at how teams can automate the deployment and post deployment validation of SQL Server databases using the command line versions of Red Gate tools. In this post I’m looking at another use for the command line tools, namely using them to generate…
What is the best way to query data from a MS SQL Server in C Sharp?
I know that it is not good practice to have an SQL query in the code.
Is the best way to create a stored procedure and call it from C Sharp with parameters?
using (var conn = new SqlConnection(connStr))
using (var command = new SqlCommand("StoredProc", conn)…
Cloud Computing?
Everyone is talking about Cloud these days. Everyone is explaining how the cloud will help you to bring your service up and running very fast, secure and with little effort. You can find
these kinds of presentations at almost every event around the globe. But what is really behind all this stuff?…
As many of you know, I run the SQL South West user group and we are currently in full flow preparing to stage the UK’s second SQL Saturday. The SQL Saturday spotlight is going to fall on Exeter in March 2013. We have full-day session on Friday 8th with some truly amazing speakers giving their insights and experience into some…
I work on a few high traffic websites that all share the same database and that are all heavily database driven. Our SQL server is max-ed out and, although we have already implemented many changes that have helped but the server is still working too hard.
We employ some caching in our website but the type of queries we use…
We've created the following Twitter handles for those of you who like your Oracle Linux and virtualization news in micro chunks
ORCL_Linux
ORCL_virtualize
I do a presentation (and a class) called "SQL Server for the Oracle DBA". It's a non-marketing overview that gives you the basics of working with SQL Server if you're already familiar wtih how Oracle works. This class and these links DO NOT help you with "Why should I use Oracle/SQL Server instead of Oracle/SQL Server" -…
This is a bit of an open ended question but I wanted some opinions, as I grew up in a world where inline SQL scripts were the norm, then we were all made very aware of SQL injection based issues, and how fragile the sql was when doing string manipulations all over the place.
Then came the dawn of the ORM where you were…
WordPress is enormously popular for blogs and full websites thanks to an awesome eco system which has built up around it, the simplicity (relatively) of getting it up and running plus the flexibility to “bend it” in all sorts of directions. When I say bend, check out the following which are all WordPress sites My…
We are getting more and more people asking how to move from VMware to VirtualBox so here are 2 handy blogs on the subject:
Migrating an Oracle Enterprise Linux VMMigrating a Windows XP VMHope this is useful to someone out there.- FB
Does SQL server expect numbers to be specified with digits from the latin alphabet, e.g.:
0123456789
Is it valid to give SQL Server digits in other alphabets?
Rosetta Stone:
Latin: 01234567890
Arabic: ??????????
Bengali: ??????????
i know that the client (ADO) will convert 8-bit strings to 16-bit unicode…
I have been working on sql server and front end coding and have usually faced problem formulating queries.
I do understand most of the concepts of sql that are needed in formulating queries but whenever some new functionality comes into the picture that can be dont using sql query, i do usually fails resolving…
We have 4 ESX Server in cluster. Yesterday i received this warning in all VM: Reached maximum VM restart count for {vm_name}. We can´t do VMotion and others tasks whit these machines.
Any idea? what we can do?
Thanks.
After using other gui tools for databases like oracle sql developer , plsql editor ..., I don't quite comfortable with sql server management studio,so I want to ask:
Is there any better client tools for sql server?
In management studio ,if I've already opened edit window, how to refresh the data in the window…