Viewing 15 posts - 61 through 75 (of 97 total)
Oh,
I didn't explain my idea correctly, where you understood
REPLACE(Sequence, ',', ',,') + ',,'
I tried to express
',' + REPLACE(Sequence, ',', ',,') + ','
,...
June 8, 2011 at 3:57 am
Thanks Yatish, your explanations are clear. I have only a doubt: "A" and "A+" are different letters at all?, or there is any obscure relation between these two letters?. If...
June 7, 2011 at 7:32 am
Hello yatish,
I'm just curious because these kind of requirements looks more as a puzzle than a real life requirement. Could you explain briefly what's the need for this kind of...
June 7, 2011 at 4:46 am
Hello sqldba_icon,
seeing your query there are two things focused my attention and looked strange to me:
The NOT EXISTS clause. As pointed by Kevin it could be bad for the optimization...
June 7, 2011 at 4:07 am
Hello,
a problem I encountered at some times is assuming wrong date formats. In your query you have a clause,
where bss.x2besuchsdatum >= '05.02.2010'
and this clause could be the origin of your...
May 6, 2011 at 5:55 am
Hello,
You want to be careful here. The OP never stated what datatype the MonthID field was, but, unless he was doing an implicit conversion in his original code, it looks...
May 5, 2011 at 8:15 am
Hello,
as I understand you are trying to add the next MonthID in your table, irrespective of the current month.
And there is another problem, you are trying to use date functions...
May 5, 2011 at 3:53 am
Hello,
Grant, it is true that single quotes create troubles but when they are used in dynamic SQL queries; in this case the query is static, single quotes should not produce...
April 18, 2011 at 3:08 am
Hello,
seeing your query I realize there is some code in excess. Your query is like this,
SELECT * FROM
(
SELECT ...
UNION ALL
SELECT ...
) TotalStartsTable
you can remove the outer query.
Next, your UNION...
April 14, 2011 at 2:21 am
Hello faisalkhanbk,
when you code
select invoiceno,invoicedt,customerid,0,0,invoiceamt,0,0,0 from v_aging where datediff(day,CreditPeriodDate,getdate())>=7 and datediff(day,CreditPeriodDate,getdate())<30
you force SQL Server to made calculations over CreditPeriodDate for each row. That's bad because you can code it in...
April 5, 2011 at 4:18 am
Hello,
maybe you have a problem blocking this volume of data. You can face this kind of massive updates using a cursor and commiting rows regularly, following this schema:
DECLARE CUR CURSOR...
March 30, 2011 at 2:12 am
ha ha, I'm sorry, a Google search was an option that I didn't think about.
Changing the regional settings doesn't work, my machine works with spanish settings and this machine is...
March 25, 2011 at 3:40 am
Hi,
change your JOIN into a LEFT JOIN, and select all rows that aren't in PROD;
select A.timestamp,A.point_id,A._VAL from DEV.DEVTABLE.dbo.DATA_LOG A
LEFT join PROD.PROTABLE.dbo.DATA_LOG B
on A.timestamp = B.timestamp and A.point_id = B.point_id collate...
March 8, 2011 at 2:33 am
Hello,
your CONVERT sentence looks right, I tried this,
WITH X AS (SELECT '20110101' AS FILE_RUN_DATE
UNION SELECT '20110202'
UNION SELECT '20110303'
UNION SELECT '20110404')
SELECT convert(datetime,[FILE_RUN_DATE],112) AS 'FILE_RUN_DATE' FROM X
and it worked well. When...
March 2, 2011 at 4:37 am
Hello,
your cursor is over a table named dbo.source_table, so your update must be over the same table;
Update dbo.Customer
Set CompanyName=@CmpName
where CURRENT OF Cursor1
This code doesn't work because Cursor1 doesn't point to...
February 23, 2011 at 2:44 am
Viewing 15 posts - 61 through 75 (of 97 total)