Viewing 15 posts - 61 through 75 (of 345 total)
I don't see that the temp table, table variable, or calculations are actually doing anything.
Seems to me the above can be rewritten as
SELECT
@a as NUM,
bd.DQLinkID as bdDQLinkID,
bd.DQID...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
April 3, 2012 at 9:32 am
You can use something like this to generate the sql:
create table table_01 (id int);
create table table_123 (id int);
create table table_554 (id int);
insert into table_01 values (2), (200);
insert into table_123 values...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
February 23, 2012 at 8:31 am
Your sample query has columns not listed in your table columns, i.e. Step, CurrentStep.
It seems the natural way to join the tables would be
select jd.Jobnum, jd.TimeStart, jd.Stepnum, jd.tgtQName, a.RunInSingleMode...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
February 17, 2012 at 10:33 am
To create a temp table from existing rows, use this type of syntax:
select Customer_Number,Product, Price
into #temp_Customer
from RealCustomerTable
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
February 10, 2012 at 6:11 am
Dev (12/28/2011)
george sibbald (12/27/2011)
logicinside22 (12/27/2011)
thanks folks for nice reply . I did with Detach and Attach Option and it looks good now.
can I then recommend that you check...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 28, 2011 at 1:52 pm
Something to try: place SET NOCOUNT ON; after procedure declaration.
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 28, 2011 at 1:24 pm
tharan.info (12/28/2011)
This will help you,update A SET A.DID='X'
from
LOCN A
join
ACS B
On
A.LID = B.LID
JOIN
ACO C
ON
B.UID = C.UID
where
C.TYPE = 'd'
How...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 28, 2011 at 8:19 am
Awesome. Thanks Jeff, everytime you post, I learn something. Next lesson for me: windowing functions.
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 22, 2011 at 7:40 am
bwoulfe (12/20/2011)
Is that the same thing? Does the cross apply act as a inner join because of where OrderNumber = o.OrderNumber?
Don't think of it as a join but instead...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 21, 2011 at 2:31 pm
Also, this article can give you some insight on how isnumeric works and what pitfalls to avoid.
http://www.sqlservercentral.com/articles/IsNumeric/71512/
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 21, 2011 at 10:19 am
It's bad data. You have a character that passes for numeric but cannot be inserted into a numeric field. Examine:
select isnumeric('$00')--returns 1, is numeric according to the function
select cast('$00' as...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 21, 2011 at 10:01 am
kajalchatarjee 5928 (12/21/2011)
I did check the data but there was no error... because , when I take two sample sets of data and try inserting together it is giving that...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 21, 2011 at 9:05 am
kajalchatarjee 5928 (12/21/2011)
I am new to sql server. I am getting following error when I am trying to insert data into target table.
"Error converting data type varchar to numeric."
so...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 21, 2011 at 8:42 am
Do the owners of this 198k-member website realize how much trouble they're in? :unsure:
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 21, 2011 at 7:14 am
Skinning cat method #2:
select * from #orders o
cross apply (
select OrderNumber, SUM(total) OrderTotal
from #orders
where OrderNumber = o.OrderNumber
group by OrderNumber) a
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 20, 2011 at 3:37 pm
Viewing 15 posts - 61 through 75 (of 345 total)