SQL Server 2K Question
Thread Starter
20K+ Super Poster.
Joined: May 2003
Posts: 20,599
Likes: 0
From: Ramsgate, Kent Drives: E39 530D Touring
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

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
Thread Starter
20K+ Super Poster.
Joined: May 2003
Posts: 20,599
Likes: 0
From: Ramsgate, Kent Drives: E39 530D Touring
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:
here's the program 9that comes with NO help file 
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

Trending Topics
Thread Starter
20K+ Super Poster.
Joined: May 2003
Posts: 20,599
Likes: 0
From: Ramsgate, Kent Drives: E39 530D Touring
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
you could do its as stored procedure also which is exactly as it sounds - a bit of sql stored to be run anytime.
you can then just call the sp from your app
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
Thread Starter
20K+ Super Poster.
Joined: May 2003
Posts: 20,599
Likes: 0
From: Ramsgate, Kent Drives: E39 530D Touring
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
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
Thread
Thread Starter
Forum
Replies
Last Post
nicodinho
Ford Non RS / XR / ST parts for sale.
6
Oct 7, 2015 12:56 PM



