-
quick and dirty sql
trying to fudge a dnn report, all the data is in 1 table with 2 fields,
fieldid field1
1 data
2 moredata
i can pull a quick select field1 from table where fieldid=2
result=moredata
but what i need is more like
select field1 as field1, field1 as field2
from table
where fieldid=1, fieldid=2
result:
field1 field2
data moredata
just not sure, can you point me in the right direction, thanks in advance.
-
What is dnn report?.
With only two columns how do you know which data and more data correspond to the same row in result.
This may work
select field1,null as field2
from table
where fieldid=1
union all
select null as field1,field2
from table
where fieldid=2
-
works great,, almost
dnn=dotnetnuke
ok, works great pulls 2 columns of the columns i need, only issue is it pulls them not lined up, for instance each of these has 24 results in each column, but the result was 48 rows long,
i need to start the second column at row 1 with the 1 record of column 1
thank you so much for your help, its people like you that share your info help me to learn more
-
bump, still looking for an answer thanks again.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|