I'm not sure I understand what you're trying to do, but if I am understanding right, you have three tables you're selecting on. Assuming all of them are joined later in the select statement, would this work?
select
account.account_id,
account.ndc,
account.startdate,
case when...
Our company currently provides several software systems that utilize SQL Server as a back end. Up to this point in time, our data structure has been stored in one huge table with generic field names (Field001, Field002, ect.). There is no way to make our software work with more fields...
Sorry, I'd created a formula and set the @nspage to the pagenumber. That worked! I owe you big, I get to go to bed before tomorrow morning now, mucho gracias!
I've got a report that is grouping on the first left character of a field. I've got a "New Page Before" on my group header. Each time the next group starts on an even page, I want to skip another page and so the beggining of each group is printing on an odd page. I've tried putting a formula...
I'm trying to duplex 11X14 paper on a Savin MLP32, and the printer is just printing the even pages. Any idea on how to make printers duplex custom paper sizes?
Don't know if this will help you or not.
Select * from phone
Results
phonelog
---------
441
442
443
444
447
448
449
select
a.phonelog as StartIdleTime,
min(b.phonelog) as EndIdleTime
from
phone a,
phone b
where
a.phonelog<b.phonelog
group by
a.phonelog
having...
Hopefully this is just a stupid problem with a simple answer. I am trying to use a Crystal report to print 11X17 duplexed paper that will go into books. On the left edge of the page, (binding edge), I need about a .8in margin for the binding. The problem is, when I print with a .8in margin on...
I'm no sql guru like most of the folks around here, so take any suggestions with a grain of salt...
Does a path to each of these files already exist inside your sql table?
What is the criteria for the files you want to copy? Everything from a specific directory, everything from a specific...
Oh yeah...derived tables...thanks!
About the grouping on a1, it was just an empty field, and I figured that might be what was hanging up the update statement...
update parent
set
parent.a1=count(child.id)
from
object parent,
object child
where
parent.typ=2 and
child.typ=4 and
parent.id=child.link1
group by
child.link1,
parent.id,
parent.a1
Grrr....Apparantly SQL doesn't like the idea of using aggregate's in an update statement. I'm using the following select statement to select a count of children records, and link them to parent records. Problem is, when I try to run an update off of this statement, SQL politly informs me that...
correction, the two tables look like this...
object2
-----------------
id|count
33 1
34 2
35 3
imglinks
-----------------
ilinkid|objidref|count
23 33 1
24 33 2
25 33 3
and I'm able to update my objidref field based on the id in the object2 derived table with...
I believe I just got it. It isn't pretty, but basicly I just do a count on both the imglinks table, and the userdata, (object) table with a criteria that filters out my newly scanned images, and then links the ilinks table to the object table using the running count of my ilinks records, and...
I'm trying to so something with SQL that I can't quite get a handle on. I have a program that is supposed to be able to handle batch scanning. When it scans multiple pages, it links them all to one record that may be defined in scripting code, but it doesn't support linking each individual...
Well, that isn't the exact syntax :p I'm working with a datastructure that doesn't make a whole lot of sense to somebody who has never deal with it. Basicly it is one hudge flat file called object, with 50 different fields which allows the table to store completly different data types into one...
Maybe I oversimplified my question. I'm actualy trying to do a count, divide the result into 100, do another count based on groups, and figure out what percentage of the whole count a group consists of. A simplified version would look something like this...
select count(id)/(select count(id)...
I know this sounds like a dumb question, and I am currently looking through the SQL Books Online, but I figured somebody out there might have a quick answer for me...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.