OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

MS SQL VIEW Problem

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> MS SQL VIEW Problem
Page: [1]
 
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


_____________________________




(in reply to Joey)
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.

(in reply to Joey)
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()

(in reply to Joey)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> MS SQL VIEW Problem
Page: [1]
Jump to: 1





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