|
amioni wrote: e.UniqueID e. [Web Id] from Elements I am not seeing a comma between the two columns you reference, is that correct?
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
it s just an example of a query so dont worry it s with comma in my package, and it s not the problem
|
|
|
|
|
Always read the error message - Syntax Error, permission violation, or nonspecific Reviews another error
There is either:
An error in the sql - you can check this by running the sql in isolation.
A permission issue - harder to track, I would test this by creating a simple SSIS package and try to run it from your code.
Non specific error - eliminate the first two possibilities then look into this.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
NB : when i make this query in Stored procedure and i call it in the oledb source it work fine but not when i make it directly
|
|
|
|
|
I don't understand what that means - I will need more information to be able to help you.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
amioni wrote: NB : when i make this query in Stored procedure and i call it in the oledb source it work fine but not when i make it directly
A user (database) can have different permissions based on direct sql versus stored procs.
|
|
|
|
|
i am working with sa user (dev pc)
|
|
|
|
|
hi,
i answer myself because i found the solution:
with sql server native client 10 we can't add param with subquery
but this problem is resolved with SQL native client 11 (sql server 2012)
thank you
|
|
|
|
|
hi i found a Gregorian date conversion function in sql server but i dont know how i can use it!
could you help me?
|
|
|
|
|
Not without seeing it.
What are you trying to achieve? All date/datetime types in MSSQL already use the Gregorian calendar. Are you trying to convert to a Julian date? A different calendar system?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i wanna convert english calender to persian calender.i got this function but i cant use it.I am not a professional i MSSQL
|
|
|
|
|
Just put it back where you found it.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
thank you for your help
|
|
|
|
|
Perhaps you actually think of a function for converting from/to Persian calendar?
|
|
|
|
|
yeah i think about it and i dont know how i can use this.
|
|
|
|
|
Seems to be a solved problem, have some google foo[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I ran this in the Management Studio:
update [Master] set Data_Thru = '7/23/2014 9:49:00 AM'
where Data_Thru = '7/23/2014 8:00:00 AM'
So why did it actually set the smalldatetime to 7/23/2014 9:50:00 AM?
(And don't yell at me for the table name. It wasn't my idea.)
|
|
|
|
|
Are you absolutely sure that that's the precise query that you executed, and that the row you're looking at is the one it updated?
smalldatetime[^] will round to the nearest minute, but it will only round up if the seconds are greater than or equal to 29.999; anything else will round down.
SELECT
CAST('7/23/2014 9:49:29.998 AM' as smalldatetime),
CAST('7/23/2014 9:49:29.999 AM' as smalldatetime)
;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: Are you absolutely sure that that's the precise query that you executed, and
that the row you're looking at is the one it updated?
Yep.
Freaked me out. I've never seen that before, and it had no problem with me going in and correcting it back down to 9:49 via T-Sql
|
|
|
|
|
Weird. Are there any triggers on that table? Or other users updating the same row at the same time?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Nope. No triggers. And no users at all (yet).
Maybe we'll have to pass it off as a cosmic ray hitting the server and flipping a bit at just the right time. I see no resason for it, and Google came up with nothing, either.
|
|
|
|
|
When I run into impossible situations in code then the only solution is to examine my assumptions. That is always where I find the problem that lead to the impossibility in the first place.
|
|
|
|
|
What's the version / localization of your SQL Server?
I tried it with SQL Server 10.0.5500, German localized Management studio. I adjusted the date format of your query, and tested it. And it worked as it was expected to work - I cannot reproduce your bug.
|
|
|
|
|
10.50.1617.0 Management studio hitting 2008 R2 10.0.5500.0
I think it was a one-time glitch. I hate those.
|
|
|
|
|
Hi,
I have first_name, middle_name and last_name in my customers table.
I want to do
SELECT CONCAT(first_name, ' ', middle_name, ' ', last_name)
The middle name is optional
so I want to ignore it if it's blank to be:
SELECT CONCAT(first_name, ' ', last_name)
because if I do it the normal way I'll have extra space between the first_name and last_name
Technology News @ www.JassimRahma.com
|
|
|
|