|
| |
|
|
Joey
Posts: 187 Joined: 5/15/2002 From: Status: offline
|
MS SQL VIEW Problem - 4/9/2009 22:43:45
I have a view where i need to combine 2 feilds, my code is as follows: CREATE VIEW dbo.view1 (
[test_combo]
)
AS
SELECT
dbo.listing.link+dbo.listing.ID
FROM
dbo.listing
The problem I am having is that since one feild is text and the other is numeric the join doesnt work. I have made this work with two text fields. Basically what I am trying to do is combine fields to make make a link like this: http://www.1.com/1.asp?ID=[ID] How do I convert this to all text?
|
|
|
|
Giomanach
Posts: 6187 Joined: 11/19/2003 From: England Status: offline
|
RE: MS SQL VIEW Problem - 4/10/2009 7:35:22
Try this instead: CREATE VIEW dbo.view1 (
[test_combo]
)
AS
SELECT
dbo.listing.link, dbo.listing.ID
FROM
dbo.listing
_____________________________
|
|
|
|
Joey
Posts: 187 Joined: 5/15/2002 From: Status: offline
|
RE: MS SQL VIEW Problem - 4/10/2009 10:09:16
The comma doesn't work. That makes it look for a second alias at the top.
|
|
|
|
Joey
Posts: 187 Joined: 5/15/2002 From: Status: offline
|
RE: MS SQL VIEW Problem - 4/11/2009 20:34:56
got it to work with CAST()
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|