Viewing 15 posts - 31 through 45 (of 51 total)
Thanks Grant for the answers.
Grant Fritchey (1/22/2009)
SELECT...
FROM Table1 t1
JOIN Table2...
January 22, 2009 at 8:44 am
You could try this:
select convert(datetime,convert(varchar(10),getdate(),101))
When you use smalldatetime, seconds are rounded off to the nearest minute.
January 22, 2009 at 7:48 am
peterzeke (1/22/2009)
January 22, 2009 at 6:48 am
I'm not very clear on this. As I know, VSS and sql code is related via macros. In VSS the macros are defined.
For example: $ID, to say when the...
January 22, 2009 at 4:54 am
Can you give more info like what is the size of total, the exact error message, sample data for which the error is thrown..
January 22, 2009 at 3:01 am
Error is because 0.116 is a float value and you are trying to convert it to int. Convert it to float.
declare @total varchar(10)
set @total = '0.116'
select convert(float,@total)
January 22, 2009 at 2:21 am
From your code, the first IF statement says if table1 has records, insert them into table2 and truncate table1.
For example: table1 - has records. Then at the end of...
January 21, 2009 at 9:30 pm
Grant Fritchey (1/16/2009)
Account
AccountID, Desc
1, AccountA
2, AccountB
Course
CourseID,AccountId,Desc (you may need a unique constraint on the name, but then it might make a better...
January 16, 2009 at 12:59 pm
Grant Fritchey (1/16/2009)
January 16, 2009 at 12:13 pm
select name, type from sys.procedures
where name not in (select name from FIVER.AHOG.dbo.sys.procedures)
order by name
'from' is missing in the sub-query in WHERE clause..
January 16, 2009 at 11:06 am
Did you mean to say you are trying to refer a table mentioned in your UPDATE statement in your SELECT statement? How is that possible?
pat (1/14/2009)
if (EXISTS(select name from tablename...
January 16, 2009 at 8:04 am
Have you also tried
insert into [testdb].[testdb].[dbo].[Part Master] (PartID) values ('test');
What was the error?
January 13, 2009 at 10:22 am
Krishna_DBA (1/12/2009)
If a customer changes the card details, I would like that to be updated on the carddetails table as well? How could I do that?
If a customer changes the...
January 13, 2009 at 8:37 am
Its because in the case statement all the return values must be of the same datatype.
January 12, 2009 at 10:49 am
Suppose 'user_id' is the primary key in users table, and 'user_id' is the foreign key in the customers table,
a simple query will do the task for you
SELECT cust.full_name
FROM...
January 10, 2009 at 10:51 pm
Viewing 15 posts - 31 through 45 (of 51 total)