Click here to Skip to main content
15,921,959 members
Home / Discussions / Database
   

Database

 
GeneralRe: need help with inner join and oount sql server 2005 Pin
VijayVishwakarma27-Aug-08 4:36
VijayVishwakarma27-Aug-08 4:36 
QuestionUploading results in to an Excel Pin
joemonvarghese80@yahoo.co.in27-Aug-08 0:07
joemonvarghese80@yahoo.co.in27-Aug-08 0:07 
AnswerRe: Uploading results in to an Excel Pin
Manas Bhardwaj27-Aug-08 0:22
professionalManas Bhardwaj27-Aug-08 0:22 
AnswerRe: Uploading results in to an Excel Pin
Chris Quinn27-Aug-08 2:55
Chris Quinn27-Aug-08 2:55 
AnswerStart from Excel Pin
David Mujica27-Aug-08 3:50
David Mujica27-Aug-08 3:50 
Questionsql server (multplie column value as one row value) Pin
vjvjvjvj26-Aug-08 23:38
vjvjvjvj26-Aug-08 23:38 
AnswerRe: sql server (multplie column value as one row value) Pin
Ashfield27-Aug-08 0:39
Ashfield27-Aug-08 0:39 
QuestionRe: sql server (multplie column value as one row value) Pin
vjvjvjvj27-Aug-08 2:00
vjvjvjvj27-Aug-08 2:00 
Hi Bob,

My query is in my asp.net code is as (which is not a stored procedure i am implementing it in my vb code.

select assets.asset_pk as UNIQUEID,
assets.asset_ID ,
assets.[name] collate database_default ,
asset_types.ASSET_TYPE_NAME ,
(CASE when IsNull(townland.townland, '') = '' THEN '' eLSE townland.townland END) ,
(CASE when IsNull(thoroughfares_fme1.thorfare_name, '') = '' THEN '' eLSE thoroughfares_fme1.thorfare_name END) ,
(CASE assets.LEASED WHEN 1 THEN 'YES' eLSE 'NO' END) ,
(CASE assets.DISPOSED WHEN 1 THEN 'YES' eLSE 'NO' END) ,
(CASE assets.ASSET_REGISTERED WHEN 1 THEN 'YES' eLSE 'NO' END) ,
assets.ASSET_FOLIO_NUMBER ,
assets.FLAGGED_NOTE collate database_default +'<br>' AS DETAILS
from assets
INNER JOIN asset_types on assets.type_id = asset_types.asset_type_id
left join asset_streets on assets.asset_pk =asset_streets.asset_ref_key
left join thoroughfares_fme1 on asset_streets.THORFARE_REF_KEY = thoroughfares_fme1.primaryindex
left join asset_townlands on assets.asset_pk=asset_townlands.asset_ref_key
left join TOWNLAND on asset_townlands.TOWNLAND_KEY = TOWNLAND.primaryindex
where
assets.asset_ID like '%L%' or
assets.[name] collate database_default like '%L%' or
asset_types.ASSET_TYPE_NAME like '%L%' or
townland.townland like '%L%' or
thoroughfares_fme1.thorfare_name like '%L%' or
assets.leased_to like '%L%' or
assets.LEASED_CUSTOMER_ID like '%L%' or
assets.LEASED_OCCUPIER like '%L%' or
assets.DISPOSED_TO_NAME like '%L%' or
assets.ASSET_FOLIO_NUMBER like '%L%' or
assets.FLAGGED_NOTE collate database_default like '%L%'
order by assets.asset_ID


here because of thoroughfares_fme1.thorfare_name field I am getting rows for the asset_id

e.g

62 BLD10001 ffa-234 LA BUILDING RATHQUARTER HOLBORN STREET
62 BLD10001 ffa-234 LA BUILDING RATHQUARTER CONNAUGHTON ROAD

I want this records as one record
e.g.

62 BLD10001 ffa-234 LA BUILDING RATHQUARTER HOLBORN STREET, CONNAUGHTON ROAD


Now my datagrid is binded to thi record set.

When I tried to have your list concept in my code I get the error as it can be implemented in other data retrieval fields.

Now please tell me how I can proceed from here?

regards
AnswerRe: sql server (multplie column value as one row value) Pin
Ashfield27-Aug-08 2:33
Ashfield27-Aug-08 2:33 
GeneralRe: sql server (multplie column value as one row value) Pin
vjvjvjvj27-Aug-08 3:03
vjvjvjvj27-Aug-08 3:03 
GeneralRe: sql server (multplie column value as one row value) Pin
Ashfield27-Aug-08 3:09
Ashfield27-Aug-08 3:09 
QuestionAt a loss with stored procedure for SQL 2005 [modified] Pin
Sunset Towers26-Aug-08 13:58
Sunset Towers26-Aug-08 13:58 
AnswerRe: At a loss with stored procedure for SQL 2005 Pin
Mycroft Holmes26-Aug-08 14:25
professionalMycroft Holmes26-Aug-08 14:25 
GeneralRe: At a loss with stored procedure for SQL 2005 Pin
Sunset Towers26-Aug-08 14:31
Sunset Towers26-Aug-08 14:31 
GeneralRe: At a loss with stored procedure for SQL 2005 Pin
Mycroft Holmes26-Aug-08 21:55
professionalMycroft Holmes26-Aug-08 21:55 
Questionproblem when install SQL Server 2005 in Vista Home version Pin
alexyxj26-Aug-08 7:03
alexyxj26-Aug-08 7:03 
AnswerRe: problem when install SQL Server 2005 in Vista Home version Pin
Wendelius26-Aug-08 7:23
mentorWendelius26-Aug-08 7:23 
GeneralRe: problem when install SQL Server 2005 in Vista Home version Pin
alexyxj26-Aug-08 7:37
alexyxj26-Aug-08 7:37 
GeneralRe: problem when install SQL Server 2005 in Vista Home version Pin
Wendelius26-Aug-08 7:43
mentorWendelius26-Aug-08 7:43 
GeneralRe: problem when install SQL Server 2005 in Vista Home version Pin
alexyxj26-Aug-08 8:38
alexyxj26-Aug-08 8:38 
GeneralRe: problem when install SQL Server 2005 in Vista Home version Pin
Wendelius26-Aug-08 9:27
mentorWendelius26-Aug-08 9:27 
QuestionCrystal Reporting in Visual Studio 2005 Pin
IlseBrase26-Aug-08 4:13
IlseBrase26-Aug-08 4:13 
AnswerRe: Crystal Reporting in Visual Studio 2005 Pin
Wendelius27-Aug-08 7:26
mentorWendelius27-Aug-08 7:26 
QuestionRemote access for MS SQL Server 2008 Pin
rajg8226-Aug-08 4:10
rajg8226-Aug-08 4:10 
AnswerRe: Remote access for MS SQL Server 2008 Pin
Wendelius26-Aug-08 7:22
mentorWendelius26-Aug-08 7:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.