473,388 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Where to post SQL questions?

I need the URL for posting questions re SQL. like:

what is the syntax to construct a datetime value form month and year stored in integer variables and a day constant, such as

@w-datetime = @MM + '01' + @yy

thanks,
Nov 20 '05 #1
1 956
try microsoft.public.sqlserver.programming

DECLARE @MM int
DECLARE @yy int
SET @MM = 8
SET @yy = 2004

DECLARE @w smalldatetime

IF @MM <10
SET @w = CAST(CAST(@yy AS VARCHAR(4)) + '0' + CAST(@MM AS VARCHAR(2))+
'01' AS smalldatetime)
ELSE
SET @w = CAST(CAST(@yy AS VARCHAR(4)) + CAST(@MM AS VARCHAR(2))+ '01' AS
smalldatetime)

PRINT @w

probably not very robust

HTH,
Greg
"walker" <wa****@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
I need the URL for posting questions re SQL. like:

what is the syntax to construct a datetime value form month and year stored in integer variables and a day constant, such as
@w-datetime = @MM + '01' + @yy

thanks,

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David List | last post by:
I posed a MySQL C API question a few days back here, and got zero answers. I assume it is because this is not the right place to ask such questions. Does anyone here know where I could ask C API...
3
by: Dean Arpajian | last post by:
Looking to find info/ libs on creating (small) video files. Basically what I'm looking for is a tutorial for constructing a short video... (nothing nasty: output from a transmission line...
3
by: Xiangliang Meng | last post by:
Hi, all. In 1998, I graduated from Computer Science Dept. in a university in China. Since then, I've been using C Language for almost 6 years. Although I'm using C++ in my current job, I'm also...
22
by: Tera | last post by:
can you please give me the link ?
2
by: ENetArch | last post by:
Is this the right forum to post questions concerning TCP/IP Socket questions?
15
by: David T. Ashley | last post by:
I'll be using gcc under Red Hat Enterprise Linux. Where do I find information about the low-level calls to the operating system from compiled 'C'? For example, if I want to cause a process to...
2
by: Max2006 | last post by:
Hi, Which newsgroup should I post my questions related to Team Foundation Server 2008? Thank you, Max
0
Curtis Rutland
by: Curtis Rutland | last post by:
Here are the guidelines for where to post your .NET questions. Any post having to do with ASP.NET goes in the ASP.NET Answers Forum, regardless of the language used. If it's not ASP.NET, put...
2
Curtis Rutland
by: Curtis Rutland | last post by:
Here are the guidelines for where to post your .NET questions. Any post having to do with ASP.NET goes in the ASP.NET Answers Forum, regardless of the language used. This includes web service...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.