Thursday, October 23, 2008

IN

Need to remember that when wanting to allow end users to pick multiple parameters to include an IN statment!!!

gotta use IN (@PARAM) to handle multiple

Example:
WHERE a.value IN (@PARAM)


Wednesday, October 1, 2008

Convert date time in a QUERY! (not changing a table)


CONVERT(datetime,CONVERT(varchar(10),GETDATE(),101))

Example in use
Convert (char(10),bc.sxbc_next_billto_dttm,101) AS sxbc_next_billto_dttm,