Jump to content

Recommended Posts

Salam untuk semua.. mohon bantuan,dah cuba tapi masih gagal..


contoh code  :

CREATE TABLE #temptable (id int,nm varchar(20),tarikh datetime);
INSERT INTO #temptable VALUES (1001,'Hakim','2/12/2010');
SELECT * FROM #temptable;
--DROP TABLE #temptable;

soalan,macam mana saya nak compare fields 'tarikh' dengan 'gatedate()'?


saya cuba macam ni,tapi gagal..

SELECT nm,tarikh=
CASE tarikh
         WHEN tarikh <= getdate() THEN 'Aktif'
         ELSE 'Tidak Aktif'
FROM #temptable;

Mohon bantuan..

Terima kasih.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...