|
|
-
Guenter learned 2 Months ago through Blogs
Have you ever tried to write T-SQL code that conforms completely to the ISO standard? Since Microsoft SQL Server's T-SQL standard is based on the ISO standard, doing so is quite possible. Today, I explore the ISO equivalents of the EXISTS keyword - SOME...
|
-
Guenter Liked 2 Months ago through Blogs
Have you ever tried to write T-SQL code that conforms completely to the ISO standard? Since Microsoft SQL Server's T-SQL standard is based on the ISO standard, doing so is quite possible. Today, I explore the ISO equivalents of the EXISTS keyword - SOME...
|
-
Guenter Liked 6 Months ago through Blogs
How can one implement a scenario wherein a table needs to be passed over to a stored procedure, modify the table inside it and then consume the results outside of the procedure? We can share temporary tables through stored procedures and today we look a...
|
-
Guenter Commented 6 Months ago through Blogs
It really helps maintaining code especially when design changes reorder the rows or you temporarily want to remove a row.
However, the benefit only comes in action when you use the syntax with one column per row, i.e.
create table a (
fi...
|
-
Guenter Commented 6 Months ago through Ask
Hi Dishdy,
the way to specify a plan is quite straightforward:
1. start the profiler
2. run the query in doubt
3. retrieve the query text
In my case, I started a "process full" on a partition in my cube.
Then, just paste your query in t...
|
-
Guenter Commented 7 Months ago through Ask
Mike, thanks for jumping in!
The query is created by an SQL Server Analysis Services Cube, but it's basically a
select {some columns} from {some view} where dataversion>=2012103100 and dataversion < 2012110100
The same query with another d...
|
-
Guenter Commented 7 Months ago through Ask
Hi,
if you have a field named GeoLoc and populate it like this
UPDATE Table1
SET [GeoLoc] = geography::Parse('POINT(' + CAST([Longitude] AS VARCHAR(20)) + ' ' +
CAST([Latitude] AS VARCHAR(20)) + ')')
then you...
|
-
Guenter Posted 7 Months ago through Ask
<font face="Arial">Hi,<br><br>I have a BI solution that uses a "dataversion" as the primary key for all major tables. A dataversion is an integer that has the format yyyymmddxx, where xx is the number of dataversions for a given date.<br>My "date" table...
|
-
Guenter knew 8 Months ago through Just Learned
Using WITH statement you can create a series of data and use them in your queries.
Sample 1. Integer-Series
<pre>
WITH T(ID) AS
(
SELECT 1 ID
UNION ALL SELECT ID + 1
FROM T
WHERE ID < 1000
)
SELECT * FROM T
OPTION (MAXRECURSION 1000)
</pre>
Sa...
|
-
Guenter Liked 8 Months ago through Just Learned
Using WITH statement you can create a series of data and use them in your queries.
Sample 1. Integer-Series
<pre>
WITH T(ID) AS
(
SELECT 1 ID
UNION ALL SELECT ID + 1
FROM T
WHERE ID < 1000
)
SELECT * FROM T
OPTION (MAXRECURSION 1000)
</pre>
Sa...
|