Crosstab query into datagrid

Results 1 to 2 of 2

Thread: Crosstab query into datagrid

  1. #1
    Join Date
    Dec 1969

    Default Crosstab query into datagrid

    I need to get a list of records from a database table to display on a page. The records in the table contain a reference number corresponding to a text value in another table. I want to substitute this text value for the refrence number in the display. When an action is completed on the list item, the record will be deleted (but not the values in the cross referenced table)<BR><BR>Can I do this with a datagrid or do i need to iterate through the records with a loop to get the appropriate substitute value?

  2. #2
    Join Date
    Dec 1969

    Default RE: Crosstab query into datagrid

    Doesn&#039;t *sound* like you&#039;re doing a crosstab query...It sounds like you just need to join two tables, no?<BR><BR>In that case, do it in the SQL statement, before it even gets to the DataGrid.<BR><BR>Simple example:<BR>[code language="T-SQL"]<BR>Select t1.*, t2.TextValueColumn <BR> FROM Table1 t1 <BR> INNER JOIN Table2 t2 ON t1.RefNumberColumn = t2.RefNumberColumn<BR><BR>[/code]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts