Viewing 15 posts - 181 through 195 (of 2,893 total)
don't you think that you are missing wild-card at the begining of the pattern:
PATINDEX('%BOCTEST.%', @source_code) as Pos, @proc_Name
February 12, 2014 at 5:36 am
...
The columns above do not relate to the actual columns I use, just an example.
just as an example...
you can do in T-SQL:
SELECT ...
...
February 12, 2014 at 5:28 am
There is no single setting in SQL Server which is responsible for this sort of behaviour.
There are mulitple reasons for this error to happen. Are you using TEXT datatypes anywere...
February 12, 2014 at 5:25 am
What do you mean by "I'm unable to sum the cost."? SUM can be applied to float.
As float are not exact datatype it is a bad choice for such calculations...
February 12, 2014 at 5:15 am
The cost figure is a relative number.
If you want your sorting to be faster - create an index.
February 12, 2014 at 5:07 am
It is usually considered as a bad design to have resequencing records in a table for such case as your.
Any way, you can do this:
;with cte
as
(
select...
February 11, 2014 at 11:40 am
1. sql injection:
In your case it may not be as simple as just using sp_executesql, as even passing some nice value for @pivot may create an issue. For example the...
February 11, 2014 at 11:25 am
You can enclose your "Pivot" into square brackets: [Pivot]
February 11, 2014 at 10:37 am
you always will have trouble with this join as your US code of '1' can match any fialed number starting with 1.
BTW: don't use NOLOCK - it's a pass to...
February 11, 2014 at 9:45 am
please note, the the following is a bit different setup...
CREATE INDEX IX_myindex1 ON mytable (ColumnA, ColumnB);
CREATE INDEX IX_myindex2 ON mytable (ColumnB);
As, Grant mentioned, the Index(A,B) and Index(A) will have identical...
February 11, 2014 at 9:19 am
It depends.
What do you plan these indexes will be used for? Are you going to use these columns in JOINS, sometimes one sometimes two? SELECTS?
There is nothing wrong in...
February 11, 2014 at 7:49 am
Jeff Moden (2/10/2014)
Eugene Elutin (2/10/2014)
Jeff Moden (2/10/2014)
MyDoggieJessie (2/10/2014)
February 11, 2014 at 5:06 am
Jeff Moden (2/10/2014)
MyDoggieJessie (2/10/2014)
Of course, you make valid points - 😉 I originally suggested SSIS, but provided a TSQL alternative - not pretty, but there it is...
The use of xp_CmdShell...
February 10, 2014 at 1:33 pm
Completeley agree with Luis: very weird design decision...
However there is another puzzle solution:
UPDATE #TableA
SET FLAGB2 = COALESCE(4.4 * [4.4]/[4.4],4 * [4]/[4],3.3 * [3.3]/[3.3],3 * [3]/[3],2.2 * [2.2]/[2.2],2 * [2]/[2],1.1 *...
February 10, 2014 at 11:13 am
There are few things in this design which would make me to reject this solution completely:
1. Use of xp_cmdshell
2. Writing file out on SQL Server (or mapped dirve)
3....
February 10, 2014 at 10:57 am
Viewing 15 posts - 181 through 195 (of 2,893 total)