Viewing 15 posts - 211 through 225 (of 7,631 total)
This cannot be the correct forum for this. ...
Please repost in either the SQL 2008 forum or in the SQL Newbies forum.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 26, 2012 at 10:45 am
No, you cannot generally variablize column names, Dynamic SQL is how to do this.
There are some limited ways around it for specific cases, using if statements or other high-level branch...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 25, 2012 at 12:59 pm
It should be in your Start Menu's Microsoft SQL Server 2008 (R2) folder, as "SQL Server Business Intelligence Development Studio". If you don't see it then you need to...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 24, 2012 at 5:50 pm
In Management Studio:
1. Expand the "Security" folder underneath your server.
2. Right-click on the "Logins" folder, select "New Login..."
3. In the New Login window, add your Windows Logon...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 24, 2012 at 5:32 pm
laurie-789651 (8/24/2012)
Out of interest, what do you use the table-wrapper views for?
I assume that you meant me?
Well, I use them for three things:
1. Security Layer. Part...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 24, 2012 at 5:09 pm
AFAIK you have the same problem if you try to create a table from the Object Explorer/using the Table Designer. The GUI just doesn't seem to support Schemas very...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 24, 2012 at 5:01 pm
Fal (8/24/2012)
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 24, 2012 at 1:16 pm
Here's a slightly better way to go than that horrific Cursor thing:
First create a scalar UDF like this:
/*
Returns a formatted string of all of the column...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 24, 2012 at 12:57 pm
stephen mehl (8/23/2012)
Can CASE be used as follows?
CASE
WHEN expression is TRUE THEN
SQLstatement#1
ELSE
SQLstatement#2
END
Thanks for any help,
Larry...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 24, 2012 at 9:27 am
Fly Girl (8/23/2012)
Hmmmm, don't see my customer's name in the post, just the co-lo that probably appreciates the advertising....
Ah, I see. Never mind then. 🙂
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 23, 2012 at 4:52 pm
Mark-101232 (8/23/2012)
RBarryYoung (8/23/2012)
Mark-101232 (8/23/2012)
RBarryYoung (8/23/2012)
Mark has it. That's what a Difference Query is... 🙂Have a look a Jeff Modens excellent article here[/url] for an explanation
Actually, Jeff and I...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 23, 2012 at 4:45 pm
This works for me:
create table #TableSize (database_name varchar(150),
id int,
table_schema varchar(150),
table_name varchar(150),
...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 23, 2012 at 4:28 pm
Well, you could try to use this procedure here[/url], instead. It will handle all of the DB switching and Dynamic SQL issues for you.
You could also try using this...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 23, 2012 at 3:44 pm
Mark-101232 (8/23/2012)
RBarryYoung (8/23/2012)
Mark has it. That's what a Difference Query is... 🙂Have a look a Jeff Modens excellent article here[/url] for an explanation
Actually, Jeff and I learned about...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 23, 2012 at 3:06 pm
cheshirefox (8/23/2012)
Hi -We migrated to SQL 2012 and now a few SQL Jobs don't seem to have job history (and I know they ran successfully).
...
Have you upgraded your Management Studio...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 23, 2012 at 2:34 pm
Viewing 15 posts - 211 through 225 (of 7,631 total)