Viewing 15 posts - 1,021 through 1,035 (of 1,082 total)
mmm ok he he he
I normally find this to be messy trying to do it one query.
So what I do is get the values into a Table Variable or temp...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 11, 2007 at 8:51 am
try this.
I may have made some syntax mistakes but I am sure you will get the jist
SELECT
MINER2BIDPRICE
,
MAXER2BIDPRICE
,
MAXESBIDPRICE
---------------------------------------------- :w00t:
Try to learn something about everything and everything about something. - Thomas Henry Huxley
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 11, 2007 at 7:35 am
There is another option.
You could the objectID's for the tables and build a dynamic query which would only require you to type one select and then print or execute the...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 11, 2007 at 5:57 am
Hi there,
Do you want to find all the records that say have emp_ID = 100
You could use a UNION
You could use temp/table table variables
Does this help?
Thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 11, 2007 at 5:07 am
HI there,
What version of SQL you using?
If you using 2005 you could use the pivot functionality if you using 2000 you could use case statements
thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 11, 2007 at 5:05 am
HI guys,
I have created a proc that tries to create all triggers for insert/update and delete auditing
http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1950
see if this helps
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 7, 2007 at 12:37 am
Have you tried this.
select distinct dbo.tbl3215.ittnumber, dbo.tbl3215.itttitle, dbo.tbl3215.daterequired from dbo.tblassignment inner join dbo.tbl3215 on dbo.tbl3215.ittnumber = dbo.tblassignment.ittnumber inner join dbo.tblfltwrkcntr on dbo.tblfltwrkcntr.fltwkcntrid = dbo.tblassignment.assfltwrkid where ((itttitle is not null or...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 5, 2007 at 8:49 am
Hi again 🙂
Would it be possible for you to post the code?
Thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 3, 2007 at 1:48 am
Hi Lim,
I'm pretty sure that when you are using dynamic SQL you are restricted to a varchar variable of 4000 chars.
Try breaking you query up into smaller parts and executing...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 3, 2007 at 12:38 am
Hi Steven,
Not sure if this is teh most process affective way of doing it but it's a good starting block I think:
CREATE TABLE ##VtblTables
(
...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 30, 2007 at 8:35 am
HI There,
Are you reports run at the sametime everyday?
Do you need realtime data?
Thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 30, 2007 at 6:00 am
HI Tom,
Sorry for the delay.
Could you try replacing the highlighted section with the following.
cast(stuff(stuff(Date_Created,5 ---------------------------------------------- :w00t:
Try to learn something about everything and everything about something. - Thomas Henry Huxley
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 30, 2007 at 12:57 am
HI Tom,
I am confused.
This orginal line code is not in the last section of code you sent me...
Thanks
chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 29, 2007 at 9:18 am
Hi Tom,
Great to hear you loving it 🙂
Are you sure the error is at this point in your code?
Perhaps you could send me some more code to read through
thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 29, 2007 at 8:56 am
HI Tom,
I used this code here and everything works fine.
Please could you try it yourself.
CREATE
TABLE Temp
(
Date_Created
VARCHAR ---------------------------------------------- :w00t:
Try to learn something about everything and everything about something. - Thomas Henry Huxley
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 29, 2007 at 8:48 am
Viewing 15 posts - 1,021 through 1,035 (of 1,082 total)