Wednesday, March 7, 2012

I need SQL Query Help

Sir,

We are try to insert query like this

Insert into Table_1 (smDate,Description) Values ('Thu, Feb 15, 2007 03:00 PM', ' Hai, It's Just for Testing')

This is Exact Query about this...

We know about MS ACCESS it has Built in function like Format('Thu, Feb 15, 2007 03:00 PM','mm/dd/yyyy HH:MM')

But I am new to SQL. I dont know the The Date Format built in function in SQL Server.

How can i Insert this Quesry to SQL Table

and also How can insert "it's " this type of words into SQL..

Can you help me

this is very helpful for my project

Thanks With Regards

S.Senthil Nathan

Senthil:

look up CAST AND CONVERT under CONVERT in books online to get a look at date and time formats. The ISO format is format 112. This should get you moving in the right direction.


Dave

|||Hi,

convertion was already explained by another posted, the issue with the quotes can be solved using two single quotes instead of one.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment