Getting primary/foreign keys and referenced tables and columns
OK, I've been wrestling with this for a while; time to ask for help.
I need a query (SQL 2005/2008) that, given a table name, will return the
column information for that table as shown in SSMS (schema name, table name,
column name, if it's a primary or foreign key; AND, additionally, if it is a
foreign key - the referenced table and column that contains the primary
I have been able to put together a query to get primary keys and one to get
the foreign keys, but unable to pull it all together with the inclusion of
the reference information for foreign keys! Any h...Column width #8
I want to have two different column widths in one worksheet. Another words I
want Column A to be one width at the top of the worksheet, and column A to be
another width at the bottom of the worksheet without it effecting the top
column width. Is this possible?
Consider using the "Merge-and-Center" command (button on the formatting
toolbar next to "Align Right"). If you have highlighted one cell to the
right, this will cause the data in cell A1 to appear merged across A1 and B1.
Thus, the merged column above will appear to have a different width than
those below....exclude columns in macro
I have a simple macro below. I would like to exclude
certain Columns (c). So instead of reading c=5 to 16, it
will be 5 to 8, 10-13.......
p = "C:\Documents and Settings\"
f = "Stuff.xls"
s = "Sheet1"
Application.ScreenUpdating = False
For r = 12 To 72
For c = 5 To 16
a = Cells(r, c).Address
Cells(r, c) = GetValue(p, f, s, a)
Selection.NumberFormat = "#,##0_);(#,##0)"
Also, is there a way for me to identify these columns
later ...printing specific columns
Is there a way to print just selected columns? I have a sheet with 6 columns
and I want to print 3 of them, the others are just for reference and
Hide those you don't want to print
"Fayette" <firstname.lastname@example.org> wrote in message
> Is there a way to print just selected columns? I have a sheet with 6
> and I want to print 3 of them, the others are just for reference and
&g...Cant delete any messages
My friend at work has a weird problem recently he can't delete any
messages in Outlook Express the delete button doesn't work so does not
the right mouse button menu delete option. When d&d the files theres a
error that says
"An error occurred"
He works on a normal user account.
Have your friend post in an Outlook Express newsgroup. Tell him/her to
include the version of OE, the exact error message, and any other pertinent
Outlook Express and Microsoft Outlook are not the same e-mail client, nor
are they related in spite of the similarity of ...Row and Column Header
I eliminated my row and column headers. How do I get them back? Thanks
Go to the Tools menu, choose Options then the View tab. There,
check the "Row and column headers" setting.
Microsoft MVP - Excel
Pearson Software Consulting, LLC
"PJ Usher" <email@example.com> wrote in message
> Excel 2000
> I eliminated my row and column headers. How do I get them
> back? Thanks
That's it!!! Thanks
"Chip P...Combine Clustered Column and Stacked Column
Is there any way to combine clustered column and stacked
column on the same chart. For each month in the year I
have three bars I wish to show side by side, and within
each bar I would like to have two divisions that are
stacked. For example, suppose I asked three questions of
an audience each month, with possible answers (Yes, No,
Maybe). Now I want to plot the percentage of Yeses and
Nos for each question for each month.
Through careful arrangement of the data in your worksheet, you can make
a stacked column chart that looks like a clustered-stacked column chart....Max # of Columns
What is the max # of columns in excel by default?
Is there a way to increase the # of columns
You cannot increase the number of columns. It is fixed at 256 (XL2003
and earlier) or about 18K (XL2007 and later).
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
[email on web site]
On Thu, 10 Dec 2009 14:50:01 -0800, Sancho
>What is the max # of columns in excel by default?
>Is there a way to increase the # of columns
>Th...I am trying to print on legal size paper, i cant set size.
I've tried print option to set up 8.5 x 14 paper put it wont hold the
Well, it is to do with your printer driver. Are you sure that the
printer supports that paper size? Perhaps you can see if there is an
updated driver for the printer.
Hope this helps.
On Dec 14, 2:26=A0pm, Michele <Mich...@discussions.microsoft.com> wrote:
> I've tried print option to set up 8.5 x 14 paper put it wont hold the
> setting. =A0
...cant open file
I have windows vista and microsoft publisher 2007 did my website and now out
of nowhere it says cant open file tried everything and is not happening
What kind of file are you trying to open? What steps are you taking? What
kind of error messages are you getting? Details are important.
MVP Microsoft [Publisher]
Tech Editor for "Microsoft Publisher 2007 For Dummies"
"arleen" <firstname.lastname@example.org> wrote in message
>I have windows vista and microsoft publisher 2007 did my w...Date as column Heading
Is their a way to use the current date or calculated date as a column heading?
I can't imagine why you would need to do this. I expect you can derive a
column name in a crosstab. The other solution would be to use code to create
the SQL of a query.
Microsoft Access MVP
> Is their a way to use the current date or calculated date as a column heading?
Yes, probably... but why?! I can drive nails with my chainsaw ... but it
isn't a very good use of the tool.
If you'll describe the business need you're tr...Making columns remain in view? #2
Thanks a lot folks, that is exactly what I needed to know.
jeremyf's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1530
View this thread: http://www.excelforum.com/showthread.php?threadid=26930
...Active row and column header color
I have EXCEL 2000. A friend has the 2003 version. In his, the acitve col#
is orange and so is the active row name. Mine in just gray, and harder to
see. Is that a new feature? If not, how do I change mine. I need complete
Thank you. Tony G
This would be a Windows OS Appearance issue not an Excel 2003 feature.
Right-click on desktop and Properties>Appearance>Advanced>Item>Selected Items.
Change the color there.
Note: this will be a global change for all selected items.
Download Chip Pearson's ROWLINER add-in.
ht...Not allow entering repeated references in a column
But I made a mistake when posting the formula.
I�ve used the formula that you�ve mentioned, i.e.:
=COUNTIF($A$1:$A$25,A1)=1 ... & does not work :confused:
Did you try it? Does it work with you?
Thanks and sorry again,
ritinha's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1566
View this thread: http://www.excelforum.com/showthread.php?threadid=27195
- what cells have you selected BEFORE entering this formula in the data
- what valu...Cant get Money to work
when I try to use monwy to set up new account, all I get is "The list is
temporarily unavailable. Please try again later." This is the second night
in a row that it has done this. Did I buy something that does not work????
In microsoft.public.money, Roaddog_tnkr wrote:
>when I try to use monwy to set up new account, all I get is "The list is
>temporarily unavailable. Please try again later." This is the second night
>in a row that it has done this. Did I buy something that does not work????
What did you buy? What are you trying to install it on?
On De...moving multiple data in a cell to other columns
I imported a spreadsheet. One column contains multiple data lines that I
want to put into separate columns. They are consistent in their
presentation. How do I do this?
Assuming column A with consistent sets of data........seven cells to a =
Adjust the "7" in formula to suit your layout.
In B1 enter =3DINDEX($A:$A,(ROWS($1:1)-1)*7+COLUMNS($A:B)-1)
Copy across to H1
Select B1:H1 and copy down until you get zeros.
Gord Dibben MS Excel MVP
On Sun, 30 May 2010 12:18:01 -0700, Joan in DC <Joan in
>I imp...EXCEL-2000 column headings hide from data
How do you make the column headings where they don't show in data validation
drop down box?
Assuming the Data validation drop=down relays on a list [range of cells] DO
NOT include that cell while defining the data validation.
> How do you make the column headings where they don't show in data validation
> drop down box?
I don't see a way not to include the row of labels that are on the top of the
column. When you set up D-V, it asks for a list, then you pick a column to
"מיכאל (מיקי) אבידן" wrote:
...Using IF formulas on multiple columns
I have a table with Multiple columns and rows like this:
Transaction Month1 Month2 Month3 etc.. Location
Sales 500 550 340 Glasgow
Sales 780 825 575 Edinburgh
Sales 260 345 210 Inverness
Expenses 500 550 340 Glasgow
Expenses 780 825 575 Edinburgh
Expenses 260 345 210 Inverness
In another excel sheet I need to have an IF formula which says
IF(B3:B50="Sales",IF(F3:F50="Glasgow,C3:C50,0)) so that when the value
in column B = Sales and ...Multiple Column Sorting
I've been reading online about sorting multiple columns and I'm confused.
Selecting one column to sort also selects all the other columns as well, at
least in Excel 2000 and XP. I didn't see any difference in selecting one
column or using the "Then by" boxes, in fact, the "Then by" choices didn't
work. If the first column sorted in ascending order, and I chose to sort the
second and third columns to sort in descending order, Excel still sorted all
three columns in ascending order.
If Excel sorts the all the columns together by default, why use the "Then...from exchange machine i cant telnet to 25
all machine on customer lan are connecting to exchange server to post mail.
when logged into the exchange server i launch cmd prompt and "telnet
192.168.0.10 25" and cant connect to smtp service (i.e from machine that
host SMTP so network routing not involved)
- netstat -na shows me port 25 is listening
- simple mail transfer protocol is running as a service
- sending mail via outlook on this server works and also show me a log on my
exchange server that it coming from this servers public ip
- default smtp virtual server, outbound security set at ANON.
- default smtp virtua...Clicking a column by means of code
private void makeStockList()
listView1.ColumnHeaderCollection) ? ;
// more code
#region Sorting columns.
private void listView1_ColumnClick(object sender,
this.listView1.ListViewItemSorter = new
Re the above, I want to click column header 5 by means of code. What I have
between ?? doesn't work. Which parameter would work?
Za...Comparing stacked columns
I am trying to create the following chart. How do I do it in excel.
Is there and additional template/addin that would help in this?
Widgets in the market(by geography) My Widgets
I am trying to create two stacked bars on the X axis, one for "Widgets
in the market" and "My Widgets". I then want to depict that "My
widgets" is x% of Widgets in the market. I would like to be able to
draw a line from one cell to another (comparing the reduction in share
I wish I could upload a picture somewhere!
Tha...delete columns based on selection
I want to highlight cells and if a certain word is found in the selection,
delete the column.
So I highlight the cells, press alt+f8 and run the code.
...I cant send mail in Outlook
I have just installed outlook 2007 and have got a new email address, although
I receive emails, I cant send any. The following message comes up in an email
that says "Stystem Administrator" Message undeliverable, then the text says :
Your message did not reach some or all of the intended recipients.
Sent: 21/05/2008 20:04
The following recipient(s) cannot be reached:
'************@Hotmail.com' on 21/05/2008 20:04
550 5.7.1 <***********@Hotmail.com>... Relaying denied. Proper
> I have just insta...Convert Column number to a letter? e.g. Column 203 = GU
Given that I know how many columns are in a spreadsheet - how do I convert
that to a letter?
e.g. ActiveSheet.UsedRange.Columns.Count = 203
I need to refer to that column in this code
Range:("A1:" & ??? & ActiveSheet.UsedRange.Rows.Count).Select
where ??? has been translated from 203 to GU
The number of columns and rows varies.
Dim cc As Integer
cc = ActiveSheet.UsedRange.Columns.Count
Range("A1:" & GetColLet(cc) & ActiveSheet.UsedRange.Rows.Count).Select
MsgBox "range selected is " & Selection.Address