Unix Technical Forum

Help with Query

This is a discussion on Help with Query within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, I am trying to perform a query that is beyond my knewlegde and was after little help, I ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 06:35 PM
Crumb
 
Posts: n/a
Default Help with Query

Hi,

I am trying to perform a query that is beyond my knewlegde and was
after little help,

I have two tables in my db, national and CDR. the National table
displays the codes and location for every std code in the UK, the CDR
table displays the information about calls made from people in my
company.

I am trying to reference both tables so that the result display the
location of the dailled numbers, here is the query I have built using
the query tool in SQL but it does not seem to work. could any tell me
where I am going wrong?

SELECT dbo.IpPbxCDR.OriginationNumber, dbo.[National].Location
FROM dbo.[National] CROSS JOIN
dbo.IpPbxCDR
WHERE (dbo.[National].Digits LIKE
'%dbo.IpPbxCDR.OriginationNumber%')

Many Thanks

Ian

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 06:36 PM
Tom Moreau
 
Posts: n/a
Default Re: Help with Query

Please post your DDL + INSERT statements of sample data + desired results.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Crumb" <rowan.ian@gmail.com> wrote in message
news:1141597991.414860.283020@j33g2000cwa.googlegr oups.com...
Hi,

I am trying to perform a query that is beyond my knewlegde and was
after little help,

I have two tables in my db, national and CDR. the National table
displays the codes and location for every std code in the UK, the CDR
table displays the information about calls made from people in my
company.

I am trying to reference both tables so that the result display the
location of the dailled numbers, here is the query I have built using
the query tool in SQL but it does not seem to work. could any tell me
where I am going wrong?

SELECT dbo.IpPbxCDR.OriginationNumber, dbo.[National].Location
FROM dbo.[National] CROSS JOIN
dbo.IpPbxCDR
WHERE (dbo.[National].Digits LIKE
'%dbo.IpPbxCDR.OriginationNumber%')

Many Thanks

Ian

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 06:36 PM
Hugo Kornelis
 
Posts: n/a
Default Re: Help with Query

On 5 Mar 2006 14:33:11 -0800, Crumb wrote:

>Hi,

(snip)

Hi Ian,

Answered in microsoft.public.sqlserver.server.

Please don't post copies of the same question to multiple locations; it
makes it harder for you to keep track of the answers and yields extra
work for those who try to answer.

--
Hugo Kornelis, SQL Server MVP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:35 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com