sql cast to integer
-- NOTE: this is for SQL-Oracle specifically
/*
<...> : Your personal entry
*/
-- syntax:
CAST(<variable> as <variable-type>) -- in this case: <variable-type> = INTEGER
-- example:
SELECT CAST(MEMBER_NO as INTEGER)
FROM DUAL;
sql cast to integer
-- NOTE: this is for SQL-Oracle specifically
/*
<...> : Your personal entry
*/
-- syntax:
CAST(<variable> as <variable-type>) -- in this case: <variable-type> = INTEGER
-- example:
SELECT CAST(MEMBER_NO as INTEGER)
FROM DUAL;
sql cast date
DECLARE @counter INT = 0
DECLARE @date DATETIME = '2006-12-30 00:38:54.840'
CREATE TABLE #dateFormats (dateFormatOption int, dateOutput nvarchar(40))
WHILE (@counter <= 150 )
BEGIN
BEGIN TRY
INSERT INTO #dateFormats
SELECT CONVERT(nvarchar, @counter), CONVERT(nvarchar,@date, @counter)
SET @counter = @counter + 1
END TRY
BEGIN CATCH;
SET @counter = @counter + 1
IF @counter >= 150
BEGIN
BREAK
END
END CATCH
END
SELECT * FROM #dateFormats
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us