Skip to content
Advertisement

Tag: tsql

Using PIVOT to get SELECT into one column, not row

I am trying to make a select, which would show the result into ONE column, not row. I tried using PIVOT, but I am not successful at all. Result of my select: I want to have it like this: Answer You can use cross apply to obtain a single column: results: or, if you prefer having a separate column for

How can I make this code work on SQL Server

I was wondering why my SQL code isn’t working properly on SQL Server while when I upload it on phpmyadmin it works perfectly. Is it some difference between those SQL’s? Is someone able to make this code working well on SQL Server? I’ve posted only part of database but with your help I’ll get done the rest. Answer As a

Use smaller than on like clause

I have some number like These numbers are only an example I have a lot of 14… a lot of 15… etc. Now in WHERE clause of a stored procedure, I want to exclude all numbers who start with 15 or less so I can do something like: Is there a way to change this and use something like TestColumn

Advertisement