sql - Combine multiple rows in single row -


I'm new to SQL Server and I'm trying to combine more than one line in a row but I I'm not able to. Can anyone help me?

Input:

  id | Red | Buy | BSW ------------------ ------------------ 1328 Faucet Zero 0.05 1328 Faucet 0.06 Faucet 1328 0.01 Faucet Faucet 1328 0.05 Faucet faucet 1329 Faucet faucet 0.05 1329 Faucet 0.05 faucet 1329 0.05 Faucet faucet   

Output

  ID | Red | Buy | BSW ------------------------- ----------- 1328 0.01 0.06 0.05 1328 0.05 NUll NULL 1329 0.05 0.05 0.05 < / Code>  

Delete the data so that to remove SUM () conflict.

Try this type of

  SELECT id, sum (Isnull (ID, ID according to ID), (amount, (purchase, 0)) over (division according to ID by ID), Yog (Isol (BSW, 0)) Over (ID according to partition) ID number 1 By ID    

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -