Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 make Columns Name from List Of tables

Author  Topic 

asif372
Posting Yak Master

100 Posts

Posted - 2011-12-16 : 02:33:04


I have 1 table naming Item Containing List of Items
Data of Item is this

[PLABOLYTE-40 Injection]
[RINGOLACT Injection]
[PLADEX-5 200.000000]
[RINGOLACT Injection]
[PLASALINE Injection]
[RINGER'S SOLUTION]




Second Table Naming Data Contains Data
Data Is Like This


DocNum CardName FrgnName Quantity

500000003 'NATIONAL' [PLABOLYTE-40 Injection] 500.000000
300000011 'PREMIER' [RINGOLACT Injection] 20.000000
100000053 'HOSPITAL' [PLADEX-5 200.000000] 4000.000000
300000117 'DELUX' [RINGOLACT Injection] 20.000000
300000135 'NOOR' [PLASALINE Injection] 20.000000
300000180 'ASASA' [RINGER'S SOLUTION] 1440.000000


I want a Resultant Table Having These Columns Like This

DocNum
Date
CardName
Size
FrgnName
Quantity
[PLABOLYTE-40 Injection]
[RINGOLACT Injection]
[PLADEX-5 200.000000]
[RINGOLACT Injection]
[PLASALINE Injection]
[RINGER'S SOLUTION]

Kindly Help

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-16 : 03:13:52
what does [PLABOLYTE-40 Injection],[RINGOLACT Injection] etc contain? count or is it just a flag?


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

asif372
Posting Yak Master

100 Posts

Posted - 2011-12-16 : 04:25:11
It is Name Of Items i want to count records
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-16 : 06:25:03
hmm..didnt understand significance of that as you also have FrgnName in resultset

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -