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.
sqlfresher2k7 Aged Yak Warrior
623 Posts
declare @TableVar table ( PID Varchar(5) NOT NULL, Pval Varchar(10) NULL )Insert Into @TableVar (PID,Pval)(Select '100C','I'UNION ALLSelect '100C','S'UNION ALLSelect '100C','K'UNION ALLSelect '100C','P'UNION ALLSelect '100D','P')Select *from @TableVarExpected output:PID Pval Rowno---- ---- ----- 100C I 1100C S 4100C K 2100C P 3100D P 1
tkizer Almighty SQL Goddess
38200 Posts
SQLTeam.com Articles via RSS
SQLTeam.com Weblog via RSS
- Advertisement -
Articles
Forums
Blogs
Contact Us
About the Site