Viewing 15 posts - 6,961 through 6,975 (of 8,731 total)
Ed Wagner (2/11/2014)
The information_schema.columns table is an old system table, but it still supported. The replacement is sys.columns.
Why do say this? the old system table is syscolumns.
INFORMATION_SCHEMA views are...
February 11, 2014 at 11:05 am
I believe that you need to add something to your steps.
If you're panicking, take a deep breath, hold for a count of five, release. Repeat until you are no...
February 11, 2014 at 10:49 am
By the way, your SP is open to SQL Injection. I hope you are aware of that, but it could become a serious problem.
February 11, 2014 at 10:40 am
If you're doing it on SSMS, you could use the magic of Ctrl+H to replace strings. just change Pivot to Pivoted and you'll be fine 🙂
February 11, 2014 at 10:36 am
Gary Varga (2/11/2014)
Craig-315134 (2/11/2014)
Gary Varga (2/11/2014)
Craig-315134 (2/10/2014)
...but the Darwinistic nature of capitalism sooner or later weeds out the bad ones.Oh, I wish I found that to be the case!!!
But it...
February 11, 2014 at 10:30 am
The most accurate response I can give you is: It depends.
Both functions won't cause performance issues on their own, but could be used in an inefficient way and produce performance...
February 11, 2014 at 8:40 am
dquirion78 (2/10/2014)
how is working the parameter (N)
E1(N) is defining the name of the CTE (E1) and its column (N). You could easily remove it but you'll have to name the...
February 10, 2014 at 2:07 pm
dquirion78 (2/10/2014)
thanks for second solution but for the moment I don't understand completely the function
Read the article I posted, it has a nice explanation on how it works. Maybe you...
February 10, 2014 at 1:43 pm
You could use the recursive query with no limits (it's part of the documented syntax).
The default limit is 100 as a safenet because you shouldn't need more than that for...
February 10, 2014 at 1:40 pm
Beware of recursive CTEs that count (like this one) as they could perform worse than a cursor or while loop (even if with 10 rows you can't note a difference)....
February 10, 2014 at 12:46 pm
Maybe something like this could help.
SELECT (COUNT( NULLIF(value, 'yes')) --eliminates yes values
/ (COUNT(*) * 1.0)) * 100 AS no_percentage ,
(COUNT( NULLIF(value, 'no')) --eliminates no values
/ (COUNT(*) * 1.0)) *...
February 10, 2014 at 12:37 pm
Will the columns you need have the same name every time?
If so, an alternative could be to use the header row to build a staging table, load the file into...
February 10, 2014 at 12:03 pm
You still need to read the articles I posted to go further on this. I'm helping you with the template to create all the values. Your original query used 3...
February 10, 2014 at 10:51 am
This seems like a weird design decision.
You could use something like this.
UPDATE A SET
FLAGB2 = CASE
WHEN [4.4] IS NOT NULL THEN 4.4
WHEN [4] IS NOT NULL THEN 4
WHEN...
February 10, 2014 at 10:19 am
Viewing 15 posts - 6,961 through 6,975 (of 8,731 total)