If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Conversion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-17-03, 11:03
rali08 rali08 is offline
Registered User
 
Join Date: Dec 2003
Posts: 7
Conversion

How do you convert a varchar into numeric?
Reply With Quote
  #2 (permalink)  
Old 12-17-03, 11:07
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 12,327
Look up CAST and CONVERT functions in Books Online.

blindman
Reply With Quote
  #3 (permalink)  
Old 12-17-03, 11:25
rali08 rali08 is offline
Registered User
 
Join Date: Dec 2003
Posts: 7
which books online. Cant somebody just give me an example
Reply With Quote
  #4 (permalink)  
Old 12-17-03, 11:27
Enigma Enigma is offline
The SQL Apostle
 
Join Date: Jul 2003
Location: The Dark Planet
Posts: 1,395
convert(varchar_column as numeric)

where
isnumeric(varchar_column) = 1
__________________
Get yourself a copy of the The Holy Book

order has no physical Brett in The meaning of a Kaiser . -database data
Reply With Quote
  #5 (permalink)  
Old 12-17-03, 13:57
vmlal vmlal is offline
Registered User
 
Join Date: Sep 2003
Posts: 212
try this

declare @test varchar(2)
set @test = '02'
select cast(@test as numeric)
Reply With Quote
  #6 (permalink)  
Old 12-17-03, 14:09
Brett Kaiser Brett Kaiser is offline
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,322
Quote:
Originally posted by rali08
which books online. Cant somebody just give me an example
Figuring out what's meant by BOL (books online) would server you better than a simple example...

http://msdn.microsoft.com/library/de...start_4fht.asp
__________________
Brett
8-)

It's a Great Day for America everybody!

dbforums Yak CorralRadio 'Rita
dbForums Member List
I'm Good Once as I ever was

The physical order of data in a database has no meaning.
Reply With Quote
  #7 (permalink)  
Old 12-17-03, 15:42
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 12,327
Give a man a fish and you feed him for a day.
Teach a man to fish (for information in books online) and you feed him
for the rest of his life (or career).

blindman
Reply With Quote
  #8 (permalink)  
Old 12-17-03, 15:47
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Stuff yourself:

all you can eat fish
Reply With Quote
  #9 (permalink)  
Old 12-17-03, 15:53
rdjabarov rdjabarov is offline
Registered User
 
Join Date: Jul 2003
Location: San Antonio, TX
Posts: 3,634
Doesn't highlighting + Shift-F1 in QA come natural? It has been working since 6.5!!
Reply With Quote
  #10 (permalink)  
Old 12-17-03, 15:55
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 12,327
Can't somebody press Shift-F1 for me?
Reply With Quote
  #11 (permalink)  
Old 12-17-03, 16:21
Brett Kaiser Brett Kaiser is offline
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,322
Quote:
Originally posted by rdjabarov
Doesn't highlighting + Shift-F1 in QA come natural? It has been working since 6.5!!
No need to...never close BOL...never turn off the computer...ok once a month...

Does anyone still use CTRL-E?

I don't think it's documented..if they make me do F5 only Yukon....8-(

How about this...

..code [ENTER]
[SHIFT] Up Arrow
[CTRL]-E
__________________
Brett
8-)

It's a Great Day for America everybody!

dbforums Yak CorralRadio 'Rita
dbForums Member List
I'm Good Once as I ever was

The physical order of data in a database has no meaning.
Reply With Quote
  #12 (permalink)  
Old 12-17-03, 16:36
MCrowley MCrowley is offline
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 5,232
Holy moly! That shift + f1 thing even works in the results pane. Now all I have to do is teach some of these college-hires how to pick what to highlight :-P
Reply With Quote
  #13 (permalink)  
Old 12-17-03, 16:42
rdjabarov rdjabarov is offline
Registered User
 
Join Date: Jul 2003
Location: San Antonio, TX
Posts: 3,634
I USE CTRL+E ALL THE TIME!!! And Ctrl+Break, and Ctrl+S, and Alt+F4, and Shift+Tab, and...whatever, it's all handy.
Reply With Quote
  #14 (permalink)  
Old 12-17-03, 22:58
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Ok - Here you go - "My fellow nerds and I will retire to the nerdery..."

SQL Query Analyzer Keyboard Shortcuts
This table displays the keyboard shortcuts available in SQL Query Analyzer.

Activity Shortcut
Bookmarks: Clear all bookmarks. CTRL-SHIFT-F2
Bookmarks: Insert or remove a bookmark (toggle). CTRL+F2
Bookmarks: Move to next bookmark. F2
Bookmarks: Move to previous bookmark. SHIFT+F2
Cancel a query. ALT+BREAK
Connections: Connect. CTRL+O
Connections: Disconnect. CTRL+F4
Connections: Disconnect and close child window. CTRL+F4
Database object information. ALT+F1
Editing: Clear the active Editor pane. CTRL+SHIFT+DEL
Editing: Comment out code. CTRL+SHIFT+C
Editing: Copy. You can also use CTRL+INSERT. CTRL+C
Editing: Cut. You can also use SHIFT+DEL. CTRL+X
Editing: Decrease indent. SHIFT+TAB
Editing: Delete through the end of a line in the Editor pane. CTRL+DEL
Editing: Find. CTRL+F
Editing: Go to a line number. CTRL+G
Editing: Increase indent. TAB
Editing: Make selection lowercase. CTRL+SHIFT+L
Editing: Make selection uppercase. CTRL+SHIFT+U
Editing: Paste. You can also use SHIFT+INSERT. CTRL+V
Editing: Remove comments. CTRL+SHIFT+R
Editing: Repeat last search or find next. F3
Editing: Replace. CTRL+H
Editing: Select all. CTRL+A
Editing: Undo. CTRL+Z
Execute a query. You can also use CTRL+E (for backward compatibility). F5
Help for SQL Query Analyzer. F1
Help for the selected Transact-SQL statement. SHIFT+F1
Navigation: Switch between query and result panes. F6
Navigation: Switch panes. Shift+F6
Navigation: Window Selector. CTRL+W
New Query window. CTRL+N
Object Browser (show/hide). F8
Object Search. F4
Parse the query and check syntax. CTRL+F5
Print. CTRL+P
Results: Display results in grid format. CTRL+D
Results: Display results in text format. CTRL+T
Results: Move the splitter. CTRL+B
Results: Save results to file. CTRL+SHIFT+F
Results: Show Results pane (toggle). CTRL+R
Save. CTRL+S
Templates: Insert a template. CTRL+SHIFT+INSERT
Templates: Replace template parameters. CTRL+SHIFT+M
Tuning: Display estimated execution plan. CTRL+L
Tuning: Display execution plan (toggle ON/OFF). CTRL+K
Tuning: Index Tuning Wizard. CTRL+I
Tuning: Show client statistics CTRL+SHIFT+S
Tuning: Show server trace. CTRL+SHIFT+T
Use database. CTRL+U
Reply With Quote
  #15 (permalink)  
Old 12-18-03, 01:08
Enigma Enigma is offline
The SQL Apostle
 
Join Date: Jul 2003
Location: The Dark Planet
Posts: 1,395
Why is Alt + X (Execute Query) not listed over here in the shortcuts ??
__________________
Get yourself a copy of the The Holy Book

order has no physical Brett in The meaning of a Kaiser . -database data

Last edited by Enigma; 12-18-03 at 01:13.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On