General Car Related Discussion. To discuss anything that is related to cars and automotive technology that doesnt naturally fit into another forum catagory.

SQL Server 2K Question

Thread Tools
 
Search this Thread
 
Old 08-09-2004, 10:18 AM
  #1  
Jim Galbally
20K+ Super Poster.
Thread Starter
 
Jim Galbally's Avatar
 
Join Date: May 2003
Location: Ramsgate, Kent Drives: E39 530D Touring
Posts: 20,599
Likes: 0
Received 0 Likes on 0 Posts
Default SQL Server 2K Question

you never know, sum1 might know

i've got a program which gets data from a SQL source and you can get the data from either a specific table or a specific query within the database

the data i need is all mixed between different tables, so i need to write a query to get all of it out (the easy bit i can do)

but how do i save that query within the SQL database so that i can get this program to use it? i cant find any options in SQL Query Manager, or SQL Administrator

and i dont have any documentaion or manuals etc to refer to, n cant find any help with google
Old 08-09-2004, 10:23 AM
  #2  
Rene
PassionFord Post Whore!!
 
Rene's Avatar
 
Join Date: Jun 2003
Location: Holland
Posts: 7,442
Likes: 0
Received 0 Likes on 0 Posts
Default

done loads of work with SQL but have no idea other then to code the actual query to get data from the DB

What program u got ?
Old 08-09-2004, 10:41 AM
  #3  
JohnnyB
PassionFord Post Whore!!
 
JohnnyB's Avatar
 
Join Date: May 2003
Location: Derby
Posts: 8,594
Likes: 0
Received 2 Likes on 2 Posts
Default

You want a program to use the query you just wrote?

What program?
Old 08-09-2004, 10:58 AM
  #4  
Jim Galbally
20K+ Super Poster.
Thread Starter
 
Jim Galbally's Avatar
 
Join Date: May 2003
Location: Ramsgate, Kent Drives: E39 530D Touring
Posts: 20,599
Likes: 0
Received 0 Likes on 0 Posts
Default

its some labelling program...

just foudna section in the enterprise manager called VIEWS and it could be what im after... but i just saved a view n it didnt appear in my program

here's my view statement:


Code:
CREATE VIEW dbo.Jimtest
AS
SELECT     dbo.StyleColourSizeSellingCodes.Item_Code, dbo.StyleColourSizeSellingCodes.ID, dbo.StyleColourSizeProducts.Style, 
                      dbo.StyleColourSizeProducts.Colour, dbo.StyleColourSizeProducts.SizeX
FROM         dbo.StyleColourSizeProducts INNER JOIN
                      dbo.StyleColourSizeSellingCodes ON dbo.StyleColourSizeProducts.ID = dbo.StyleColourSizeSellingCodes.Item_Code
here's the program 9that comes with NO help file

Old 08-09-2004, 11:05 AM
  #5  
RANJ
BANNED
BANNED
 
RANJ's Avatar
 
Join Date: May 2003
Location: FuKnOsE
Posts: 10,134
Likes: 0
Received 1 Like on 1 Post
Default

jim have u actualy thought of posting this on a related forum, as u will get more positive help
Old 08-09-2004, 11:16 AM
  #6  
Jim Galbally
20K+ Super Poster.
Thread Starter
 
Jim Galbally's Avatar
 
Join Date: May 2003
Location: Ramsgate, Kent Drives: E39 530D Touring
Posts: 20,599
Likes: 0
Received 0 Likes on 0 Posts
Default

ranj, considered it...

...then couldnt be arsed to register on one
Old 08-09-2004, 11:17 AM
  #7  
RANJ
BANNED
BANNED
 
RANJ's Avatar
 
Join Date: May 2003
Location: FuKnOsE
Posts: 10,134
Likes: 0
Received 1 Like on 1 Post
Default

Old 08-09-2004, 11:41 AM
  #8  
Jim Galbally
20K+ Super Poster.
Thread Starter
 
Jim Galbally's Avatar
 
Join Date: May 2003
Location: Ramsgate, Kent Drives: E39 530D Touring
Posts: 20,599
Likes: 0
Received 0 Likes on 0 Posts
Default

ok im gonna try some other ODBC drivers to see if they give me any more settings... got MDAC 2.8 downloaing at the moment... if that dont work ill try a 3rd party driver
Old 08-09-2004, 12:39 PM
  #9  
AndyHey
Virgin
 
AndyHey's Avatar
 
Join Date: Sep 2004
Posts: 1
Likes: 0
Received 0 Likes on 0 Posts
Default

you could do its as stored procedure also which is exactly as it sounds - a bit of sql stored to be run anytime.

Code:
CREATE Procedure
                   yourspname
AS
SELECT     dbo.StyleColourSizeSellingCodes.Item_Code, dbo.StyleColourSizeSellingCodes.ID, dbo.StyleColourSizeProducts.Style,
                      dbo.StyleColourSizeProducts.Colour, dbo.StyleColourSizeProducts.SizeX
FROM         dbo.StyleColourSizeProducts INNER JOIN
                      dbo.StyleColourSizeSellingCodes ON dbo.StyleColourSizeProducts.ID = dbo.StyleColourSizeSellingCodes.Item_Code

you can then just call the sp from your app
Old 08-09-2004, 12:55 PM
  #10  
Jim Galbally
20K+ Super Poster.
Thread Starter
 
Jim Galbally's Avatar
 
Join Date: May 2003
Location: Ramsgate, Kent Drives: E39 530D Touring
Posts: 20,599
Likes: 0
Received 0 Likes on 0 Posts
Default

cant call procedures from the app

its basically just using an ODBC plugin for its DB connectivity
Old 08-09-2004, 02:10 PM
  #11  
Jim Galbally
20K+ Super Poster.
Thread Starter
 
Jim Galbally's Avatar
 
Join Date: May 2003
Location: Ramsgate, Kent Drives: E39 530D Touring
Posts: 20,599
Likes: 0
Received 0 Likes on 0 Posts
Default

THIS IS DOING MY FUCKING HEAD IN

ok quick fix, how can i create a new table in the database containing the data from that query above, then i can just query the table directly
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
nicodinho
Ford Non RS / XR / ST parts for sale.
6
07-10-2015 12:56 PM
M7 COS
Wheels and Tyres
3
01-10-2015 04:46 PM
locum8
Technical help Q & A
5
01-10-2015 01:50 PM
Iain Mac
General Car Related Discussion.
7
30-09-2015 09:39 PM
stevecfrst1
Cars for Sale
1
30-09-2015 05:18 AM



Quick Reply: SQL Server 2K Question



All times are GMT. The time now is 12:06 PM.